title: How to pass options to a LaTeX font in R Markdown?
body: <p><code>rmarkdown</code>, following {xe|lua}latex, allows to specify fonts for main text, sans-serif text, monspaced text (most notably code chunks !) and math fonts in the YAML header. At least for PDF rendering via xetex, this works.</p>
  
  <p>However, I found no (documented) way to pass options to the underlying <code>setxxxfont</code> \LaTeX command. For example, the YAML fragment :</p>
  
  <pre><code>```
  monofont: Inconsolata
  ```
  </code></pre>
  
  <p>generates the following \LaTeX fragment :</p>
  
  <pre><code>\setmonofont[Mapping=tex-ansi]{Inconsolata}
  </code></pre>
  
  <p>I have two questions with this:</p>
  
  <ol>
  <li>why is the <code>Mapping=tex-ansi</code> added ? And how to control it ? (I'm working in UTF8...).</li>
  <li>How could I set additional arguments for the font options i.e. <code>\setmonofont[Scale=0.91]{TeX Gyre Cursor}</code>?</li>
  </ol>
  
  <p>The R Markdown <a href="https://bookdown.org/yihui/rmarkdown/" rel="nofollow noreferrer">book</a> and the Pandoc's User's <a href="https://pandoc.org/MANUAL.html" rel="nofollow noreferrer">Guide</a> did not reveal anything pertinent.</p>