Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specifying papersize for md to pdf conversion

Tags:

pandoc

I've read you can specify papersize by pandoc -V papersize:"a4paper" .... This doesn't seem to work anymore. I've managed to specify B5 using

pandoc -V papersize:b5 -o out.pdf in.md

But this fails for e.g. b6. The following -V arguments also all appear to have no effect:

-V papersize:b5paper
-V papersize:"b5paper"
-V "papersize:b5paper"

What is the proper way to format this, or am I missing something more fundamental? In my opinion the documentation is far from clear, lacking e.g. any examples.

like image 856
geotheory Avatar asked Jul 19 '16 09:07

geotheory


2 Answers

pandoc -s -V papersize:a4

Pandoc's LaTeX template will append paper to a4...

like image 138
mb21 Avatar answered Sep 17 '22 16:09

mb21


You can use either -V papersize:a4 per the manual or -V geometry:a4paper. The latter has a side-effect of giving smaller margins than the default template.

like image 45
Colonel Panic Avatar answered Sep 20 '22 16:09

Colonel Panic