Perspectives of a Writer and Musician

Issues related to writing, publishing and playing jazz music: One man's muse.
by Al Stevens

My Photo
Name:
Location: Florida, United States

Wednesday, March 20, 2013

A Gearhead's Guide to E-book Publishing - Lesson 1: HTML

From Manuscript to HTML

You start by converting your book's word processor document—the book itself—to a raw HTML format. Here's the beginning of a story written in Word.



Note: The screen shots in this tutorial are blurry and not easy to read (for old eyes, anyway). That's just how the BlogSpot software renders images. It works okay for snapshots, but graphical illustrations lose some of their detail. Simply click on a screen shot image for a better rendering of a screen shot you need to see in more detail.

From your word processor

    1. Surround all italicized words and phrases with <i>...</i> tags which signify the beginning and ending of italicized text in html
    2. Save the book as raw text (.txt)
Here's how you'd do that in Word:

 
Make sure that lines end in CR/LF and that no line breaks are inserted.

Next you'll use Notepad++ to convert the text file to a raw html file
    1. Turn on "Show All Characters" (button w/ blue paragraph mark)
    2. Line breaks show as CRLF

    3. Use the Replace All command with Extended Search Mode selected
            Find what:        \r\n
            Replace with:   </p>\r\n<p>

The \r and \n sequences represent the CR (carriage return) and LF (line feed) characters in the text. If you are doing this with Word, you would use the More->Special->Paragraph Mark character in the Find/Replace dialog.
    4. Insert a <p> tag  at the beginning of the file
    5. Delete the <p> tag at the end of the file
 

The <p> and </p> tags indicate the beginnings and endings of html paragraphs.
    6. Save the file
    7. Rename the file with the file extension .html
You now have an incomplete html file of your book. You can click it to open your browser and read it that way.

There's a lot of work to be done, and the file lacks the <html>, <head>, <body>, and other tags that a well-formed html file needs. Those come later when you integrate the html file into an epub file, which starts in the next lesson.




Table of Contents
Introduction
Lesson 1: HTML
Lesson 2: Content
Lesson 3: Frontmatter
Lesson 4: Chapters
Lesson 5: Opening Paragraphs
Lesson 6: The Cover
Lesson 7: TOC, Metadata
Lesson 8: Epub Validation
Lesson 9: The Mobi (Kindle) Format

2 Comments:

Blogger Unknown said...

Your post is really works like a proper guide towards eBooks publishing. Authors and basic reader can be benefited with the knowledge. I read few posts on HTML Conversion but could not understand it properly, will you please tell me more on it?

9:34 AM  
Blogger Al Stevens said...

That's a book in itself. Google "html tutorials" and wade in. You shouldn't have to pay for a service to convert to and from html.

11:43 AM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home