11

I'm using a plain text editor (Vim) to write a fiction piece (chapter book), and I'm wondering what markup languages others use for such a task? I'm looking for something exceedingly simple, it does not have to be powerful at all. Minimum requirements would be supporting basic styling like bold, italics, and underline; markup to indicate titled chapters, and scene splits within chapters; markup for footnotes/endnotes; and markup must be nestable.

But most importantly, the markup should not get in the way of my writing. In other words, I don't want to spend 25% of my keystrokes writing markup, and it should be easily readable even with the markup exposed. For instance, I find REStructured Text to be ugly and difficult to read smoothly.

My end goal is to "publish" to ePub and possibly latex. I'm currently using a very simple markup of my own devising, and a parser for it that generates both of those formats. However, it's a somewhat ugly markup (it uses curly braces which don't read smoothly) and my parser is rather clumsy, unable to handle things like paragraph breaks inside quotes.

So I can either improve on my own markup and rewrite my parser, or I can use something that already exists if anybody has any suggestions.

Update:

I should have guessed that this would be the end result: I've spent the past week or so redefining my own markup and rewriting a parser for it and a number of output converters for it. Thanks for all the good answers; I think you've pointed out the best markup languages that are available, but I'm finding that there just aren't any available that are well suited for writing novels, at least not for what I have in mind.

If anyone is interested or potentially interested in using this, let me know; I will most likely be putting this on bitbucket in the next few weeks as a set of python scripts and scons tools.

7
  • I would like to see the markup that you end up using. Could you post an answer here with the tools, once you've posted them to bitbucket?
    – corvec
    Commented Jan 16, 2013 at 15:12
  • Sure thing. Bear in mind that I've developed it specifically for the way I'm writing. Hopefully it will be useful to others as well. Commented Jan 16, 2013 at 15:19
  • I would like to see that as well. Commented Jan 19, 2013 at 15:53
  • We're working on a project to create a set of tools for my custom markup. It's coming along quite well and should be ready for public consumption within a week or so. If you're really interested, you can follow on twitter @TomeProject (twitter.com/TomeProject). Will post a final answer with link once the project is ready for release. Commented Jan 22, 2013 at 2:34
  • @sh1ftst0rm Hey, I'm doing the same. I'm writing a custom Markdown parser in JavaScript, which includes stuff like scene breaks, smart quotes, and small-caps (e.g. ^^Small-cap text^^.) It outputs a clean Kindle-ready zip file (with table of contents and everything).
    – wyc
    Commented Apr 30, 2015 at 4:38

8 Answers 8

11

Markdown is almost certainly the way to go for simple formatting.

To then go from Markdown to a proper ebook format, you can use some automated tools to do the conversion for you.

Web Book Boilerplate
If you want to run locally with your edits, and view them in various formats, the Web Book Boilerplate GitHub project offers an easy way to do this:

With the Web Book Boilerplate you have the perfect place to start writing your book! It uses plain old markdown and generates a well structured HTML version of your written words.

Leanpub
If you are looking for an all-in-one service for formatting, generating ebooks and finally publishing and listing your ebooks, have a look at Leanpub:

Leanpub manuscripts are written in a very simple plain text format called Markdown. You can generate PDF, EPUB and MOBI versions of your books from your manuscripts in one click. Since Leanpub provides a storefront for you, you can also sell them in one click.

1
  • I would add that pandoc has its own flavor of markdown with more features and can convert directly to epub (pandoc.org/epub.html).
    – walpen
    Commented Sep 14, 2019 at 0:17
7

Markdown is good for fiction. It's a small, simple language and easy to type. It's very similar to the markup language used here on Stack Exchange.

If want to do something tricky that markdown doesn't support, you can drop into HTML. Those situations are rare in fiction.

There are vim plugins to highlight markdown syntax. (I use MacVim which has markdown syntax highlighting built in.)

4

I think you want MultiMarkdown. It has built-in support for **bold**, _italics_, and footnotes (footnote syntax: [^footnote]). It's similarly easy to specify headers with #, and it can publish directly to LaTeX.

Best of all, it's extremely easy to incorporate without getting distracted. I write MultiMarkdown blog posts full of footnotes and links from my iPhone; I've even composed whole MMD tables on the Metro for my RPG projects.

MultiMarkdown is especially great if you're a Mac user; there's tons of great software to support it like Marked to preview your output; Scrivener to organize larger projects; and Sublime Text 2 + Markdown Editing for Sublime Text 2. None of that is really necessary, though: A plaintext editor and the command line can do everything, if you roll that way.

It doesn't support underlines, unfortunately. I've yet to find a simple markup language that does.

2

I have tried to write in XML and latex but neither seems very stream lined for fiction. A lot of people have said markdown but I think wiki creole is better. It is really simple and efficient and it is trying to be a standard markup language for use by all wikis so maybe it will become widely adopted which would make it a good thing to write in.

1
  • Thanks, I forgot about creole. I looked into it a while ago for another project and liked it in general, but I think it's still off the mark for what I'm trying to do. Commented Jan 18, 2013 at 22:18
2

I'm quite late to this question, but was searching for exactly the same thing. I discovered PML.

Unfortunately it's still under development and only have a windows client. But the syntax and structure is exactly what I was looking for in a markup language. I'm tempted to write my own parser/renderer for linux/macos, since the language looks promising to me.

Background

I use Vim. I wanted a structured markup language that isn't too verbose (xml, html) and didn't have strange markup edge cases like reStrcturedText or Markdown (the need to do weird escapes and workarounds for some edge cases).

1
  • Welcome to Writing.SE Andre, glad you found us. We have a tour and help center you might wish to check out.
    – Cyn
    Commented Sep 11, 2019 at 14:57
1

As mentioned above, I ended up developing my own tools and markup language to suit my needs. As requested by @corvec, I'm posting a new answer with a link to the project: https://bitbucket.org/bmearns/tome.

It's an open source project released under GNU AGPLv3, so if anyone would like to contribute, please feel free to contact me on bitbucket.

0

Why do you need to mark it up at all whilst you're writing it? To save time later? This is false economy. You should focus all your efforts on your writing, proof reading, editing etc. Then when you've finished doing all of that, export your data/writing into a program to mark it up.

Mark up should happen right at the end, not whilst you're writing.

Focus on one thing at a time.

7
  • 1
    Thanks for the advice, but that's not how I work. Certain amounts of markup (emphasis, for instance) are as much a part of the writing as the actual words. If you've worked out how you want to word something, you wouldn't save it to the end so you can focus on getting the plot finished, right? For me, the markup is the same thing, and as long as it's a good markup language, it shouldn't get in the way of my writing, it should be a part of it. Of course I'll go back and revise it all---content and markup---at the end, but that doesn't mean I don't want to get it down initially. Commented Jan 9, 2013 at 13:47
  • Also, to be clear, I'm not talking about the exact way the final result looks. If that's what you were thinking, then I agree completely that you should wait till the end to fuss over things like margins and layout and chapter-title font face, etc. What I'm referring to is markup related to content and structure. Commented Jan 9, 2013 at 13:49
  • @bmearns I understand fully what you're trying to do. Pick up any printed fictional novel you have lying around. How much emphasis do you see in the text beyond that of italicisation and punctuation? None! The writing does it all. However, if that's the way you want to work, then no advice from me will make any difference, but I think you're making a mistake working in that way. Commented Jan 9, 2013 at 15:13
  • 1
    Sure, you wouldn't normally do much mark-up in a novel. Paragraph breaks, italics, chapter headings ... that would be about it for most. But it seems to me that you'd want to do that as you go along. To go back and add that later would be a pain. Especially the paragraph breaks. For non-fiction, you might have things like index entries, side bars, examples that are offset in some way, etc. Some of that I'd want to do as I went along and some I'd wait til the end.
    – Jay
    Commented Jan 9, 2013 at 16:52
  • @Jay You don't need a program capable of markup to put in paragraph breaks, italics, or chapter heads, that should all be available in even the most basic word processing program - that's precisely my point. Commented Jan 9, 2013 at 16:55
0

Just because markup preferences are personal, I will mention the markup system I developed for writing my last non-fiction book. It is called SAM (Semantic Authoring Markdown). It is a general purpose language, like XML, but with lightweight syntax, like Markdown. This means that while it has standard markup for the common stuff like paragraphs, bold, italic, lists, etc, you can also make up your own tags. You can also validate it using an XML schema.

It uses indents for structure (like Python) so if you like indents you may like it, but if you don't like indents you probably won't like SAM.

It outputs to XML or HTML (with semantic tagging) and you can process the XML output to produce whatever final format you want.

The project is available on GitHub here: https://github.com/mbakeranalecta/sam

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.