0

I am writing a report in R markdown (using pdflatex to convert it into pdf) and I am trying to set the style of the different headers (color, size, interline before and after).
I am using this formalisation :
#H1
##H2
###H3
I have the basics of Markdown and LaTeX but I'm far to be an expert. Is there a way to do it without creating a LaTeX template ? For exemple with some YAML code in the head of the document ?
Mine for now :

---
title: "Guide"
output: 
  pdf_document: 
    fig_caption: yes
    highlight: tango
    toc: yes
    toc_depth: 2
documentclass: report
---

Or by changing the R options ?

```{r set-options, echo=FALSE, cache=FALSE}
options(some stuff)
```

I've found some indications while searching that suggest it may be possible, but I could'nt manage to find any understandable exemple ...
Thanks for any feedback.

1 Answers1

0

If you do not want to do any LaTeX, you could add your own CSS (see documentation) and set it that way, as in this answer.

You would then need to do: How to convert Markdown + CSS -> PDF?

However, your results may not be as faithfully rendered as if you create a LaTeX template.

Community
  • 1
  • 1
C8H10N4O2
  • 18,312
  • 8
  • 98
  • 134