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

mdpaper

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

Getting started

Installation

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

go install github.com/sett17/mdpaper@latest

Usage

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

mdpaper my_paper.md

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

mdpaper abstract.md draft.md ackowledgements.md

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 my_paper.md

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

Download

mdpaper.zip

Comments(7)

  • 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 paper.md
    
    $ mdpaper --config print.yaml paper.md
    
    $ mdpaper paper.md
    
  • 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

    example

    mdpaper abstract.md draft.md acknowledgment.md
    
  • 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

    Markdown:

    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.