Skip to content

Comparison of Pandoc and MultiMarkdown

szarnyasg edited this page Nov 12, 2014 · 1 revision
Feature Pandoc to HTML Pandoc to PDF MMD to HMTL MMD to PDF
BibTeX Citations yes [1] yes [2] no [3] yes [4]
Cross-reference on sections yes [5] yes [6] yes [7] yes [8]
Cross-reference on figures ? [9] ? [9] yes [10] yes [10]
Cross-reference on tables ? [9] ? [9] yes [11] yes [11]
  1. With citeproc -- http://johnmacfarlane.net/pandoc/demo/example19/Citations.html

  2. It is recommended to first compile to LaTeX and run a separate pdflatex/bibtex build. Else the citations are processed by citeproc and printed as plain text to the document. If you inspect the interim .tex file, it looks like this:

    Reference: {[}1{]}
    
    {[}1{]} L. Lamport, ``Time, clocks, and the ordering of events in a distributed system,'' \emph{Commun. ACM}, vol. 21, Jul. 1978, pp. 558--565.

    This of course implies that the reference number will not works as a hyperlink in the PDF document.

    Related discussion: https://groups.google.com/forum/#!topic/pandoc-discuss/dfVDdQfYAFc

  3. "BibTeX is a LaTeX tool, not HTML. There may be other tools to convert BibTeX into HTML, but MMD doesn't support that." http://support.fletcherpenney.net/discussions/questions/62-bibtex-refs-to-html

    "MMD has much more rudimentary citation support. [...] There is no automatic citation/bibliography formatting, unless LaTeX output is used (in which case natbib and bibtex are used)." -- https://github.com/jgm/pandoc/wiki/Pandoc-vs-Multimarkdown

  4. In my opinion, templating is a bit more complicated than pandoc's approach.

  5. This works with the See [the introduction](#introduction) syntax. See http://johnmacfarlane.net/pandoc/try/?text=Introduction%0A%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0A%0ASome+introduction.%0A%0AOverview%0A%3D%3D%3D%3D%3D%3D%3D%3D%0A%0ALorem+ipsum%2C+...+See+%5Bthe+introduction%5D(%23introduction)&from=markdown&to=html

  6. The solution used in [5] produces a hyperlink: http://johnmacfarlane.net/pandoc/try/?text=Introduction%0A%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0A%0ASome+introduction.%0A%0AOverview%0A%3D%3D%3D%3D%3D%3D%3D%3D%0A%0ALorem+ipsum%2C+...+See+%5Bthe+introduction%5D(%23introduction)&from=markdown&to=latex

    Of course, for the printed version, a hyperlink is not sufficient. Instead, we want the reference to be printed like "See Section 1.2". To achieve this, we must override the hyperref command in the LaTeX template:

    \renewcommand*{\hyperref}[2][\ar]{%
      \def\ar{#2}
      #2 (\autoref{#1})}
  7. See https://github.com/fletcher/MultiMarkdown/wiki/MultiMarkdown-Syntax-Guide#automatic-cross-references

  8. I haven't researched this in detail, but as a last resort, the solution described in [6] should work here as well.

  9. Pandoc does not offer a general solution for handling cross-references to tables and figures. This issue and the related ones discusse the problem in detail https://github.com/jgm/pandoc/issues/813.

    "How do I make a reference to a figure in markdown using pandoc? [...] When it comes to pandoc, the only solution to make cross references is using directly latex keywords" -- http://stackoverflow.com/questions/9434536/how-do-i-make-a-reference-to-a-figure-in-markdown-using-pandoc

    There are various hacks available to workaround this problem:

  10. The following syntax works for referencing figures in both HTML and PDF:

    [label]: image.png
    
    ![Image Caption][label]
    
    A reference to the [image](#label).
    
  11. The solution presented in [10] should work for tables as well.

Clone this wiki locally