Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

From Markdown to PDF: how to change the font-size with Pandoc?

I'm converting some Markdown files into PDF using Pandoc like this:

pandoc input.md -V geometry:margin=1in -o output.pdf  

By default, the font-size is quite small in the pdf. I'd like to make all the fonts bigger (title, sub title, text, etc.). How can I do that?

like image 349
pimpampoum Avatar asked May 22 '14 15:05

pimpampoum


People also ask

How do I change the font in pandoc?

Get the default tex template from pandoc by running pandoc -D latex and then add the font definitions you want to the document. save as my-font. latex . Then run pandoc with the switch --template=my-font .

How do I increase font size in markdown?

To change the font size, you don't need to know a lot of html for this. Open the html output with notepad ++. Control F search for "font-size". You should see a section with font sizes for the headers (h1, h2, h3,...).


1 Answers

Add this to your incantation:

-V fontsize=12pt 
like image 127
John MacFarlane Avatar answered Oct 11 '22 08:10

John MacFarlane