Change highlight for pdf output with Rmarkdown

I have 2 problems with my pdf output from Rmarkdown:
First, I'm trying to modify the "highlight" and the general theme of my pdf output, but I haven't been able to find a solution.
So from this documentation 3.3 PDF document | R Markdown: The Definitive Guide
they say:

The highlight option specifies the syntax highlighting style. Its usage in pdf_document is the same as html_document (Section [3.1.4](https://bookdown.org/yihui/rmarkdown/html-document.html#appearance-and-style)). For example:

---
title: "Habits"
output:
  pdf_document:
    highlight: tango
---

but when i try to add highlight: tango to my rmarkdown document it's not working and i get this error :

Error in yaml::yaml.load(..., eval.expr = TRUE) : 
  Scanner error: mapping values are not allowed in this context at line 4, column 13
Calls: <Anonymous> ... parse_yaml_front_matter -> yaml_load -> <Anonymous>
Exécution arrêtée

I've tried to find more documentation on internet but I'm not sure that I have the right key words about this, and I'm not sure of what to expect from this highlight...

My idea is to get the same template as in the HTML document but in pdf...

Secondly, for the code representation into frame, the code it not properly written into the frame, which means that the line continue until "getting out" of the page without taking care of the margin, how can i modify this ?

I'm on MacOS Mojave 10.14.2 and Rstudio Version 1.2.1335

Thanks you !

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.