
[As promised in the intro post.]
I'm a big believer in plain text. A plain text file will always be readable, no matter the computer hardware, operating system, or what have you. Plain text doesn't carry any hidden metadata, algorithms, or proprietary gotchas. Nobody can forbid you from using plain text, nor render plain text files useless by legal fiat.
If you want to write a novel that can be converted into an ebook ready to sell, you can do that as simply as opening your favorite text editor and writing it. Markdown makes it possible.
Markdown began as a way to convert plain text into HTML, and a syntax for denoting HTML tags in plain text. Having a (very basic) understanding of how HTML works is helpful, but not required until you get to the stage where you are generating ePub files. For today, we'll stick with the very basics.
To begin with, paragraphs are blocks of text, with a line break in between. Simple, just the way you would normally write in plain text.
If you want something italicized, put it between asterisks, *like so*. For bold, two asterisks before and after, **like this**.
If you want a break in the narrative, but not a chapter break, put three asterisks (or more) on their own line, set apart like a paragraph, go down to a new paragraph, and keep writing.
Each chapter can be in its own text file, or can be in the same file if you prefer. Either way, you want it to begin with a header with the chapter number, and maybe with a chapter title underneath that. Markup has six levels of headers, because that's what HTML recognizes. For reasons I will go into in a later post, I recommend level three headers for chapters, and level four for chapter titles. That will end up looking like this:
### Chapter One
#### Title
The number of number (or pound) signs is the level of the header.
If your story includes text within the story, such as a letter or a newspaper story, the easiest way to mark that off is to make the text a blockquote, which you do by including a close-angle bracket (or greater than sign) and a space at the beginning of each paragraph, or the beginning of each line, with blank lines between paragraphs also having the bracket and a space for continuous text.
The easy way would look like this:
> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
>
> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
The easier-to-read but harder-to-type version would look like this:
> Lorem ipsum dolor sit amet, consectetur adipiscing elit,
> sed do eiusmod tempor incididunt ut labore et dolore
> magna aliqua. Ut enim ad minim veniam, quis nostrud
> exercitation ullamco laboris nisi ut aliquip ex ea commodo
> consequat. Duis aute irure dolor in reprehenderit in
> voluptate velit esse cillum dolore eu fugiat nulla pariatur.
> Excepteur sint occaecat cupidatat non proident, sunt in
> culpa qui officia deserunt mollit anim id est laborum.
>
> Lorem ipsum dolor sit amet, consectetur adipiscing elit,
> sed do eiusmod tempor incididunt ut labore et dolore
> magna aliqua.
Since I am a nerd, it pleases me that Markdown allows easy notation of em dashes, which is to put in three hyphens: "---". And if you're even more nerdy than me, en dashes are two hyphens: "--".
And that, really, should be all that you need to get going. If you want to include poetry or song in your story, or do typographical shenanigans a la Alfred Bester, things get more complicated, but if you're doing that on your first (or tenth) novel, consider whether or not you are leaning on those things as a crutch.
But if you do want to do more ambitious layout sorts of things, stick around. Next time, I'll tell you about the glorious open source app known as Pandoc, which has extensions to Markdown that make those and other things (like footnotes) possible, and is what I recommend for converting your markdown files into ePub files. And later on, we'll cover another plain text markup syntax called AsciiDoc, which is better suited to nonfiction, since it was designed for creating technical documentation.
And if you think it doesn't sound that useful, or it seems too limited for actual book publishing, go to Amazon and find any iktaPOP Media publication. Every single book (and the number is getting close to a hundred) that I publish has a Markdown source file.