Formatting a Book (AKA How to Help)

Started by Jubal, July 19, 2013, 01:30:43 PM

Previous topic - Next topic

Jubal

Okay, so here are instructions for formatting a book ready to be added to the project. This is what I'm calling the first run formatting - it gets everything at least into a clear format where it's easy to find content by book and chapter heading. At some point a second formatting run may happen, sorting out the paragraphs and the fact that the notes from the original book are scattered into the text annoyingly randomly - but that's priority only if we get all the books through the first run.

You will need a text editor - DO NOT use Microsoft Word, CoffeeCup HTML editor is a good call, you can use notepad but might find it a headache. Some vague knowledge of how basic HTML works is helpful but hopefully not necessary. A basic explanation of what tags are is given here and may be helpful: https://exilian.co.uk/forum/index.php?topic=659

GETTING STARTED
Firstly, select any book not currently done or in progress, and put your name down as doing it in this thread: https://exilian.co.uk/forum/index.php?topic=2565.
Then, navigate to the book at http://constitution.org/sps/sps.htm
So far so simple.

Now, once you've found your book, right-click on the page and press "view source". Copy from the first <P> tag to the last </P> tag - basically all the text on the page. If the page you're on has several books together, and some do, copy the part that's your book only. Then paste it into your editor, and you're ready to start work.

TITLES
This is the main body of the work that will need doing. You need to find every chapter heading on the page (they'll be TITLE I, TITLE II, and so on). Then get the whole title into one block if it's split over P tags, so the whole thing is in the same P tag. Then you need to add an anchor tag; put <a name=""> at the start of the title, just inside the <P> tag, and </a> at the end after the final P tag. Then in the quotes, put the numeral of the title in lower case. As an example, here's Title I of Book VI:

<P>THE DIGEST OR PANDECTS. BOOK VI.</P>
<P>TITLE I.</P>
<P>CONCERNING ACTIONS FOR THE RECOVERY OF SPECIFIC PROPERTY.</P>
<P>1. <I>Ulpianus, On the Edict, Book XVI</I>.</P>
<P>After actions which are open for the recovery of an entire amount, there
is added the action for the recovery of certain specific property.</P>


And it should end up like this:

<P>THE DIGEST OR PANDECTS. BOOK VI.</P>
<P><a name="i">TITLE I. CONCERNING ACTIONS FOR THE RECOVERY OF SPECIFIC PROPERTY.</a></P>
<P>1. <I>Ulpianus, On the Edict, Book XVI</I>.</P>
<P>After actions which are open for the recovery of an entire amount, there
is added the action for the recovery of certain specific property.</P>


You now need to do this for every chapter heading in your book. Some only have about three, some have over fifty. Here's a guide to Roman Numerals in case you need it:
http://literacy.kent.edu/Minigrants/Cinci/romanchart.htm

On all chapter headings after the first, add the following:
<br> <a href="#top">Back to top</a>
After the: </a>This is a link that will let people return to the top of the page.

FORMATTING
Every <font> tag on the page has to go if there are any. No exceptions, no mercy. All the end tags will just be </font>, and thus easy to run a find/replace for. The start tags will vary; again, run searches, find what's common, find/replace the commoner ones to oblivion then run another search to see if there are any left and snuff those out.

INDEXING
The indexing is the part that really makes all of the above useful. This is the code that goes in the navigation bar and allows people to navigate to chapters. It is formatted as follows:


<ul>
<li><a href="cod1.php#i">I - Concerning llamas and alpacas</a></li>
<li><a href="cod1.php#ii">II - Concerning heretics and Wibulnibs</a></li>
<li><a href="cod1.php#ii">III - Concerning the judgements passed against Wibulnibs in law</a></li>
</ul>


So essentially, open a new file and copy the above code into it.
Each <li> entry is a different title. For the central piece of text you can type the title names out or copy them over or whatever: please keep to the format of capitalising the numeral, space dash space then capitalise the first letter of the title and no full stop at the end.

As to the <a href="">, that's the link. The section before the hash (eg cod1.php here) depends on book and type. If it's a CODEX book make it cod(number).php, if it's a DIGEST book just call it book(number).php, if it's a NOVELS book call it nov(number).php, if it's from the INSTITUTES call it ins(number).php. After the hashtag put the relevant numeral, and make sure that this one is lower case.

Here's an actual example (Digest Book 4) to clarify:
<ul>
<li><a href="book4.php#i">I - Concerning complete restitution</a></li>
<li><a href="book4.php#ii">II - Where an act is performed on account of fear</a></li>
<li><a href="book4.php#iii">III - Concerning fraudulent intent</a></li>
<li><a href="book4.php#iv">IV - Concerning persons under twenty-five years of age</a></li>
<li><a href="book4.php#v">V - Concerning the change of condition</a></li>
<li><a href="book4.php#vi">VI - What the grounds are on which persons over twenty-five years of age are entitled to complete restitution</a></li>
<li><a href="book4.php#vii">VII - Concerning alienations made for the purpose of changing the conditions of a trial</a></li>
<li><a href="book4.php#viii">VIII - Concerning matters referred to others for arbitration and those who accept them for the purpose of making an award</a></li>
<li><a href="book4.php#ix">IX - Sailors, innkeepers, and the proprietors of stables must restore property entrusted to them</a></li>
</ul>


SAVING AND SENDING
It really doesn't matter what filename you choose to save your two files to, probably make them .html files though .txt or .php are fine too. You should now have one file with a large block of text in <p> tags, anchor tagged titles, and no font tags, and a second file with just the stuff between the <ul> and </ul> tags above.

The final stage is to email these to me at james[at]wavcott[dot]org[dot]uk, and then I'll paste the blocks into the formatted base-pages and upload them to the site.




And that's more or less it!
The duke, the wanderer, the philosopher, the mariner, the warrior, the strategist, the storyteller, the wizard, the wayfarer...

Scarlet

QuoteThen you need to add an anchor tag; put <a name=""> at the start of the title, just inside the <P> tag, and [/url] at the end after the final P tag.

In the example you give there is no [/url]. Is that supposed to go at the end of the entire file or after each one?
like a bruise that would never go away, but she would cherish it for ever.

gellthîr i melethron nîn

nínim in menil

Jubal

Sorry, should be
</a>

The forum was auto-changing it to [/url] as that's the BBCode equivalent.
The duke, the wanderer, the philosopher, the mariner, the warrior, the strategist, the storyteller, the wizard, the wayfarer...

Scarlet

Oh good, I picked right. That seemed logical. Now I don't have to change it all back!
like a bruise that would never go away, but she would cherish it for ever.

gellthîr i melethron nîn

nínim in menil