markdown pdf by pandoc : fontsize of 11 or 12pt grow the font, but 13 or 14pt return to a lower size

Viewed 226

Using this header :

---
header-includes:
- \usepackage{fvextra}
- \DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,breakanywhere,breaksymbol=,breakanywheresymbolpre=,commandchars=\\\{\}}

title: "Analyse spatiale"
subtitle: "Geostatistique, QGIS, Geoserver"
author: Marc Le Bihan
geometry: margin=2cm
fontsize: 12pt
output: pdf
classoption: fleqn
urlcolor: blue
---

for a markdown transformed with pandoc to a pdf with this markdown command :

pandoc -f markdown-implicit_figures analyse_spatiale.md -o analyse_spatiale.pdf

11pt or 12pt have a visible effect in the pdf for fontsize:, but 13pt, 14pt return to a lower font.

Why?

2 Answers

13pt and 14pt are not class options which are allowed by default. They will fall back to the default 10pt option. However you can use the extsizes package to make more font sizes available:

---
title: "Analyse spatiale"
subtitle: "Geostatistique, QGIS, Geoserver"
author: Marc Le Bihan
output: pdf_document
geometry: margin=2cm
classoption: fleqn
urlcolor: blue
header-includes:
- \usepackage{fvextra}
- \DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,breakanywhere,breaksymbol=,breakanywheresymbolpre=,commandchars=\\\{\}}
- \usepackage[14pt]{extsizes}
---

fff

This has to do with LaTeX, which pandoc uses to generate the PDF: The default LaTeX article class only supports 10pt, 11pt, and 12pt font sizes; any other value will be ignored.

Related