3

How to change the font-size in a quarto pdf document?

I tried with the following settings, but I did not see any changes in font size.

format:
  pdf: 
    documentclass: article
    geometry:
      - top=30mm
      - left=20mm
    fontfamily: libertinus
    fontsize: 16pt

Thanks for your help.

zx8754
  • 52,746
  • 12
  • 114
  • 209
Wang
  • 1,314
  • 14
  • 21
  • 3
    I think it is possible, but 16pt is not an available font size for an article; you can choose 10, 11, or 12pts. The `memoir` class has more, maybe you can try with that documentclass. – Maël Nov 03 '22 at 10:37

1 Answers1

2

I had the same problem. Just by trial-and-error I found that leaving the line with documentclass: article out, made changing fontsize possible:

---
title: "Untitled"
output: pdf_document 
format:
  pdf:
    fontfamily: libertinus
    fontsize: 20pt

editor: visual
---
MarBlo
  • 4,195
  • 1
  • 13
  • 27
  • There are several problems with this: it is not an `article` class anymore, and it changes both the title and text size. – Maël Nov 03 '22 at 18:22
  • Thank you, @Maël. I have a change which does not change both title and text size in the same way. – MarBlo Nov 03 '22 at 18:31