EPUB Machine

(Your EPUB Formatting Butler)

Frank Sergeant

copyright © 2012-2014 Frank Sergeant

all rights reserved

published by Nepo Press (http://nepotism.net)

4th Edition, April, 2014

(formatted April 13, 2014 at 06:19 PM)

cover image credits:

- “Woman With Angle Grinder Spraying Sparks” (c) Can Stock Photo Inc. / jorgophotography http://www.canstockphoto.com/woman-with-angle-grinder-spraying-sparks-9093838.html

For Juliette

The companion book (Mobi Machine) was secretly dedicated to Amy. This book is dedicated to Julie, Amy’s darker sister. While Amy is writing and publishing for Amazon’s Kindle, Julie is very suspicious of eBooks, especially Kindle. She prefers to publish in a more universal format: EPUB. I love Amy and Julie, so I had to write a book for each of them.

About EPUB Machine

EPUB Machine (Your EPUB Formatting Butler) is the second of the three user manuals for the Nepo Press web-based book formatting system. We might call the system EPUB Machine when making EPUB files, Mobi Machine when making Mobi files, and PDF Machine when making “camera-ready” PDF files for printing paperback books. The same system does all three. This book focuses on how to make EPUB files (eBooks) for the Barnes & Noble NOOK and NOOK Apps, Kobo eReaders, Apple’s iBooks—just about every eReader except Kindle—showing you everything you need to know to get started. If you want to create EPUB eBooks, this is the book to start with.

For making Mobi files (for Amazon Kindle and Kindle Apps), start with Mobi Machine (Your Kindle Formatting Butler). These two manuals contain essentially the same information—once you have read one, you probably do not need the other. Pick based on whether your primary interest is EPUB or Mobi.

After you have read one of these manuals, you are ready to make eBooks, but you’ll probably want to read the third manual, Advanced Mobi and EPUB Machines, eventually. It covers advanced formatting techniques including how to make “camera-ready” PDF files for publishing and selling printed books through CreateSpace and Amazon.

For self-publishers, EPUB Machine hits the sweet spot with the best combination of high quality, low cost, ease of use, and flexibility.

What do you need? You need a computer with a web browser, a word processor or text editor, an internet connection, and a Nepo Press book account at nepotism.net/formatting (you can start with a free trial account). You don’t need to install any software. Your same manuscript will work for Mobi files, EPUB files, and PDF files, giving you “one-stop” formatting with nearly instant turn-around. Format your books on your schedule, not someone else’s. No limit to the number of revisions, so fixing typos or changing your list of “Other Books by This Author” can be done whenever you wish.

If you are using the Nepo Press service, or planning to use it, this is the “missing manual” to help get you oriented and up to speed quickly.

The trick is to add simple, visible markup to your manuscript then feed that to the EPUB Machine. The result is a professional looking eBook, without the formatting errors so commonly seen in self-published books.

Table of Contents

- Dedication

- About EPUB Machine

- Preface to the Fourth Edition

- Note to Readers

- Introduction

- Chapter 1 -Your Manuscript

- Chapter 2 - Writing a Novel From Scratch

- Chapter 3 - Working With An Existing Manuscript

- Chapter 4 - Running The EPUB Machine

- Chapter 5 - Additional Notes

- Boxes

- Comments

- Drop Caps

- Ellipsis Marks

- Emphasis

- Forcing Line Breaks

- Hyphens and Dashes

- Images

- Indentation

- Manuscript Directories

- Mono-spaced Fonts

- Paragraph Alignment

- Quote Blocks

- Quote Marks and Smart Quotes

- Scene Breaks

- Small Quotes

- Appendix A - How to Get Your eBook To Your eReader

- Appendix B - Publishing Your eBook

- Appendix C - Tips

- Quotes curl in the wrong direction

- Tags incorrectly combined with body of paragraph

- Backing up your work

- Reading in a web browser

- Distributing the HTML version of your book

- Printing a hard-copy of your manuscript

- Word processor versus text editor

- Appendix D - List of Tags

- Appendix E - Word Processor Settings

- Appendix F - Windy Day Manuscript

- Notes and References

- About the Author

Preface to the Fourth Edition

The EPUB Machine has gone through several stages of evolution.

The first generation required an author to (a) download, install, and configure several pieces of software, and (b) switch from a word processor to a text editor.

Gentle (and not so gentle) feedback suggested that authors did not enjoy either requirement, although there were exceptions.

In the next generation, we eliminated the need to switch to a text editor, but the burden of installing the software remained.

Finally, in the current generation, that burden has been lifted. Instead of every author installing the software on his local machine, we install the software on the Nepo Press server. Now an author uploads his manuscript through a web browser, clicks a button, and downloads the resulting EPUB file.

This has the additional advantage that the author never needs to re-install software to upgrade the system. We do all of that in a central location. The next time the author connects to the web site, the new software is available automatically.

We wanted to make the Nepo Press formatting service as close to “one-stop formatting” as possible. Previously, an author could make both Mobi files (Amazon Kindle) and EPUB files (B&N, Apple, Kobo, etc.), but what about paperback books? The current generation solves that problem also. The touch of a PDF button now produces a “camera-ready” PDF for publishing paperback books through CreateSpace.

So, the EPUB Machine is also a Mobi Machine and a PDF Machine, but the focus of this book is on making EPUB eBooks (for everything except the Amazon Kindle eReaders and Kindle Apps).

This is the very system Nepo Press uses to format its own books and we look forward to sharing it with you.

You will need a Nepo Press book account to use with this book. If you don’t have a book account yet, you can set up a two-week trial account for free. Email frank@nepotism.net with the exact title of your book and the author name (pen name or multiple authors are OK.)

Note to Readers

First, thank you! I appreciate your taking the time to consider the EPUB Machine system for creating eBooks.

The EPUB Machine is a dedicated EPUB file maker. It turns your manuscript into an EPUB 3 file suitable for reading on almost all eReaders and eReader apps except for the Amazon Kindle, or for publishing and selling on Apple, Barnes & Noble, Kobo, Smashwords, etc. As a by-product, it also makes an HTML version for reading in a web browser.

It not only makes an EPUB file, it automatically runs EpubCheck on it so you can be sure it meets the EPUB 3 standard, helping you to get your book accepted by Apple, B&N, etc., on the first try.

It is simple to use and produces great looking eBooks.

This is the system we use to format books for Nepo Press.

The secret is simple, explicit markup.

This book contains the manuscript for the fake mystery novel Windy Day as an example in Appendix F. More examples, FAQs, getting started guides, and videos are available at Nepo Press. In particular, you might like to look at the Sam Speedo (Bathing Suit Detective) example which shows the before (marked up manuscript) and the after (the eBook as a Mobi file, an EPUB file, an HTML file, and a “camera-ready” PDF for printed books).

See http://nepotism.net/formatting.

Types of (e)Books

The main (e)Book formats are

- Mobi — Amazon Kindles and Kindle Apps

- EPUB — Apple, B&N, Kobo, etc. (everywhere except Amazon)

- PDF — print-on-demand paperback books (CreateSpace, etc.)

This book, EPUB Machine, focuses on making EPUB 3 files. It also makes HTML files (handy for quick proofreading in a web browser).

For making Mobi files, see the book Mobi Machine (Your Kindle Formatting Butler).

Once you have read one those books, you are ready for Advanced Mobi and EPUB Machines. It covers additional formatting techniques useful for EPUB and Mobi files and it also covers how to make “camera-ready” PDF files for publishing and selling printed books through CreateSpace and Amazon.

For printed books, the easiest, cheapest way for almost all authors is to submit a “camera-ready” PDF to CreateSpace. CreateSpace charges nothing at all for you to set up your book and then charges a reasonable fee per book (the books are printed one at a time “on demand”). “Camera-ready” is in quotes because no actual cameras are involved these days—it is straight from PDF to press.

See https://www.createspace.com/.

Why do we mention Mobi and PDF in a book about making EPUB files? Because your same manuscript can be used for all three purposes.

Samples

To see the quality of work this system produces, you can look at this book on your Kindle or NOOK or iPad, or you can look for the following Nepo Press titles at Apple, B&N, Kobo, Amazon:

- Examples

- Stormy Night (a fake mystery novel)

- Windy Day (a fake mystery novel)

- Sam Speedo (Bathing Suit Detective) (a fake detective novel)

- Real books

- America’s Junior Miss by Rebecca Radley

- Tree People by Rebecca Radley

- Quick and Dirty eBook Covers by Frank Sergeant

- Mobi Machine (Your Kindle Formatting Butler) by Frank Sergeant

- Advanced Mobi and EPUB Machines by Frank Sergeant

All of them were formatted by this system. See http://nepotism.net for a list of all the Nepo Press titles.

Getting Started

You can try out the system on the included sample novel Windy Day or you can start with a small excerpt—perhaps just a few chapters—from your own manuscript. Once you see how simple it is, you can then move on to your full manuscript. It doesn’t have to be a completed book. A rough draft is fine. If you don’t have an eBook cover image yet, feel free to use one of the following until your real cover image is available:

- http://nepotism.net/downloads/windy.jpg

- http://nepotism.net/images/place-holder-cover.jpg

We hope all questions (related to book formatting with Nepo Press) are answered in the three user manuals (EPUB Machine, Mobi Machine, and Advanced) plus the getting started guides, examples, FAQ, and videos at

- http://nepotism.net/formatting

- http://nepotism.net/videos

If we missed something, please email frank@nepotism.net so we can answer your question and also add it to the documentation so others can benefit.

Introduction

Suppose Bertie Wooster were to write a book. Do you think he would format it himself? No! He would get his butler Jeeves to do it for him.

The EPUB Machine is your EPUB Butler, and specializes in one task: converting your manuscript into an eBook readable on eReaders other than the Amazon Kindle.

The end result, the eBook, is an EPUB 3 file that you can publish on B&N, Apple, Kobo, etc., or view on your own eReader without publishing.

You can email the eBook to friends, beta readers, and reviewers.

EPUB Machine works fast, converting your manuscript into an eBook, typically in under one minute.

“Jeeves, here’s my manuscript. Format it for me, please.”

EPUB Machine is patient and will happily format your manuscript again (and again and again), whenever you wish, if you discover typos or if you improve your manuscript in other ways.

EPUB Machine is not really human. It is a software system that runs on the Nepo Press server.

Here are some of the things it does automatically:

- creates the visible, active, clickable table of contents

- creates the logical table of contents, which allows the reader to move from chapter to chapter with the left and right arrow keys

- handles page breaks between chapters

- creates clickable links to web pages (link to your other books or to additional information)

- embeds images (photos, figures, diagrams, etc.) including the eBook cover and the author’s photo

What kind of manuscripts can EPUB Machine handle?

EPUB Machine is very good at formatting conventional manuscripts such as:

- general fiction, including

- short stories

- novellas

- novels

- general non-fiction, including

- papers

- essays

- memoirs

- articles

- how-to guides

This book focuses on the simpler formatting styles. If you are writing a textbook or how-to guide that needs a more complicated formatting style, you’ll also probably want to read Advanced Mobi and EPUB Machines.

What kind of manuscripts aren’t suitable?

EPUB Machine is not well suited for fixed format books such as graphic novels and children’s books, or books that need lots of numbered lists. It doesn’t do tables (but that can be worked around using images or lists).

Examples

This book, EPUB Machine (Your EPUB Formatting Butler), was itself formatted entirely by EPUB Machine, so it should give you a good idea of how well it can handle a non-fiction book. To see examples of how it formats fiction, you can look at the three, short, example “novels” available from
http://nepotism.net:

- Windy Day

- Stormy Night

- Sam Speedo (Bathing Suit Detective)

The above are not real novels, just very short examples. The first two show the fake novel in the body of the book, along with the manuscript markup used to create it in an appendix. For the third, the manuscript is available for download as a template for use with your own book.

For various longer examples, see the other Nepo Press books.

However, as you follow along with this book, the very best example will be seeing your own manuscript turned into an eBook (whether finished or just a chapter or two).

What kind of computer do you need?

Any personal computer with a web browser and a text editor or word processor will work. All the heavy lifting is done by the Nepo Press server.

What computer skills do you need?

If you are using a computer to write your manuscripts, you probably know enough already, as the following videos show you exactly how to do the key tasks:

- http://nepotism.net/videos

How much effort is involved?

The whole idea is to produce a better result, with less work, by automating the conversion process.

Soon you will be able to produce a well formatted eBook at the touch of a button.

The basic formatting can be learned in about five minutes (see the chapter Writing a Novel From Scratch). Additional simple tags are available to give you even more control over the appearance of your book.

Right in your word processor, you mark your chapter headings and any words or phrases that should be in italics, and then add any additional markup. A later chapter walks you through this step by step. It takes no extra time when you start a manuscript from scratch. For an existing manuscript, the initial markup can take about 15 minutes to an hour or so (see our videos for tips on using search and replace to add markup automatically). For a typical novel, this is a simple step.

Unlike other systems, you do not need to use specific word processor “styles”, nor do you need to work directly with HTML.

When you are ready to format, you save a copy of your manuscript as a text file, upload it to Nepo Press using your web browser, then click the EPUB button.

But, that’s not all. In addition to producing an EPUB file, EPUB Machine also produces an HTML version of your book that you can view in a web browser, post to your website, or print out in hard-copy to make proofreading easier.

In the past, formatting a manuscript for an eBook involved either paying someone to do it (anything up to several hundred dollars) or spending many hours or days doing it manually. Or, you could upload your unconverted word processor document and accept a less than great looking eBook.

EPUB Machine gives you the best of both worlds: a great looking eBook with virtually no effort.

Chapter 1
Your Manuscript

Experience keeps a dear school,
but fools will learn in no other — Franklin

The general publishing process starts with your manuscript. In times past, you might have written it in longhand or on a manual or electric typewriter. Then you would send it to your editor or publisher. Eventually, hopefully, it would reach the typesetter who would turn it into a beautifully laid-out book.

As you were writing your manuscript, you would add notes or clues to it to communicate to the typesetter how you wanted different parts of your book formatted. You would underline words the typesetter should set in italics. The underlines would not appear in the printed book; they just served as clues to the typesetter.

Similarly, you would leave a blank line between paragraphs and start each chapter on a new page, centering its heading on a line by itself.

For a figure or diagram or photo, you would draw an arrow and put a note in the margin, “picture of author goes here.”

In this fashion, as you were writing, you would mark up your manuscript to give the typesetter the clues needed to format your book.

Note that this markup was visible to the naked eye. Of course it was; that was the only way to do markup in longhand or on a typewriter.

In our modern electronic era things have changed somewhat though not all that much. You use a computer now instead of a typewriter, but you still mark up your manuscript.

Unfortunately, if you write your manuscript in a word processor, the markup is now hidden rather than visible. The markup is still there, though. You see its effects on the computer screen (words in different font sizes or in different typefaces) but you don’t see the actual markup.

The hidden nature of the markup often causes trouble when you try to convert your manuscript to an eBook. Even though what you see on your word processor screen might look OK, that is not what the conversion program will see when it formats your book. The conversion program sees only the internal, hidden markup—and that might be such a mess that the conversion fails or looks bad on an eReader.

Most of us have seen eBooks that look funny. Their formatting is off somehow. New chapters start in the middle of a page or at the bottom of a page instead of on a new page. Paragraphs break in the middle for no apparent reason. Words that looked separate in the word processor are now run together in the eBook. The “go to” menu doesn’t work right. The logical table of contents doesn’t work. Curly quotes face the wrong direction. Funny line breaks. Fonts hard-coded at the wrong size.

If you haven’t noticed such problems, just download 10 or 20 eBooks at random from Amazon or B&N or Apple. If you don’t want to purchase 10 or 20 titles just for this experiment, you can find free eBooks listed at sites such as

- http://pixelofink.com

- http://freebooksy.com

- http://www.freebooks.com/promotions/

- http://www.freebookdude.com/

or you can go directly to Amazon, B&N, and Apple and search for them yourself. These books are typically only temporarily free, so I think this is still a valid test. I bet at least a third (and maybe half) will have formatting problems.

EPUB Machine helps make sure that your eBook won’t have such problems.

EPUB Machine, just like the typesetter of old, needs to work from a manuscript that is properly marked up. Furthermore, it needs the markup to be visible. This is better for the formatter and better for you also. With plain, visible markup, you say what you mean. You don’t have to guess what the word processor is doing behind your back.

Later chapters will go into detail about the markup you can use with EPUB Machine, but here is a quick example of the three most used marks:

- use a blank line to separate paragraphs, just like you would have done with a typewriter. Extra blank lines are OK, as they will be ignored. Indent paragraphs or don’t, it doesn’t make any difference.

- put an asterisk (followed by a space) at the beginning of a line to indicate a chapter heading, followed by the chapter’s title. The asterisk won’t appear in the eBook—it just tells EPUB Machine “this is the heading for the new chapter”.

- indicate italics by surrounding the word or phrase with asterisks (*like this*). Again, the asterisks themselves will not appear in the eBook but the word or phrase will be set in italics (like this).

The bulk of your markup work will consist of blank lines to separate paragraphs, plus asterisks for chapter headings and italics.

The big idea is that you maintain your book (your manuscript) in a format that is easy to work with, using simple, straightforward, visible formatting symbols. EPUB Machine then renders your manuscript into an eBook automatically.

If you are writing your book in a word processor, it will likely already have chapter headings set in a larger font, possibly centered, and will have various words set in italics. You do not need to undo that formatting. Just add the asterisks as described above and in chapter 2. EPUB Machine basically ignores your word processor’s hidden markup and pays attention to your explicit markup.

Chapter 2
Writing a Novel From Scratch

Down to Gehenna or up to the Throne,
He travels the fastest who travels alone. — Kipling

This chapter shows how to mark up a novel from scratch.

Of course, as an author, you probably are not starting from scratch. You have probably finished (or at least begun) one or more manuscripts. Your main question may be how to mark up those existing manuscripts. We’ll get to that in the next chapter, but it will make it easier to understand the markup if we start from scratch.

So, let’s jump right into creating a manuscript, a very short mystery novel entitled “Windy Day”. This is not a serious novel; its entire purpose is to illustrate how to format a novel for EPUB eBooks.

First, start your word processor or text editor. We’ll assume you are using a word processor (such as Microsoft Word or LibreOffice) but you could also use a text editor (such as gedit or Notepad or Emacs). EPUB Machine works either way.

The first thing to do after starting your word processor, is to turn off various auto-format options (such as automatic smart quotes and automatic lists). This will need to be done only once. Please see Appendix E for instructions on how to do this.

Since we are starting a new file, click on File / New then just start typing.

The lines in the example below are very short on purpose, so they show up clearly on a narrow eReader. The widths of the lines in the example (and in your word processor) have nothing to do with how long the lines will be in the finished eBook. The eReader adjusts the line widths according to the settings chosen by the (human) reader.

As you are typing paragraphs, let the word processor break the lines wherever it wishes, but be sure to put in the blank lines as shown.

Please go ahead and type the following into your word processor now. Then, save it (File / Save) as windyday.doc, then we’ll go over each piece of it.

<publisher> Nepo Press

<cover> windy.jpg

#### title page

<align> center

* "Windy Day"  ""

***

by Frank Sergeant

#### copyright page

*

******

copyright <copy> 2012-2014 Frank Sergeant

all rights reserved

Published by Nepo Press (http://nepotism.net)

<align> default

<contents>

* Acknowledgments

I would like to thank ...

<start>

* Chapter One

It was a dreary windy day.

I trekked along the forest
trail dragging my burden and
carrying a shovel.

The crows criticized every step
I took. I screamed at them that
it wasn't my fault, but that
didn't help.

*How did I get into this
mess?*, I wondered.

* Chapter Two

I found a secluded spot, threw
down the heavy bag, and started
to dig the grave.

* Chapter Three

Walking back home was easier---just
the shovel and the empty bag. I
shuddered as the wind picked up
and wondered if I would be able
to sleep tonight. It's not like I
haven't done this sort of thing
before.

<scene>

Later that night ...

* Epilogue

I thought it had all worked
out until I heard the police
detective's knock on my door.

* About the Author

<image> "frank.jpg" "Frank Sergeant"

http://nepotism.net

There you have it, an entire novel. Markup can do a lot more, but this illustrates how simple it can be. Let’s dissect this example to see how the different parts of the markup work.

Boilerplate

The manuscript starts with some “boilerplate” tags to specify the publisher and the image file to use for the cover. Each of these tags starts at the left margin and has a blank line before and after it.

Paragraph Separators

The point here is that each of these boilerplate “lines” is really a separate paragraph. In a word processor, you end a paragraph by pressing the Return or Enter key, and the word processor shows what looks like a blank line between paragraphs. In a text editor, you end a paragraph by pressing Return or Enter at least twice, thus explicitly adding a blank line.

The <publisher> tag is optional.

<publisher> Nepo Press

<cover> windy.jpg

The <cover> tag tells EPUB Machine which image file should be used for your cover image. For your own book, you would need to create your cover image somehow (possibly with the help of Quick and Dirty eBook Covers from Nepo Press) then upload it to your book account.

If the cover image is missing, you will get a warning message, but the EPUB file will still be created.

If you don’t have a cover image to use yet, you can download a copy of the file windy.jpg to use temporarily. See the YouTube video “How to Download an Image File to Your Computer” if you need help:

- http://nepotism.net/downloads/windy.jpg

- http://nepotism.net/videos

Alignment (justification)

Because I would like both the headings and contents of the title page and the copyright page to be centered, I put an <align> center tag before the title page, like this:

#### title page

<align> center

* "Windy Day"  ""

The <align> center tag tells EPUB Machine to switch from the default justification to center justification. This will remain in effect throughout the manuscript unless or until another <align> tag is encountered.

Note the line that begins with a pound sign:

#### title page

A line that begins with a pound sign (or more than one pound sign as in this example) is a comment and will be ignored. You can use this to put notes to yourself that won’t appear in the eBook.

After the copyright page, I want to return to the default justification, so I put an <align> default tag after the copyright page, like this:

all rights reserved

Published by Nepo Press (http://nepotism.net)

<align> default

<contents>

Again, note that all these tags start at the left margin and have one or more blank lines both before and after (that is, each tag is in a separate paragraph).

Unless you override it, the EPUB eReader’s default will be used. This will be either full justification (to line up both the left and right margins) or left justification (to line up the left margin and leave the right margin ragged).

As seen above, we did override it, temporarily, by using the <align> center tag. The other alignment choices are <align> left, which left justifies and leaves the right margin ragged, and <align> right, which right justifies and leaves the left margin ragged. Paragraph alignment is discussed further in the Paragraph Alignment section of chapter 5.

The title page

Now let’s look at the title page in more detail:

* "Windy Day"  ""

***

by Frank Sergeant

We treat it like a chapter, so the heading must begin with an asterisk at the left margin, followed by a space. This is followed by two items of information. The first, "Windy Day", is the heading that will appear at the top of the title page. The second, "", is how it will be listed in the table of contents. When the second item is empty, as in this example, it won’t be listed in the table of contents at all. If we had omitted the second item of information altogether (rather than specifying it as an empty item), the heading on the title page and the listing in the table of contents would both say “Windy Day”.

Note the role of the quotation marks: they group and separate the two items of information. If the quotation marks were omitted, like this

* Windy Day

EPUB Machine would treat the whole line as the chapter heading and put “Windy Day” both at the start of the title page and in the table of contents, which is not what we want. (Note that these quotation marks must be straight quotes ("like this") and not curly (“like this”)—that’s why we turned off the word processor’s option that would otherwise turn straight quotes into smart quotes (as mentioned above and described in Appendix E).

Fortunately, most chapter headings are not this complicated. Usually, just the title page requires the two items of information (and thus the quotation marks).

Here is the title page once again:

#### title page

* "Windy Day"  ""

***

by Frank Sergeant

Notice the three asterisks on a line by themselves. This is another heading (a level three heading).

A heading with a single asterisk is a major heading (a level one heading). This is used for chapters (and things we treat like chapters, such as title pages, copyright pages, acknowledgments). If you divide your book into Parts and Chapters, you would use a level one heading (one asterisk) for the Parts and a level two heading (two asterisks) for the Chapters. If you use only Chapters, you would use a level one heading for the Chapters and would not use level two headings at all.

Both level one and level two headings will cause their chapters to start on a new page, just as we are used to seeing in printed books. Also, level one and level two headings will appear in the table of contents and in the logical table of contents. (The logical table of contents allows the reader to move backward or forward a chapter at a time by whatever mechanism the eReader provides, such as by pressing the left and right arrow keys.)

Three asterisks (at the left margin) indicate a level three heading. This will not cause a page break. Its heading (if not blank) will appear in the body of the book, but not in the table of contents.

So, why are we using a blank level three heading on the title page? It serves two purposes. First, it adds a little vertical space to make the layout more pleasing. A side effect is that it temporarily turns off drop caps so “b” in “by Frank Sergeant” will not appear as a drop cap. By default, the first letter of a chapter is set as a drop cap, but that would look strange on a title page.

The copyright page

Next, let’s look at the copyright page. It is similar to the title page, but with a few differences:

#### copyright page

*

******

copyright <copy> 2012-2014 Frank Sergeant

all rights reserved

Published by Nepo Press (http://nepotism.net)

and it would look like this

copyright © 2012-2014 Frank Sergeant

all rights reserved

Published by Nepo Press (http://nepotism.net)

First, the heading is a blank level one heading:

*

This is because we do not want any sort of a heading to appear on the copyright page itself and we do not want it listed in the table of contents. However, we do want it to begin on a new page.

As with the title page, we use a blank subheading (a level six heading this time) to provide a little vertical spacing and as an easy way to turn off drop caps.

The next-to-last thing of interest on the copyright page is the <copy> tag. This is the first tag we have used that does not start at the left margin. It is a tag that can be used within a paragraph. EPUB Machine will replace the <copy> tag with the copyright symbol ©.

Finally, note the last line:

Published by Nepo Press (http://nepotism.net)

It shows how to link to an external website. It will be turned into an active link so that when the reader clicks on it (if connected to the Internet), the eReader or eReader App will open that page in a web browser.

The table of contents

After the copyright page and after the optional <align> default tag, we indicate to EPUB Machine where we want the table of contents to appear like this:

<contents>

You can put this line wherever you wish in your manuscript (as long as it starts at the left margin and has a blank line before and after it). It is common to put it somewhere near the beginning of your book and that is what Amazon suggests in its guidelines. If you have a particularly long table of contents, some people suggest putting it near the end so that it does not take up valuable space in the downloadable sample (else your prospective reader might not get to the meat of your book before reaching the end of the sample).

The acknowledgments page

Then, we have an acknowledgments page that looks like this:

* Acknowledgments

I would like to thank ...

This is just an ordinary chapter. Its title has a single item of information because we want the same heading to appear both on the acknowledgments page itself and in the table of contents. Thus, we don’t need quotation marks like we did on the title page.

Also, we have not added an empty level three heading because we don’t need any extra vertical space and we are happy for the first paragraph on this page to start with a drop cap.

The acknowledgments page is optional. Similarly, you could add Dedication, Prologue, Foreword, and About the Author chapters if you wish.

Where should your book start?

We can give a hint to the eReader as to where the book should open for the first time by inserting a <start> tag like this:

<start>

* Chapter One

to ask that the eReader start the book at Chapter One when the reader first opens the book.

This tag is optional.

Sample chapter one

Here is our novel’s chapter one:

* Chapter One

It was a dreary windy day.

I trekked along the forest
trail dragging my burden and
carrying a shovel.

The crows criticized every step
I took. I screamed at them that
it wasn't my fault, but that
didn't help.

*How did I get into this
mess?*, I wondered.

The only thing to note about the chapter heading is that, since we want the same heading in the body of the book and in the table of contents, we have provided only a single item of information (even though it has multiple words) and thus we do not need to use quotation marks.

This chapter has multiple paragraphs (in this case, four paragraphs). A paragraph, like a heading, must have one or more blank lines before and after it.

So far, we have used asterisks (at the left margin, followed by a space) to indicate headings. But take a look at the last two lines of text in chapter one. The pair of asterisks surrounding “How did I get into this mess?” tell EPUB Machine to set that phrase in italics.

*How did I get into this
mess?*, I wondered.

The first of the two lines starts with an asterisk but is not a heading. EPUB Machine knows this because, although the asterisk happens to start at the left margin, it is not followed by a space.

Of course, italicized words or phrases can appear anywhere in your paragraphs.

Scene breaks (space breaks)

The example’s Chapter Three shows how to insert a vertical space break to separate scenes using the <scene> tag.

* Chapter Three

Walking back home was easier---just
the shovel and the empty bag. I
shuddered as the wind picked up
and wondered if I would be able
to sleep tonight. It's not like I
haven't done this sort of thing
before.

<scene>

Later that night ...

This is commonly used to give the reader a hint that the location, or time, or viewpoint character has changed by providing a little extra vertical spacing and to reset the indentation so the first line of the next paragraph will not be indented. (In fiction, ordinarily, first paragraphs have no indentation, but following paragraphs do.)

The above example would look like this:

Chapter Three

Walking back home was easier—just the shovel and the empty bag. I shuddered as the wind picked up and wondered if I would be able to sleep tonight. It’s not like I haven’t done this sort of thing before.

Later that night …

If you would like to show a symbol, such as a tilde or some asterisks, instead of a blank line, you could replace the scene tag in the above example with

<scene> ~

or

<scene> ***

The <scene> tag is discussed further in the Scene Breaks section of chapter 5.

Keep in mind that if you have lots of scene breaks to mark in an existing manuscript, you should consider using your word processor’s search and replace facility rather than straining your eyes to find them all.

The above examples would look like the following:

Chapter Three

Walking back home was easier—just the shovel and the empty bag. I shuddered as the wind picked up and wondered if I would be able to sleep tonight. It’s not like I haven’t done this sort of thing before.

~

Later that night …

or

Chapter Three

Walking back home was easier—just the shovel and the empty bag. I shuddered as the wind picked up and wondered if I would be able to sleep tonight. It’s not like I haven’t done this sort of thing before.

***

Later that night …

Sample chapter two, and the epilogue

Chapter two and the epilogue don’t introduce anything new. They are included just to flesh out the novel.

About the author

The last chapter shows how to embed an image in the book and also how to put in a link to a web page.

* About the Author

<image> "frank.jpg" "Frank Sergeant"

For a list of Frank's other books
published by Nepo Press, please
visit http://nepotism.net.

The <image> tag contains two items of information. The first ("frank.jpg") is the file name for the image. The second ("Frank Sergeant") is the caption that will appear under the image.

The above example would be rendered like this:

About the Author

Frank Sergeant

For a list of Frank’s other books published by Nepo Press, please visit http://nepotism.net.

What you can leave out

Now we have covered the most important markup. Pretty simple, right? We used

- asterisks to mark chapters (and subheadings) and italics;

- a <cover> tag to specify the cover image;

- an optional <publisher> tag;

- a <copy> tag to insert a copyright symbol;

- a <contents> tag for the Table of Contents;

- several <align> tags to switch to centered and then back to the default;

- a <start> tag to tell the eReader where to open for the first time;

- a <scene> tag to mark a scene break; and

- an <image> tag to insert a photo of the author.

Let’s consider, though, what we didn’t need to worry about.

- We didn’t bother to indent the paragraphs. EPUB Machine handles indentation automatically as appropriate. You can indent the paragraphs if you prefer (EPUB Machine ignores any indentation). You can break the lines of a paragraph wherever you like (EPUB Machine ignores where the line breaks occur). The eReader takes care of wrapping the paragraph lines to suit the reader’s chosen font and line width.

- We didn’t insert page breaks. EPUB Machine takes care of forcing page breaks before each chapter and the eReader takes care of any other page breaks. Any page breaks inserted by the word processor are ignored.

- We didn’t worry about headers, footers, or page numbers.

- We didn’t need to do anything special to build either the visible or logical table of contents or the clickable links to external web sites.

Basic novel formatting is very easy. We’ve even covered things like centering certain paragraphs (as we did for the title page and copyright page) and including an image (the author’s photo or the book cover) and links to web pages. Other formatting is available and will be covered later in this book and also in the Advanced book. But, the markup we have covered so far is all the markup many novels would ever need.

Now that we have a sample novel written, you can skip ahead to Chapter 4 to turn it into an eBook. Alternatively, you can proceed to the next chapter to mark up an existing manuscript first.

Chapter 3
Working With An Existing Manuscript

Format early and often — Frank Sergeant

Now that you have a good idea, from the previous chapter, of how to mark up a new manuscript, you are probably ready to mark up one of your existing manuscripts.

Throughout this chapter, we will use the name windyday.doc to represent your existing manuscript. Of course, you must substitute the name of your manuscript.

It is a good idea to make a backup copy of your manuscript before starting to edit it, so you can fall back if necessary. For example, if your manuscript is named windyday.doc, you might use File / Save a Copy (or File / Save As) in your word processor’s menu to save a copy under a different name, such as windy-before-markup.doc.

The rest of this chapter will describe how to add the markup, but keep in mind that you don’t have to do it all right away. As soon as you have marked one or more chapters, you can format it as described in Chapter 4. Then, you can add more markup and format again.

Then, with windyday.doc open in your word processor, and the example in the previous chapter handy, type in the <publisher> tag and the <cover> tag, each on a separate line, with blank lines before and after. The <publisher> is optional. Even the <cover> tag is optional.

In other words, just follow the example from the previous chapter and apply the markup as appropriate to your own manuscript.

If you don’t want to list a publisher, just omit the <publisher> tag. Even if you don’t have a cover image yet, you probably will eventually, so you might as well put in the <cover> tag now. Feel free to use the Windy Day cover as a temporary cover for your book:

- http://nepotism.net/downloads/windy.jpg

Next, go through your manuscript to put an asterisk followed by a space at the start of each chapter, including title page, copyright page, etc.

If your existing chapter headings have been centered by your word processor, then you won’t be able to arrow leftward to the first column. That is no problem—just put the leading asterisk and space as far to the left as you can. You do not need to remove the centering (although you could). Just arrow leftward as far as you can and type the asterisk and space. So, if it looked like this before the markup:

Chapter One

then it would look like this afterwards

* Chapter One

Next, look through your manuscript for any words or phrases that are italicized or bolded and insert pairs of single asterisks (for italics) or double asterisks (for bold) around them. Note: since not all eReaders necessarily handle bold correctly, it might be better to stick with italics for emphasis.

Tip

Depending on your word processor, you may not need to scan for italics visually. Instead, your word processor might be able to search for italics automatically. For example, I did a Google search for the phrase “Microsoft Word how to search for words marked in italics”.

The first link it turned up was

- http://support.microsoft.com/kb/142749

which explained how to search for italicized words and phrases. Basically, you click on Replace then the Find tab, click in the “Find what” field, click on the Format button (you may need to click on the More button in order to see the Format button) then choose Font. From the Find Font window, in the “Font style:” list, choose “Italic”, then click OK. Finally, back in the Find and Replace window, just go through your document clicking on Find Next and adding the asterisks.

(The above web page mentions the Edit menu. Depending on your version of Microsoft Word, you might not have an Edit menu. In that case, click on the Home tab and look for the Editing pane near the upper right corner. If you don’t see the Editing pane, you may need to click the little arrow near the upper right corner (or press Ctrl+F1) to expand the “ribbon”.)

If you use a different word processor, do a similar web search, such as one of the following:

- Microsoft Word how to search for words marked in italics

- LibreOffice how to search for italics

- WordPerfect how to search for words marked in italics

You may need to vary the search string and, if worse comes to worst, you might need to read your word processor’s manual.

Also, it’s easy to mark italics, etc., in LibreOffice, because we have videos that show exactly how to do it. LibreOffice is free and it is easy to install. You can use it to mark the italics, etc., and then go back to your favorite word processor.

- http://nepotism.net/videos

- http://libreoffice.org

If you add the asterisks manually, by searching for italics visually, rather than letting your word processor search for italics, you may miss a few at this stage. This won’t hurt anything. You’ll be reviewing your manuscript from time to time, and as you notice an italicized word that is missing the asterisks, just add them.

Remember, put the asterisks tight against the word or phrase like this:

He had the *nerve* to **ask me my age**.

and not like this

He had the * nerve* to ** ask me my age **.

Next, look for any scene breaks and insert a <scene> tag. If you have marked all your scene breaks with a tilde, for example,

~

just change such lines to

<scene>         ~

Again, if the tilde was centered, you may not be able to move the cursor all the way to the left margin, so just put the tag as far left as it will go. It may wind up looking more like this:

<scene> ~

Make sure, as always for such tags, that a blank line comes before and after it (so that it is in its own paragraph).

And, one more tip for the <scene> tags: If you have tens or hundreds of scene breaks, you probably don’t want to hunt for them visually, one by one, so use your word processor’s search and replace facility.

The next step is to look for any images within your manuscript. Typically these show up on the screen when you view your manuscript in the word processor. Make a note of the file name of the image. You will need to upload each such image to your Nepo Press book account. (You may need to right click on the image and save it to disk). Once you know the file name for the image, add an <image> tag, such as

<image> "castle.jpg" "where I stayed on vacation"

You probably don’t even need to delete the image itself from the word processor, but you can do so later if necessary. Once you have the <image> tag in place, your manuscript no longer needs to have the image embedded in it.

Look once again at the sample novel in the previous chapter, or at the more extensive example in Appendix F, to see what other markup might be appropriate for your novel.

If you want a table of contents, decide where it should appear and add the <contents> tag like this:

<contents>

Add a <start> tag where you would like your book to open for the first time.

If you have a single level of chapters, make them all level one headings (using one asterisk). If you have multiple levels, such as Parts and then Chapters, use a level one heading for each Part and use a level two heading for each Chapter (using two asterisks).

Add <align> tags if you want some or all of the chapters or sections to have something other than the default justification. It is common to center the title page and perhaps some or all of the copyright page.

Adding the markup to your manuscript does not need to be done all at once, in one sitting. For example, on the first pass, you could just add an asterisk and space to every chapter title. Then you produce an EPUB file. Then you go back to mark the italics, and produce an EPUB file again.

Now that your manuscript is marked up, it is time to format it, as shown in the next chapter. After you see how it turns out, you can touch up the markup as necessary.

Later, you can browse through the Additional Notes chapter and the other Nepo Press books and examples for other tags such as <quote> (for block quotations), <smallquote> (for centered, shorter quotations, such as at the start of a chapter), <font> (for custom fonts, such as for chapter titles), and <box> (for sidebars or examples).

Chapter 4
Running The EPUB Machine

After marking up your manuscript or making changes to it, here is how you will run EPUB Machine to create an EPUB file.

- Save a temporary copy of your manuscript as a plain text file (skip this step if you are using a text editor instead of a word processor as your manuscript will already be a plain text file). The text file must have the exact name your book account is expecting.

- Upload the text file to your Nepo Press book account.

- Click on the EPUB button.

- Click on the Return to Book Page button.

- Click on the epubreport.txt file in the list of files to see if there were any errors or warnings. (If you don’t see that file in the file list, wait a few seconds then press the Refresh file list button.)

- Click on the web browser’s back button to return to your Book Page.

If there are no errors, the file list will now contain the new EPUB file and also an HTML version of your book.

The above steps will be described in more detail below.

Save as a temporary text file

From within your word processor’s menu, click on File / Save a Copy or File / Save As to save a copy of your manuscript as a temporary file ending in .txt. (If your manuscript is named windyday.doc, then name the temporary file windyday.txt.) If your word processor gives you a choice for the file encoding, select UTF-8. This saves a temporary copy of your manuscript as a plain text file, which is what EPUB Machine needs to work its magic. Note, regardless of the name of the .doc file, the .txt file must have the name your book account is expecting. This name is listed on your book account page. The point of this step is to be able to hand EPUB Machine a file that contains the explicit markup but without the hidden word processor markup.

If you are maintaining your manuscript in a text editor, this step will not be necessary, since your manuscript is already a plain text file.

This text file name (such as windyday.txt) must match exactly the manuscript name your book account is expecting. If you get the name wrong, you will get a message explaining the problem when you try to upload it. Just go back to your word processor and repeat the Save a Copy or Save As step, giving it the correct file name as specified in your book account.

Here are the specific details for Microsoft Word.

- Click on File / Save As in the menu to bring up the “Save As” window.

- Click on the “Save as type:” field to bring up the list of possible types.

- Click on the one that says “Plain text (*.txt)”. This will change the name of the file in the “File name:” field so it ends in .txt.

- Click Save. (If this isn’t the first time, you will get a warning that the text file already exists, so choose “Replace existing file” and press OK.) This leads to a “File Conversion” window that gives you a chance to change some settings. Go ahead and accept the defaults by clicking on OK.

- Now that you have saved your manuscript as a plain text file, close that file (File / Close) so you won’t mistakenly edit it.

If you are using LibreOffice or OpenOffice instead of Microsoft Word, the process is almost identical.

You are probably using their native file format odt. So, your manuscript may be named windyday.odt rather than windyday.doc, but this doesn’t make any difference. You still need to save your manuscript as a temporary plain text file (windyday.txt).

Here are the specific details for LibreOffice and OpenOffice.

- Click on File / Save a Copy to bring up the “Save As” window. (If your version doesn’t have that menu item, use File / Save As instead.)

- Click on the “Save as type:” field (or on the All Formats button, for some versions) to bring up the list of possible types.

- Choose the type that says “Text (.txt)”. Instead of that type, some older versions have a type that says “Text (.csv)”, which is really the same type hiding under a different name. In this case, you must uncheck the box that says “Automatic file name extension” so that you can add the “.txt” extension yourself. In any case, the end result you are after is a file named windyday.txt. If it winds up named windyday.txt.csv or just windyday, then you need to rename it to windyday.txt.

After saving a copy of your manuscript as a plain text file with the File / Save As menu item, take a look at the name of the file you are currently editing. This is usually shown in the title bar of the word processor’s window. If you had been editing a file named windyday.doc or windyday.docx or windyday.odt, the file now open in your word processor is probably the plain text version (with an extension of .txt). If so, close this file (File / Close) so you won’t accidentally edit the wrong file, then reopen the .doc or .docx or .odt version. This isn’t necessary with word processors (such as the recent LibreOffice) that have the File / Save a Copy menu item. If you did accidentally make extensive changes directly to the .txt version that you don’t want to retrofit into the .doc version, no problem, just keep editing the .txt version.

Because creating an EPUB file is so easy with EPUB Machine, you do not need to wait until your novel is finished. You can format it early and often.

At the same time EPUB Machine creates the EPUB file (such as windyday.epub), it also creates an HTML file (such as windyday.html) that you can view in a web browser.

Why both? Sometimes you just want a quick idea of how your novel will look. The web browser is perfect for this.

Sometimes you want to print a hard copy of your novel for proofreading (or for handing to a beta reader). The HTML version is good for this, although you may prefer to print the PDF version. The printed version even respects your chapter page breaks.

Other times, you want to see your novel on a real eReader (for proofreading or just the sheer pleasure of it). In that case, download the EPUB file (windyday.epub) to your computer, plug in your eReader and drag the EPUB file to it. Search on YouTube for something like “NOOK sideloading” or “Kobo sideloading” or see the YouTube videos (where we show how to do it for the Kindle):

- http://www.youtube.com/user/nepopress or

- http://nepotism.net/videos.

Check the output for errors or warnings

As soon as you click on the EPUB button on your book account page, the previous versions (if any) of windyday.epub, windyday.html, and epubreport.txt will be deleted. When the formatting is finished, the new versions will be present. When you return to your book account page, if you do not see epubreport.txt in the list of files, wait a few seconds then click the Refresh file list button. It typically takes well under a minute to finish the formatting.

Once epubreport.txt is present in the list of files, click on it to view it in your web browser to see if there are any warning or error messages.

Dealing With Errors and Warnings

If EPUB Machine notices a problem when processing your manuscript, it will show a warning or error message in the epubreport.txt file and, where appropriate, the error or warning will give some context information to help you locate the corresponding section in your manuscript.

Here is an example of a warning. Suppose you wanted to set some words in a mono-spaced font using the <ex> tag but forgot to put in the ending tag. (These tags are covered in the Mono-spaced Fonts section of chapter 5.) That is, you should have written

This is an example of <ex>mono-spaced
text</ex>.  Notice how it looks.

but instead you left off the ending tag like this

This is an example of <ex>mono-spaced
text.  Notice how it looks.

The warning message would look like this.

Warning: <ex> tag found with no ending </ex> tag.
Rest of paragraph will be treated as if it ended with an </ex> tag.
Manuscript context begins: 'This is an example of <ex>mono-spaced te'

That’s only a warning, so it would not prevent an EPUB file from being created, but a little too much of that paragraph would be mono spaced. That’s an easy error to fix. Go right to the problem by searching your manuscript for the offending paragraph that begins with the context shown in the error message. In this example, you would search for ‘This is an example of …’, or else search for the <ex> tag.

Work flow

Your typical day to day work flow will be

- edit your manuscript (in your word processor), saving it as a .doc or .docx or .odt file,

- “save a copy” or “save as” your manuscript to a temporary .txt file,

- upload the .txt version to your book account page at Nepo Press,

- click the EPUB button,

- check epubreport.txt for any errors or warnings,

- proofread your book (as the HTML version in a web browser or by downloading the EPUB file), making any corrections to your manuscript in your word processor,

Repeat above steps until your book is ready to publish.

Later, after you have released your book to the world, you might discover a typo or misspelled word. So, even after your book is “finished” and published, you may occasionally need to make corrections or improve it. These later changes are easy; just edit your manuscript, save-as text, upload to your book account page, click the EPUB button, etc. When you are happy with your revised book, upload the new EPUB file to B&N, Kobo, Apple, etc.. Booksellers typically allow you to upload revisions at any time.

Chapter 5
Additional Notes

We have now covered the essential markup. That’s all you really need to produce an EPUB file for the typical novel.

But, EPUB Machine can do even more than the basics. This section adds some further details about the markup available and discusses a few other topics that might be of use.

Boxes

If you want to wrap one or more paragraphs inside a box, use the box tags. This would be useful for emphasizing a note or creating the functional equivalent of a side bar.

Just put a <box> tag at the beginning of the section to be boxed and put a </box> tag at the end.

This causes a visible border to be drawn around the section.

<box>

First paragraph of a sample.
It continues here.

Second paragraph of a sample
block.

</box>

and would be rendered like this:

First paragraph of a sample. It continues here.

Second paragraph of a sample block.

These sorts of block tags have an opening tag (such as <quote> or <box>) and a closing tag (such as </quote> or </box>). (Quote tags are discussed in a later section.)

Each must begin at the left margin, on a line by itself, and have blank lines before and after. They cannot be used within a paragraph.

Both box blocks and quote blocks will have their paragraphs wrapped to fit the eReader. This wrapping is independent of where you make the lines break in your manuscript, unless you add <break> tags (discussed later, see Forcing Line Breaks).

Comments

You can put notes to yourself in your manuscript by writing them on lines that start with a pound sign (#). Such lines will not appear in your eBook.

Sammy grew wings and
flew to the moon.

# Note to self
#  I need to make this
#  character more believable.

A line beginning with a pound sign is a comment. A pound sign anywhere but at the start of a line is just a pound sign. Note that the comments are separated from the previous paragraph and the following paragraph by blank lines.

Drop Caps

By default, the first character of the first paragraph of each chapter will be set as a “drop cap”. We use a fake drop cap by making the character larger but not lowering it. We could also turn it red if we wished. All this is adjustable in the style sheet, as described more fully in the Advanced book.

However, the drop cap formatting is applied only if the first character is an ordinary letter or number. If the first character is punctuation or a special character of some sort, then drop cap formatting will not be applied to it automatically.

The following will turn off drop caps:

<dropcaps> off

If you don’t want any drop caps, turn them off near the top of your manuscript. If you want to turn off drop caps just for a chapter or so, turn them off before the chapter and turn them back on afterwards like this.

<dropcaps> off

* Dedication

...

<dropcaps> on

* Preface

The automatic drop cap applies to the first character of the first paragraph immediately following a level one or level two heading, that is, the first character in a chapter. If a subheading (or certain other things, such as a quote block) appears prior to the first paragraph, then no drop cap will be applied.

You might also have trouble if the first paragraph of a chapter starts with italics, as in

*What am I doing with my life?* she
wondered as she ...

Because it starts with an asterisk rather than a letter, the “W” will not be set in a drop cap automatically. You can force it with the <dc> tags discussed elsewhere or you can just skip the first character and italicize the rest of the phrase, like this:

W*hat am I doing with my life?* she
wondered as she ...

A quick way to turn off drop caps for, say, the title page or copyright page, is to put a subheading of some sort before any other text. Even a blank subheading will work. For example:

*

***

copyright <copy> 2012 Nepo Press
...

or even

*

*** copyright <copy> 2012 Nepo Press
...

Ellipsis Marks

Three dots (periods) in a row (...) are converted to an ellipsis (…).

The Chicago Manual of Style suggests three separate dots separated by spaces. If you do it that way, EPUB Machine will not covert them into an ellipsis character. Because this runs the risk of a line breaking in the middle of an ellipsis mark, which looks funny, we suggest using the three dots without spaces (which will get converted into a ellipsis character), thus avoiding the line breaking problem.

Emphasis

Several forms of emphasis can be used in your manuscript:

- italics

- bold

- bold italics

Usually, the only emphasis you need is italics.

Italics

A single pair of asterisks, such as

*single* word or *several words*

indicate italics. Note that the asterisks are tight against the word or phrase. There must not be a space immediately after the starting asterisk or immediately before the ending asterisk.

The above example would look like:

single word or several words

Bold

A double pair of asterisks, such as

**single** word or **several words**

indicate a bold font and would look like the following (if you don’t see the bold, then your eReader doesn’t support bold—a good reason to stick to italics for emphasis):

single word or several words

Again, the asterisks are tight against the word or phrase. Don’t write it like this:

** this**

or

**this **

Also, if you really need it, you can use a pair of triple asterisks to indicate both bold and italics. This is usually overkill.

Here is an example that applies all three types of emphasis:

"Did you *really* do that?" asked
the boy.

"Yes, I *really did*," replied
the girl.

*I can't believe she did that*,
thought the boy. "**Wow!**  That
was very **bold** of you," he said.
"I would ***never*** do that."

and it would look like this

“Did you really do that?” asked the boy.

“Yes, I really did,” replied the girl.

I can’t believe she did that, thought the boy. “Wow! That was very bold of you,” he said. “I would never do that.”

Note the difference between using asterisks for headings and using them for emphasis:

- in a heading, the asterisk always starts in column 1 and there is always a space after the asterisk(s)

- in an emphasized word or phrase, there is never a space after the beginning asterisk(s) and never a space before the ending asterisk(s). Here are some examples showing the correct and incorrect use of asterisks for italics:

This is *very good*.
This is * not good*.
This is *not good *.
This is * not good *.

The above would be rendered like this:

This is very good. This is * not good*. This is *not good *. This is * not good *.

Because a heading always has a space following the asterisks and because emphasized text never does, EPUB Machine is able to tell what is or is not a heading, even when the asterisks start at the left margin.

*** This is a subheading

*This* is not a subheading, (no space)

Here is a ***bolded and italicized
phrase*** split across two
lines---no problem.

The above example would be rendered as follows:

This is a subheading

This is not a subheading, (no space)

Here is a bolded and italicized phrase split across two lines—no problem.

Forcing Line Breaks

Sometimes you might want to force a line break without starting a new paragraph. This can be useful in headings and in quotations.

Most of the time, you should let the eReader determine where your lines break. Sometimes, though, you want a little more control. The <break> tag forces a line break.

Suppose you have a long chapter heading such as “Chapter 17 The Missing Ugly Green and Purple Parrot from Chicago”. If you write it this way

* Chapter 17
The Missing Ugly Green
and Purple Parrot
from Chicago

as you could in a text editor, it is the blank line that marks the end of the paragraph.

In a word processor, the above would be written more like the following:

* Chapter 17 The Missing Ugly Green and Purple Parrot from Chicago

that is, you would not press the Enter key until after typing “Chicago”. In a word processor, it is the Enter key (the Return key) that marks the end of a paragraph.

However, the rendered version in the eBook would likely be too long to fit on a single line on some (most) eReaders. The eReader would break the title somewhere but it might not be where you’d like it.

The example above would be rendered like this:

Chapter 17 The Missing Ugly Green and Purple Parrot from Chicago

Instead, you can use the <break> tag like this (in a text editor)

* Chapter 17 <break>
The Missing Ugly Green <break>
and Purple Parrot <break>
from Chicago

or like this (in a word processor)

* Chapter 17 <break> The Missing Ugly Green <break> and Purple Parrot <break> from Chicago

which would force line breaks where you want them and would be rendered like this:

Chapter 17
The Missing Ugly Green
and Purple Parrot
from Chicago

Suppose you want to quote some poetry. The locations of the line breaks are important, so rather than just letting the lines wrap, you would insert <break> tags at the appropriate places, such as in the poem “Antigonish” by William Hughes Mearns.

<quote>

Yesterday, upon the stair, <break>
I met a man who wasn’t there  <break>
He wasn’t there again today  <break>
I wish, I wish he’d go away...

</quote>

The above has three paragraphs:

- the beginning <quote> tag

- the poem itself

- the ending </quote> tag

Again, note that the above is how it would be written in a text editor. In a word processor it would look more like this:

<quote>

Yesterday, upon the stair, <break> I met a man who wasn’t there  <break> He wasn’t there again today  <break> I wish, I wish he’d go away...

</quote>

In either case, it would be rendered like this

Yesterday, upon the stair,
I met a man who wasn’t there
He wasn’t there again today
I wish, I wish he’d go away…

For poetry, instead of using the <quote> tags and the explicit <break> tags, you could use the <poetry> tags instead, like this:

<poetry>

Yesterday, upon the stair,
I met a man who wasn’t there
He wasn’t there again today
I wish, I wish he’d go away...

</poetry>

and it would be rendered like this:

Yesterday, upon the stair, I met a man who wasn’t there He wasn’t there again today I wish, I wish he’d go away…

However, the <poetry> tags probably won’t be entirely satisfactory unless you are using a text editor.

Hyphens and Dashes

The hyphen (-) has several uses. A single hyphen is rendered as a hyphen. Two hyphens are rendered as an en dash (–). Three hyphens are rendered as an em dash (—). A line that starts with four or more hyphens is rendered as a rule (a horizontal line).

He was ex-military
looking for part--time
work---I think he said
`work'---but I am not sure.

----

and would look like this

He was ex-military looking for part–time work—I think he said ‘work’—but I am not sure.

Images

The <image> tag can be very simple. All you have to give it is the file name of the image.

<image> frank.jpg

The above example would look like this:

However, you can also supply a caption if you wish. If you supply more than just the file name, then each item must be in double quote marks (straight quotes, not curly quotes—turn off your word processor’s auto-format options if necessary). The second item of information is the caption.

<image> "frank.jpg"  "the author"

and it would look like this

the author

The third item of information is the credit. Suppose the photo had been taken by Newman Studios

<image> "frank.jpg" "the author"
"photo by Newman Studios"

photo by Newman Studios

the author

Note that the image itself does not need to go in your manuscript directly, only the image tag. The image itself must be in a separate file, and needs to be uploaded to your Nepo Press book account. If your word processor has embedded your images in your manuscript (if you see the pictures in your manuscript), you may delete them from the word processor, leaving just the <image> tags as shown above.

You do not need to upload these image files separately to B&N, Apple, etc., as EPUB Machine bundles the images into the EPUB file, so all you need to do is upload the EPUB file.

However, the image files do need to be in the same directory as the HTML version of your book (e.g., windyday.html). This happens automatically when you view the HTML directly from your book account. However, if you download the HTML file to post it elsewhere, you must also put the image files in the same location.

Note the difference between the <image> tag and the <cover> tag. The cover image is special because it will appear inside your eBook and you will upload it separately to your bookseller. That is, when publishing your book, you typically upload both the EPUB file and the cover image. You might use two separate cover image files, depending on the bookseller’s requirements: perhaps a lower resolution file to go inside your EPUB file (such as 600x800 or 900x1200 pixels) and a higher resolution file uploaded to the bookseller for use on your book description page.

Indentation

It is conventional in fiction to indent the first line of all paragraphs except for “first paragraphs”. That is, the first paragraph of a chapter (or section or scene, etc.) will not have its first line indented.

EPUB Machine sticks with this convention. The first paragraph of a chapter or section will not have its first line indented. Neither will the first paragraph after a scene break, a quote block, an image, etc.

EPUB Machine takes care of the indentation automatically. It doesn’t matter whether you insert leading spaces (or tabs) in your manuscript or not, as that has no effect on the indentation in the EPUB file.

Manuscript Directories

Where should you keep your manuscripts on your computer?

In Chapter 2 Writing a Novel From Scratch and in Chapter 3 Working With An Existing Manuscript, we just more or less assumed you would use whatever directory your word processor suggested.

It doesn’t much matter where you keep your manuscripts as long as you know where to find them.

If you have several manuscripts, you can keep them all in the same directory, if you wish, but I prefer to set up a separate directory for each manuscript. That way, it is easy to organize the various files related to it, such as the cover image, the author’s photo, the book description you plan to upload to your bookseller, etc.

If you would like to keep each of your manuscripts in its own directory, the YouTube video “How to Set Up Manuscript Directories” will show you how to do it:

- http://nepotism.net/videos

Mono-spaced Fonts

Occasionally, it might be handy to mark a literal section within a paragraph to prevent the rendering of any markup, or just to force the font to be mono-spaced.

This can be useful to show a literal example.

That is done with the <ex> tags (“ex” stands for “example”).

This paragraph will
have <ex>some *words*</ex>
in a mono-spaced font

Note that the asterisks around the word “words” will not turn on italics, because the <ex> tag prevents the rendering of the markup. The above example would be rendered to look like this:

This paragraph will have some *words* in a mono-spaced font

Paragraph Alignment

You can override the eReader’s default paragraph alignment with the <align> tag by setting <align> to right, left, or center. You can restore the default by setting <align> to default.

For example, if you use <align> left, the left margin will be lined up, but the right margin will be “ragged”.

The <align> tag goes on a line by itself, starting in column 1 and stays in effect until another <align> tag is encountered.

The <align> tag also affects the headings. Suppose you want most headings to begin at the left margin. The default (<align> default) or <align> left takes care of that. However, if you want the title page, heading and all, to be centered, you could do it this way:

<align> center

* Windy Day
...
<align> default

* Introduction

<align> default

This is the eReader’s default, typically either fully justified or left justified.

<align> left

With this style, the lines are left justified, rather than fully justified, leaving the right margin ragged.

<align> right

Lines are right-justified. This is useful mainly for short, single-line paragraphs.

<align> center

Lines are centered. This is useful mainly for short, single-line paragraphs such as on a title page or copyright page.

Left justification

<align> left

This paragraph is left justified.
Thus the left margin will be
lined up but the right will
be "ragged".
This is another sentence in
the same paragraph to give
enough words so we can see it
spread out over several lines.
You may need to change the font
size on the eReader to *see* that
the right margin is ragged.

<align> default

This paragraph is left justified. Thus the left margin will be lined up but the right will be “ragged”. This is another sentence in the same paragraph to give enough words so we can see it spread out over several lines. You may need to change the font size on the eReader to see that the right margin is ragged.

With small font sizes, you may not be able to see much difference between left and full justification. So, try also increasing the font size on the eReader.

Right justification

<align> right

These short lines

(each is a paragraph, of course)

are right

justified.

It is the left margin that is "ragged".

<align> default

These short lines

(each is a paragraph, of course)

are right

justified.

It is the left margin that is “ragged”.

Center justification

<align> center

These short

lines/paragraphs

will be centered

<align> default

These short

lines/paragraphs

will be centered

Default justification

<align> default

This is the default alignment,
which will likely be either
fully justified or left justified.
If fully justified, the margins
will be lined up
on both the left and
the right.
One possible problem would be urls such
as http://nepotism.net/downloads or other
long "words" that do not provide a
convenient place to break
the line.
Since this book has lots of
URLs, perhaps we should have
used `left' rather than `default'.
You may need to change the font size
in your eReader to see the funny spacing.

This is the default alignment, which will likely be either fully justified or left justified. If fully justified, the margins will be lined up on both the left and the right. One possible problem would be urls such as http://nepotism.net/downloads or other long “words” that do not provide a convenient place to break the line. Since this book has lots of URLs, perhaps we should have used ‘left’ rather than ‘default’. You may need to change the font size in your eReader to see the funny spacing.

Again, note that with small font sizes, you may not be able to see much difference between left and full justification when you view these examples on an eReader. If you don’t see a difference, try increasing the font size.

Quote Blocks

The <quote> and </quote> tags set off a section of text to be displayed with a wider margin. This is handy for quotations.

<quote>

This paragraph is in a
quote block.

This is a second paragraph within
a quote block.

</quote>

The above example would be rendered as shown below:

This paragraph is in a quote block.

This is a second paragraph within a quote block.

There are four variants of the <quote> tag:

- <quote> … </quote>

- <quotei> … </quotei>

- <quotation> … </quotation>

- <quotationi> … </quotationi>

You can experiment to see which suits your book best. The main differences are the width of the margins and whether the font is changed to italics or not.

Quote Marks and Smart Quotes

Note

When we speak of the <smartquotes> setting below, we are referring to EPUB Machine’s smart quotes setting, not your word processor’s smart quotes setting. Your word processor’s smart quotes should always be turned off, as described in Appendix E.

When EPUB Machine’s <smartquotes> are on (the default), EPUB Machine processes double quote marks (") within a paragraph by looking for them in pairs. It replaces the first of each pair with an opening curly double quote (“) and the second with a closing curly double quote (”).

Each backtick (`) will be replaced with a left curly single quote (‘). Each single quote (apostrophe) (') will be replaced with a right curly single quote (’).

If you prefer to turn off these substitutions, just change the <smartquotes> setting somewhere near the beginning of your manuscript to this:

<smartquotes> off

Here are some examples:

"Bobby, why do you hate
lemonade?" asked Sally.

"No, no, *I* like lemonade.  I
said *Betty* said, `I hate lemonade,'"
said Bobby.

which would be rendered to look like this:

“Bobby, why do you hate lemonade?” asked Sally.

“No, no, I like lemonade. I said Betty said, ‘I hate lemonade,’ ” said Bobby.

The quote marks are processed a paragraph at a time (sometimes just a part of a paragraph at a time if certain special markup appears in the paragraph).

If you have a troublesome paragraph where the smart quotes aren’t doing what you want, you can turn them off just before that paragraph and turn them on again right afterwards. Within the troublesome paragraph, you can insert exactly the quote mark you want using the <ldquo> and <rdquo> tags (“ldquo” stands for “left double quote”, “rdquo” stands for “right double quote”). These tags are discussed more fully elsewhere.

A possible use for this would be a chapter opening with dialog where you would like to omit the opening quote mark (so the drop cap will look prettier). In this case, instead of a closing quote mark, you would use the <rdquo> tag as shown below:

* Chapter XX

What are you doing here?<rdquo> she screamed.

and it would be rendered like this:

Chapter XX

What are you doing here?” she screamed.

Because the above example did not have any straight quotes in it at all, we did not even need to turn off smart quotes.

Scene Breaks

Use the <scene> tag to indicate a scene change within a chapter. It adds a little extra vertical space before the next paragraph and also causes the first word of the next paragraph to begin at the left margin (instead of being indented).

If you use just the <scene> tag, it defaults to showing a blank vertical space. If you would like something else to be displayed, just put it on the same line as the <scene> tag.

This would show three asterisks:

<scene> * * *

This would show three tildes:

<scene>  ~ ~ ~

The following example uses a single tilde to indicate a scene change:

end of previous scene.

<scene> ~

Start of new scene

It would look like this:

end of previous scene.

~

Start of new scene

Here is another example, using three asterisks with no spaces between them:

end of previous scene.

<scene> ***

Start of new scene

It would look like this:

end of previous scene.

***

Start of new scene

Small Quotes

When you have a short quotation that doesn’t need a whole block of text, you can use the <smallquote> tag.

Unlike the <box> and <quote> tags, the <smallquote> tag is not a block tag (it doesn’t need an ending tag).

It displays a small centered quotation with an optional attribution. This could be used to provide a witty quotation at the beginning of a chapter.

The <smallquote> tag expects one or two items of information, as shown in the examples below. The first is the quotation. The second is the attribution, which is optional.

* Chapter 3 <break> The Trouble

<smallquote> "No man is an island" "--- John Donne"

This is the first paragraph.

It would look like this:

Chapter 3
The Trouble

No man is an island — John Donne

This is the first paragraph.

Here’s another example:

<smallquote>
"Waste not, want not"
"--- Anon"

Note how both the quote and the attribution are each enclosed in double quote marks and are written on the same line, or in the same paragraph, as the <smallquote> tag.

It would look like this:

Waste not, want not — Anon

Appendix A
How to Get Your eBook To Your eReader

Your eReader’s documentation should explain how to get an epub file to your eReader. The process of putting an epub file on a NOOK (or other EPUB eReader) is essentially the same as putting a mobi file on a Kindle. The YouTube video “How to Copy a Mobi File From Disk to Kindle” (http://nepotism.net/videos) will show you the general approach.

This YouTube video (http://www.youtube.com/watch?v=O5XFRnutIfI) (not by me) shows the process on an actual NOOK.

You can do a Google or YouTube search for “how to put an epub file on a NOOK” or “NOOK sideloading” to find lots more on the subject. Just substitute your own type of eReader in the search if you have something other than a NOOK.

Of course, you do not need to have an actual eReader in order to read an EPUB eBook. You can use one of the free EPUB readers that run on your computer, such as Calibre or Adobe’s eReader or the various NOOK apps.

However, if you do have an eReader, or if you have friends or beta readers who have eReaders, you probably want to put your book on an actual eReader.

Connect your eReader to your computer with a USB cable. This should cause your computer’s file manager to open, positioned on the eReader as if it were a disk drive (or folder). Open another file manager and navigate to your manuscript directory. Copy windyday.epub to the eReader’s documents directory. (The exact directory name may vary depending on the eReader. Browse around to find the best place to copy your EPUB file—typically the directory where you see other epub files, or do a Google or YouTube search as suggested above).

If that sounds complicated, don’t worry. It’s easy to get the hang of it. The following YouTube videos (at http://nepotism.net/videos) will show you what to do:

- How to Configure Windows Explorer

- How to Copy a Mobi File From Disk to Kindle (yes, you will be copying an EPUB file instead of a Mobi file, but the general procedure is the same)

Appendix B
Publishing Your eBook

Barnes & Noble’s self-publishing platform is called Nook Press (formerly called PubIt!), Kobo’s is called Writing Life, and Amazon’s is called Kindle Direct Publishing. Other than the names, the publishing process is nearly the same on all of them. As of this writing, you can publish your EPUB 3 eBook on at least Barnes & Noble, Apple, Kobo, Google Play, and Smashwords. At this writing, Smashwords may still be working out kinks in their process with regard to their premium catalog.

Here is the general process:

- Register with the publisher to provide your contact and payment information on the publisher’s website, then just follow the prompts (the order may vary from publisher to publisher):

- Upload a description for your book.

- Upload your eBook (as an EPUB file for B&N and Apple and Google Play, and as a Mobi file for Amazon)

- Upload your cover image

- Choose the categories for your book

- Choose the keywords for your book

- Set the price for your book

- Preview your book

- Click on Publish!

We’ll run through those steps in more detail below for Barnes & Noble.

Publishing on Barnes & Noble

If you have an B&N account, then you are already basically set up. If not, go to http://nookpress.com/ to set up an account, then log in to http://nookpress.com/ and fill out any additional information requested.

Once your account is set up, click on “Add your first eBook” and follow the prompts to upload your EPUB file and cover image.

You do not need to have a NOOK to read EPUB books, as B&N has apps for web, Windows, Mac, iPhone, Android, etc. For example, install NOOK for PC the same way you would install Kindle for PC, as shown on the videos:

- http://nepotism.net/videos

Once you have installed NOOK for PC, you can click on “my stuff” (underneath “my library”) then click on the “ADD NEW ITEM” button, then navigate down to your manuscript directory and select your EPUB file.

Appendix C
Tips

This section contains various tips for fixing minor problems, reading your book in a web browser, printing your book, customizing review copies, and such.

Quotes curl in the wrong direction

EPUB Machine tries to match up pairs of double quote marks (straight quotes) in each paragraph so it can turn the first of each pair into an opening curly quote and the second into a closing curly quote. This was touched on in the Quote Blocks section of chapter 5.

If the curly double quotes look backwards, that is, if you see ” where you expected to see “ or vice versa, a quoted phrase is probably missing a quote mark. The solution is to add the missing double quote mark to your manuscript.

Single quotes use two different characters. The backtick (`) will be turned into an opening single quote. An apostrophe (') will be turned into a closing single quote. So, if you write 'should be in single quotes' (which renders incorrectly as ’should be in single quotes’), the solution is to change the opening mark to a backtick like this `should be in single quotes' (which renders correctly as ‘should be in single quotes’).

If your manuscript contains “smart quotes”, EPUB Machine attempts to correct for them automatically. However, if problems persist, if your manuscript appears to have the quote marks in the correct places yet the rendered EPUB file still doesn’t show them correctly, try deleting both quote marks around the problem phrase in your manuscript and retype them (in case your word processor had previously substituted curly quote marks for straight quote marks).

If you have a lot of these problems, the easiest solution might be to use your word processor’s copy/replace feature to replace all curly quotes with straight quotes.

Then, as usual, save a copy of your manuscript (windyday.doc) as a temporary text file (windyday.txt) then regenerate your EPUB file.

Tags incorrectly combined with body of paragraph

Block tags and setting tags that should start at the beginning of a line should go on a line (or paragraph) by themselves with a blank line above and below. For example, the following quote block is incorrect because it is missing the blank lines:

<quote>
Some witty
quotation or
poem
</quote>

The following quote block is even worse:

<quote> Some witty
quotation or
poem </quote>

Here is the proper way to write a quote block:

<quote>

Some witty
quotation or
poem

</quote>

Backing up your work

Remember to back up your work early and often, especially your manuscripts. It is a good idea to keep some of the copies off site.

Reading in a web browser

When EPUB Machine produces an EPUB file from your manuscript, it also produces an HTML file that you can read in a web browser.

The essence of eBooks is that the eReader device reflows the text to fit the width of the screen, given the font size and spacing selected by the reader.

An eReader’s screen is not usually as wide as a desktop computer’s screen. So, the style sheet used for the HTML version sets the width appropriately. If this is still too wide, you can make your web browser’s screen narrower by grabbing an edge or corner (with the mouse) and dragging to resize it to a comfortable width and height. You can adjust the font size with your web browser’s View / Zoom menu.

Distributing the HTML version of your book

As mentioned previously, EPUB Machine produces an HTML version of your eBook at the same time it produces the EPUB file. There are at least two files related to the HTML version:

- windyday.html

- htmlstyle.css (or htmlcustom.css, etc.)

- any image files

EPUB Machine creates this HTML file in your book account. Thus, all these files are present in the same place. If you copy the HTML file somewhere else (to a directory on your computer or to a web server) be sure also to copy the style sheet, e.g., htmlstyle.css or htmlcustom.css, and all the image files.

This also applies if you email the HTML file to someone. You need to send him the style sheet and image files too. But why bother doing all that? Just send him the EPUB file instead—if he doesn’t know how to copy it to his eReader or if he doesn’t have an eReader, you can point him to the videos and Google searches mentioned earlier—or send him the PDF file.

Printing a hard-copy of your manuscript

The HTML version of your eBook is “printer friendly”. It is set up to force page breaks so that each chapter (each level one and level two heading) starts on a new page. You can print this file from your web browser to produce a hard-copy for proofreading purposes. (Or, you can produce a PDF as described elsewhere. A PDF is even more “printer friendly”.)

If the page breaks are not falling where you think they should, try a different web browser. Firefox is a good choice.

If you want to print just part of your book (perhaps just a chapter or two), then instead of going to File / Print in Firefox, go to File / Print Preview. From there, determine the range of page numbers you want to print, then from within the Print Preview window, click on Print and click on Pages: and enter the range, such as “50-62”.

Word processor versus text editor

Should you use a word processor or a text editor for your manuscript?

The easiest thing to do is just keep using what you are comfortable with. If you use and like Microsoft Word or LibreOffice, stick with it until or unless you find a reason to change.

Likewise, if you are an Emacs or Vi or TextMate or other text editor enthusiast, just stick with it.

However, as far as EPUB Machine is concerned, a word processor does not provide any benefits. You would have more control over the formatting if you switch to a text editor. Also, it would allow you to skip the Save-as step, since your manuscript would already be in a plain text format.

If you currently use a word processor but would like to switch to a text editor, it is easy to do. Full details are given in the Advanced Mobi and EPUB Machines book.

Appendix D
List of Tags

This appendix contains a list of all the tags recognized by EPUB Machine that have been discussed in this book. (Additional tags are covered in the book Advanced Mobi and EPUB Machines.)

Each tag is linked to the main chapter or chapters that discuss it. Also, you can use your eReader’s search facility to locate every occurrence of a specific tag.

- asterisks for headings

- asterisks for emphasis

- two hyphens for an en dash

- three hyphens for an em dash

- four hyphens for a horizontal rule

- three dots for an ellipsis

- double quotes for curly double quotes

- backtick and apostrophe for curly single quotes

- pound sign for comments

- <align> Chapter 2, Paragraph Alignment

- <box> Boxes

- <break> Forcing Line Breaks

- <contents> The table of contents

- <copy> The copyright page

- <cover> Boilerplate

- <dropcaps> Drop Caps

- <ex> Mono-spaced Fonts

- <image> Images

- <ldquo> Quote Marks and Smart Quotes

- <publisher> Boilerplate

- <quote> Quote Blocks

- <quotei> Quote Blocks

- <quotation> Quote Blocks

- <quotationi> Quote Blocks

- <rdquo> Quote Marks and Smart Quotes

- <scene> Chapter 3, Scene Breaks

- <smallquote> Small Quotes

- <smartquotes> Quote Marks and Smart Quotes

- <start> Where should your book start?

Appendix E
Word Processor Settings

The default options for some word processors, especially the auto-format options, will interfere with the operation of EPUB Machine.

Here are some of the problems to watch out for:

smart quotes

If your word processor substitutes curly quotes for straight quotes, it might cause a problem with the use of straight quotes in headings and tags (such as <image> and <smallquote>) (although EPUB Machine attempts to fix this automatically).

automatic lists

If your word processor turns a leading asterisk into a list, it prevents chapter headings from being recognized.

automatic italics

If your word processor turns asterisks around a word or phrase into an italicized font, it prevents the markup from reaching EPUB Machine, thus losing the italics in the eBook.

headers, footers, page numbers

If your word processor includes these items when saving as plain text, then these items will also appear (and in the wrong places!) in your eBook.

The solution is to change your word processor’s settings to turn these items off.

Specific instructions for turning them off in Microsoft Word and in LibreOffice are given in the following sections. Other word processors will be similar but you may need to browse through the menu system to look for something like “options” or “settings” or “preferences”. If you are stumped, just Google for the answer by searching for something like “WordPerfect how to turn off automatic lists” or “OpenOffice how to turn off table of contents”.

Microsoft Word

Here is how to configure Microsoft Word:

turn off headers, footers, and page numbers

- Double click on the header, footer, or page number

- Select the header, footer, or page number (press Ctrl-A or highlight with the mouse)

- Press the Delete key to delete the header, footer, or page number

- Press Esc to get out of the header area and back to the body of your document

turn off auto-format

- Bring up the Word Options screen by clicking on the File menu then clicking on Options. (If you don’t appear to have a File menu, click on the Microsoft Office icon.)

- Click on Proofing

- Click on AutoCorrect Options

- Click on the AutoFormat tab

- under “Apply”, you probably should turn off all items (by unchecking them), but at least uncheck “Automatic bulleted lists”. (Otherwise Microsoft Word will undo your attempt to mark chapter headings.)

- under “Replace”, you probably should turn off all items (by unchecking them), but at least uncheck the following:

- Straight quotes with smart quotes

- Bold and italic with real formatting

- Internet and network paths with hyperlinks

- Click on the AutoFormat As You Type tab and uncheck at least the following

- Automatic bulleted lists

- Straight quotes with smart quotes

- Bold and italic with real formatting

- Click OK to close the AutoCorrect window

- Click OK to close the Word Options window

LibreOffice

Here is how to configure LibreOffice:

- Click on the Tools menu

- Click on AutoCorrect Options…

- Click on the Options tab

You will see an “[M]” column and a “[T]” column and a description column. Uncheck the boxes under “[M]” and “[T]” for the following:

- Automatic bold and underline

- URL recognition

Next, click on the Localized Options tab and make sure the “Replace” box is unchecked under both “Single quotes” and “Double quotes”.

Finally, click on OK.

What If Your Manuscript Already Contains Smart Quotes?

Note, if you are starting with an existing manuscript, probably all the quote marks will already be “smart”, i.e., curly.

The quote marks used in tags and headings (such as chapter headings and <image> tags and <smallquote> tags) must be straight quotes, not curly quotes. So, it is a good idea to turn off smart quotes as described above prior to marking up your manuscript.

Generally though, you do not need to go through your manuscript to change them all to straight quotes because EPUB Machine attempts to change them to straight quotes automatically.

If EPUB Machine can’t fix this automatically, you may need to go through your manuscript and change all the “smart” quotes to straight quotes.

Additional Notes

If you have a different word processor, you should be able to find where to turn off any automatic formatting by browsing around its menu system or by doing a web search as described earlier.

You may have a different version of Microsoft Word or LibreOffice where the detailed instructions in this chapter will not apply exactly. If it is not obvious how to turn off the automatic formatting, a web search as mentioned above will likely lead you to the answer quickly.

Also, depending on how you have set up your word processor, there may be other settings and formatting that you will need to turn off.

Appendix F
Windy Day Manuscript

This book has used miniature versions of the Windy Day novel as examples. Now it is time to show a longer example manuscript for that book. The manuscript is shown here with a short line width to make it easier to read on eReaders. If, in spite of this, lines wrap that should not, try changing your eReader to use a smaller font or to use landscape mode.

An even longer example is available from Nepo Press or from various booksellers, as the fake novel Windy Day.

Here is the manuscript.

<publisher> Nepo Press

<cover> windy.jpg

#### Title Page

<align> center

* "Windy Day"  ""

***

by

Frank Sergeant

#### Copyright Page

*

******

copyright <copy> 2012-2014 Frank Sergeant

all rights reserved

Published by Nepo Press (http://nepotism.net)

<align> default

Cover image credit

- Bonsai Trident Maple <url
"http://commons.wikimedia.org/wiki/File:BonsaiTridentMaple.jpg">.
Public domain, this image was released by the Agricultural Research
Service, the research agency of the United States Department of
Agriculture, with the ID K10474-1
(http://www.ars.usda.gov/is/graphics/photos/jun03/K10474-1.htm).

<contents>

<start>

* Introduction

This is not a real novel.  Its
purpose is to serve as an example
of how to turn a manuscript written
in a word processor into an eBook
(a Mobi file for the Kindle or an
EPUB file for nearly everywhere
else).

The manuscript can be written in a
word processor or in a text editor.
Visible markup is the key to its
simplicity.

Generally, when writing in a word
processor, the author is advised to
be *very careful* to use *styles*
for **everything**!

The general advice is

<quote>

Don't format italics, bold,
centering, larger fonts for
chapter headings and
subheadings.  Instead, apply the
appropriate style.

Do not indent paragraphs by
pressing the TAB key.  Do not
indent paragraphs by pressing
the space bar 5 times.  Use the
appropriate paragraph style
instead.

If you (like every other author
in the world) have *already*
written large portions of your
novel without using styles
exclusively, you must go through
your entire manuscript and
*remove* all of that hand
formatting and apply the proper
styles instead.

</quote>

However, using *Mobi Machine* (from the
*Mobi Machine* book) or *EPUB Machine*
(from the *EPUB Machine* book) you
do not have to worry about any of
that.

All you need to do is add
some simple *additional* markup.
The books mentioned above,
and available at least somewhere
fine eBooks are sold, will explain
everything in very simple terms.
They are written to be readable even
by inexperienced Windows users and
have associated YouTube videos to
show the details of the various
steps.

Enough of the introduction.  Let's
get on with the example novel.

* Chapter One

It was a dark and windy day.

*How did I get into this mess?*, I
wondered.

The leaves rustled as I walked
through the lonely forest path,
dragging the heavy bag.

I needed some peace and quiet.  I
hated being in a real forest
instead of my lovely bonsai forest.
I needed to *think*.  Not about my
life.  Not about next week.  I
needed to think about *today* and
where I was going to bury the body.

I was looking for a good grave site
because I *really* did not want her
body to be found.

<scene> ~

It was early morning but the woods
were getting darker the farther I
went. I found a secluded spot,
threw down the heavy bag, and
started to dig the grave.

This was a lot harder than it looks
on TV or in the movies.  It took
forever, but I finally finished.

I wondered if I would be able to
sleep tonight, although it's not
like I haven't done this sort of
thing before.

* Chapter Two

Driving home was a lot easier on my
nerves, now that the bag no longer
contained a body.

<scene> ~

Now where was I?  Oh yes, I
remember.  It all started last
night after dinner.  I was pruning
my favorite golden maple bonsai
tree.  If the shears hadn't been in
my hand, it might have turned out
different.  We got into an
argument---again---and I snapped.
Oh well, I guess the joke's on me.

<scene>

* Chapter Three

I was safely tucked in my bed,
sleeping like a log, after the good
healthy exercise and fresh air in
the woods today, when I was
awakened by a pounding on the door.

"Open up.  It's the police."

*No!* I had been so careful and now
it was all coming undone.  Some say
no good deed goes unpunished, but
that might be backwards in some
cases.

* About the Author

<image> "frank.jpg" "Frank Sergeant"

Among other things, the author
provides programming and technical
support services to Nepo Press.
His experience turning manuscripts
into eBooks led to the books *Mobi
Machine (Your Kindle Formatting
Butler)* and *EPUB Machine (Your
EPUB Formatting Butler)* and the
associated software.  This system
allows anyone to format books for
the Kindle or NOOK or other
eReaders "at the touch of a
button".  Really!  It's so easy an
adult could do it.

He enjoys receiving email from
readers at frank@nepotism.net.

The author's web site is at
http://nepotism.net.

<align> center

*** The End

Notes and References

Jeeves the Butler

Yes, I call P.G. Wodehouse’s Bertie Wooster’s Jeeves a butler, knowing full well that he is a valet. I’ll try to get past this discrepancy and I hope you will too. In my defense, apparently Bertie occasionally loans Jeeves out as a butler and has said that Jeeves can buttle with the best of them. I felt that “Your EPUB Formatting Valet” didn’t have quite the same ring to it.

- https://en.wikipedia.org/wiki/Jeeves

YouTube videos

I have made a number of YouTube videos (screencasts), showing how to mark up and format a manuscript:

- http://www.youtube.com/user/nepopress

- http://nepotism.net/videos

About the Author

Frank Sergeant provides computer programming and technical support services to Nepo Press (http://nepotism.net), where he has been intimately involved with authors and the process of turning manuscripts into eBooks.

Please send a note to frank@nepotism.net if you would like to be added to the Nepo Press mailing list for the occasional short newsletter plus news of any updates or corrections to this book.

His other books may also be of interest. Check your favorite bookseller for these books or see the complete list at

- http://nepotism.net

This book, EPUB Machine, takes care of publishing on Apple, Barnes & Noble, Kobo, and most other booksellers, but what about Amazon Kindle?

If you want to publish your book on Amazon—or read it on a Kindle—you might want to get Mobi Machine (Your Kindle Formatting Butler). It is available from various booksellers. Mobi Machine is just like EPUB Machine except it focuses more directly on making Mobi files.

These two books are almost identical, except one is for producing Mobi files and the other is for producing EPUB 3 files. If you have one, you probably do not need the other.

Additional information about formatting EPUB and Mobi eBooks is available in the Advanced Mobi and EPUB Machines book. And, it contains the details for making “camera-ready” PDF files for publishing and selling your books through CreateSpace and Amazon. It is available from various booksellers.

Your book needs a cover, and you can make it yourself with the help of the author’s Quick and Dirty eBook Covers.

It steps you through making a very simple book cover using the free GIMP (GNU Image Manipulation Program), available for Windows, Mac, and Linux.

This is a short, focused book designed to teach you as little as possible about GIMP—just enough to create a basic eBook cover. This will not be a $300 cover or even a $150 cover, but it will be a damn good 99 cent cover.

Since you can update your cover image whenever you like on Amazon, Apple, Barnes & Noble, etc., this book lets you create a usable cover immediately then replace it later as your time, skills, and finances allow.

The screenshots are in full color but look good even on a grayscale eReader, and you can zoom in to see all the detail.

Also, there are three fake mystery novels whose only purpose is to show the “before” manuscript and the “after” eBook. Each is very short, perhaps 300 words. Two of them include an appendix with the actual text of the manuscript showing how various effects were achieved, such as drop caps, lists, internal links, external links, table of contents, and images. The manuscript for the third is available from the Nepo Press site as an example or to use as a template for your own novel.

- Stormy Night

- Windy Day

- Sam Speedo (Bathing Suit Detective)

For more details about the Nepo Press formatting service, including current prices, see the web site:

- http://nepotism.net/formatting.

To get a free two-week trial book account, email frank@nepotism.net with the exact title of your book and the author name. (Pen name and/or multiple authors OK.) Books produced with the trial account will be “watermarked”. Try it out with no risk. Then, if you are happy with the formatting and ready to publish, you can upgrade to a paid account.

The End