
Pandoc: universal document converter - olalonde
http://johnmacfarlane.net/pandoc/index.html
======
gwern
One of the nifty applications of this is Gitit: store your files in a normal
Git or Darcs repo, and then users can export the webpages in 16 formats.

And you can easily script it in Haskell - I wrote one plugin that archives
external links in the Internet Archive & WebCitation, and another link which
adds interwiki syntax to markdown, eg. '[Plato](!Wikipedia)' or
'[abstruse](!Wiktionary)' or '[scanl](!Hoogle)' or '[gitit](!Hackage)'.

~~~
johkra
Did you extend Pandoc or Gitit? I would be very interested in
extending/changing Pandoc slightly, but so far I got along with doing my
changes with sed and writing some inline LaTeX.

If you extended Pandoc, do you mind giving a pointer to your source? I write
Haskell poorly, so an example would be appreciated.

~~~
gwern
The plugins are bundled with Gitit. See:

[https://github.com/jgm/gitit/blob/master/plugins/Interwiki.h...](https://github.com/jgm/gitit/blob/master/plugins/Interwiki.hs)

<https://github.com/jgm/gitit/blob/master/plugins/Subst.hs>

[https://github.com/jgm/gitit/blob/master/plugins/WebArchiver...](https://github.com/jgm/gitit/blob/master/plugins/WebArchiver.hs)

They are meant for use with Gitit, but they are easily adapted for other
purposes. For example, the archive code was easily adapted into a script to
read Markdown files and spit out external links to stdout:
[http://groups.google.com/group/pandoc-
discuss/browse_thread/...](http://groups.google.com/group/pandoc-
discuss/browse_thread/thread/42c29d0b66dcdb14/347498f0234cc1dc)

------
Adaptive
I use Hakyll & Pandoc to maintain a single README in github which is also the
webpage for Solarized. A little sed magic in Hakyll converts the github links.
Makes life much easier.

------
ez77
Talk about Renaissance men: John Macfarlane's main activity lies in
philosophy, and still he answers within hours most questions on the Pandoc
mailing lists.

------
johkra
I'm actually writing my diploma thesis using Markdown and Pandoc. Some hacking
is necessary (sed is so far sufficient), but it's a lot more pleasant then
writing LaTeX directly.

~~~
radarsat1
I sometimes start writing papers in markdown using Pandoc too, but usually I
eventually switch over to Latex when the formatting needs get more
complicated. Still, it's a nice way to write. I love that Pandoc allows you to
throw in arbitrary Latex markup wherever you want, easily allowing for math
formulas and figure floats.

------
StavrosK
I used Pandoc to convert my online tutorial into a book for publishing:

<http://leanpub.com/learn-python/>

The whole process took about two minutes (pandoc converted all the HTML to
basically perfect Markdown). I've told the guys who run leanpub about pandoc,
hopefully they'll use it to compile all of its formats down to LaTeX so you
can publish books much more easily.

------
osivertsson
I used Pandoc at a previous job when I got frustrated with writing
documentation for our customer in OpenOffice.

Instead, I started writing markdown and wrote a script that used Pandoc to
convert it to LaTeX, insert headers/footers and company logo etc, and finally
used latexmk to output PDFs. This looked far more professional than the word
documents we shipped previously.

It also successfully separated content (markdown text files) from presentation
(handled by script), making sure all PDFs had a consistent look.

With documentation being just another buffer in emacs it was more often
written/sketched when implementing, instead of being a task to do last when
you had already run out of time.

It is also much easier for developers to follow changes to the documentation
in the version control system, and merges are a breeze instead of a time-sink.

------
radarsat1
I use this all the time for running web pages (often blogs, as well as Project
Gutenberg books and wikipedia pages) through LaTeX to convert them into a
format more palatable on my ereader.

