Skip to content

Instantly share code, notes, and snippets.

@max-mapper
Last active November 6, 2024 09:03
Show Gist options
  • Save max-mapper/97190db73ac19fc6c1d9beee1a6e4fc8 to your computer and use it in GitHub Desktop.
Save max-mapper/97190db73ac19fc6c1d9beee1a6e4fc8 to your computer and use it in GitHub Desktop.
How to make a scientific looking PDF from markdown (with bibliography)

How to make a scientific looking PDF from markdown (with bibliography)

Markdown is the most common format for writing on GitHub, and is what I use for all of my own documentation. It also exports to HTML and other convenient formats for reading on mobile devices. However, sometimes you want to export it as a PDF so that you can author scientific papers and export the formats that pre-print servers want.

markdown example

@sje30
Copy link

sje30 commented May 6, 2017

@wdeback
Copy link

wdeback commented Nov 26, 2018

very useful, thanks.

One issue is that the bibtex reference in paper.md does not work.

To get the reference list, please replace the brackets in
(@pizza2000identification)
with square brackets:
[@pizza2000identification].

@masonlr
Copy link

masonlr commented Apr 25, 2019

Thanks for the writeup. Note also that the YAML header also supports an abstract:

title: My Title
abstract: Abstract text goes here.

@suriyadeepan
Copy link

To add multiple authors:

author: 
  - "Author 1"
  - "Author 2"

@Manwong946
Copy link

I would like to know how to convert the citation to the one with a number. eg. Pizza [1] is an understudied yet widely utilized implement for...
On reference:
[1] Pizza, Mariagrazia, Vincenzo Scarlato, Vega Masig- nani, Marzia Monica Giuliani, Beatrice Arico, Maur- izio Comanducci, Gary T Jennings, et al. 2000. “Iden- tification of Vaccine Candidates Against Serogroup B Meningococcus by Whole-Genome Sequencing.” Sci- ence 287 (5459). American Association for the Ad- vancement of Science: 1816–20.

@ppmzhang2
Copy link

ppmzhang2 commented Apr 22, 2022

It seems that the pandoc-citeproc has been deprecated. You may want to replace the --filter pandoc-citeproc option with --citeproc

@TimOliverMaier
Copy link

I would like to know how to convert the citation to the one with a number. eg. Pizza [1] is an understudied yet widely utilized implement for... On reference: [1] Pizza, Mariagrazia, Vincenzo Scarlato, Vega Masig- nani, Marzia Monica Giuliani, Beatrice Arico, Maur- izio Comanducci, Gary T Jennings, et al. 2000. “Iden- tification of Vaccine Candidates Against Serogroup B Meningococcus by Whole-Genome Sequencing.” Sci- ence 287 (5459). American Association for the Ad- vancement of Science: 1816–20.

In case somebody found this page in search for an answer for this:
with the --csl={PATH_TO_CSL_FILE} flag. See here. You can download csl files from the Zotero style repository.

@paulocoghi
Copy link

If in Debian or any Debian-based linux distro, like Ubuntu, do:

sudo apt-get install pandoc pandoc-citeproc texlive-latex-extra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment