Blazingly fast highly opinionated markdown to pdf 1.5 converter aimed at writing scientific papers, e.g. in University.

  • By Sett
  • Last update: Jan 31, 2023
  • Comments: 7


Blazingly fast highly opinionated markdown to pdf 1.5 converter aimed at writing scientific papers, e.g. in University.

Getting started


Either download the latest release from the releases page or install with go:

go install


Every available option can be set in the markdown file with a YAML frontmatter.


You can also include multiple markdown files, which will act as if they were concatenated into a single file.


You can also set the path to the config file (e.g. if you want to have multiple configs) with -c or --config.

mdpaper -c single.yaml

How do I write a paper?

Everything from features through to configuration, and supported elements is documented in the References file.

Acknowledgements & Known Issues

Thanks to the people behind:

  • goldmark for the markdown parser

  • bibtex for the bibtex parser

  • mermaid for great looking diagrams

  • chroma for the code highlighting

  • Furqan Software for goldmark math extender code

  • Paragraphs that are split in the beginning may be out of order

    • use '\fill' in the meantime to force a column break and avoid the splitting



  • 1

    CLI option to chose config

    I want to be able to choose a different path to a .yaml file from the cli

    These should all work, but the last one uses config.yaml:

    $ mdpaper -c print.yaml
    $ mdpaper --config print.yaml
    $ mdpaper
  • 2

    [feat] graphviz dot code

    This removes all things mermaid and implements using dot as a lang in a code block to interpret it as a graphviz dot file and render it to an image. This is done with go and graphviz via cgo.

    fixes #30

  • 3

    Big images still break arranging pages

    Describe the bug If an image with a height > the column height is used, it creates an infinite loop in the arrangement logic.

    To Reproduce big image

    Expected behavior resize image to max column height

  • 4

    Multiple lists don't work

    Describe the bug All Lists disappear when there are multiple lists behind each other

    To Reproduce Markdown, and if applicable configuration, to reproduce error.

    - list1
    - list1
    - list1
    - list2
    - list2
    - list2

    Expected behavior 2 lists

    Screenshots nothing

  • 5

    markdown concatenation

    give the mdpaper command multiple markdown files, which it then concatenates in an efficient way


  • 6

    Make math parsing better

    It breaks a lot when there are no new lines around the math block. There are no plans to include inline math rendering in v2.0.0.

    If $$ are used in a paragraph they should just be rendered as regular text in a paragraph

  • 7

    No space after period with linebreak


    This is a cool first sentence.
    And this is another one in the same Paragraph.

    This results in the pdf looking like:

    This is a cool first sentence.And this is another one in the same Paragraph.