0

I've been using Quarto for a few days to produce pdf documents. When specifying the main font used, I can perfectly well choose "Cambria" or "Calibri", but I cannot choose fonts like "Computer Modern Sans Serif".

    format:
     pdf:
     toc: true
     toc-title: "Text mining"
     number-sections: true
     colorlinks: true
     pdf-engine: lualatex
     mainfont: "Computer Modern"
     fontsize: 12pt

What changes should I make to the code to produce pdfs in the font of my choice? The solution proposed here won't work.

boredgirl
  • 49
  • 7
  • 1
    Do you have the font Computer Modern Sans Serif installed on your system? If so, the approach you are trying should work! – shafee Dec 25 '22 at 10:40

1 Answers1

2

You could use fontfamily in your yaml header with pdflatex engine and check The LaTeX Font Catalogue, which shows that Computer Modern Sans Serif is available. Here some reproducible code:

---
format:
  pdf:
    toc: true
    toc-title: "Text mining et Première Guerre mondiale"
    number-sections: true
    colorlinks: true
    pdf-engine: pdflatex
    fontfamily: "Computer Modern Sans Serif"
    fontsize: 12pt
---

This is some example text. 
Quinten
  • 35,235
  • 5
  • 20
  • 53