I'm writing a story in plain text using Vim text editor. It doesn't contain big tables, images. However, there will be short listings of source code in several programming languages and syntax highlighting for them is a must. There may be a little amount of formulas. I want to publish it in HTML and PDF.

Is there simple(!) markup language for this? What is better: embed formulas as images or use special markup? I don't want to learn something complex like LaTex.

3 Answers 3


Take a look at reStructuredText. It is a simple markup language which you can later convert into something else, like PDF. It might fit your use case, especially as it is a subproject of Docutils, a tool for source code/project documentation.

An alternative is Markdown.

  • Yes, I was considering markdown. Do you use any of suggested languages?
    – galymzhan
    Feb 13, 2011 at 9:19
  • 1
    I use reStructuredText sometimes, but mostly I use LaTeX to get my beautiful PDFs right away. :)
    – Martin
    Feb 14, 2011 at 11:51

I second Markdown, see my answer to a similar question here:

Least possible editing effort if a text is for multiple media?


Latex honestly is not that difficult to learn to use for basic purposes. Especially if you're not trying to do tables or graphics or anything, there's not that much you need to learn, just a few simple commands like \textbf{bold} and \section{Section Title}. There are readily available packages for writing code samples which include syntax highlighting, and of course Latex is built for writing equations.

I realize that's specifically not what you were looking for (sorry), but in my opinion it really is your best bet. You already learned Vim, so you must be reasonably bright (full disclosure, I'm a fellow Vimmer); no reason you wouldn't be able to learn Latex.

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.