I suspect I have a fundamental comprehension gap in how R Markdown works under the hood.
This code, to simply make the YAML title bold & blue --
title: **"**\\textcolor{blue}{Font Test}**"**
author: "Office of Institutional Research & Assessment"
header-includes:
- \usepackage{xcolor}
- \usepackage[lf]{electrum}
- \usepackage[T1]{fontenc}
- \newcommand*\fontenc{\setmainfont{fontenc}}
- \newcommand{\mytitle}{\fontec\textcolor{blue}}
- \pretitle{\vspace{\droptitle}\centering\huge\fontenc}
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
pdf_document:
includes:
in_header: mystyle.sty
---
Will work in one RMD file but not in another. The non-working RMD is more complex, with tables (kable, kableExtra) does contain one option for knitr to format tables for latex, but that's it. The non-working RMD uses the same mystyle.sty for the font choice, etc. Hangs up the PDF creation when I use the code for the YMAL title.
Any thoughts? Reading recs?
David Thomas