Reputation: 5994
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?
Upvotes: 57
Views: 55895
Reputation: 8937
Add this to your incantation:
-V fontsize=12pt
This only works for font sizes between 8pt and 12pt.
Upvotes: 56
Reputation: 14962
If you want to go bigger than 12pt you can use the extsizes package. Was already pre installed for me, so this worked out of the box with pandoc:
---
documentclass: extarticle
fontsize: 14pt
---
…
Possible sizes are 8pt, 9pt, 10pt, 11pt, 12pt, 14pt, 17pt, 20pt.
Upvotes: 48
Reputation: 49044
For new users of pandoc (like myself), as an alternative to specifying variables with the -V
flag, you can add them to the YAML metadata block of the markdown file. To change the fontsize, prepend following to your markdown document.
---
fontsize: 12pt
---
Works with fontsize 10,11, and 12. In addition to the comments on John MacFarlane's answer, there is some good info on specifying additional fontsizes with latex in this article (inline latex can be used in pandoc markdown documents being converted to pdf).
Upvotes: 34