title: LaTeX compilation error in pdf bookdown package, but HTML output works perfectly
body: <p>I'm using the R Bookdown package along with TinyTex to generate both HTML and PDF formats of the book I'm writing.</p>
  <p>Before today, everything worked. But now I am now encountering a Latex compilation error to produce the bookdown PDF, and I can't figure out why. Here is the error:</p>
  <pre><code>! Package array Error: Empty preamble: `l' used. 
  Error: LaTeX failed to compile Shor-Book.tex.
  </code></pre>
  <p>I do have a non-empty preamble, which contains this:</p>
  <pre><code>\usepackage{booktabs}
  
  \usepackage{fontspec} % Font selection for XeLaTeX; see fontspec.pdf for documentation
  \defaultfontfeatures{Mapping=tex-text} % to support TeX conventions like ``---''
  \usepackage{xunicode} % Unicode support for LaTeX character names (accents, European chars, etc)
  \usepackage{xltxtra} % Extra customizations for XeLaTeX
  </code></pre>
  <p>_output.yml has the following entries for pdf_book:</p>
  <pre><code>bookdown::pdf_book:
    latex_engine: xelatex
    includes:
      in_header: preamble.tex
    citation_package: natbib
    mainfont: Crimson Pro
    sansfont: Source Sans Pro
    monofont: Ubuntu Mono
    extra_dependencies: [&quot;flafter&quot;]
    keep_tex: yes
    dev: &quot;cairo_pdf&quot;
  </code></pre>
  <p>The compilation log just repeats the error. Oddly, Build a book -&gt; pdf_document compiles (though without the custom fonts I set up in the YAML).</p>
  <p>The HTML bookdown output works without a problem.</p>
  <p>I am running R 4.0.4 under Ubuntu 21.04. I have the latest versions of all R packages, and I have updated TinyTex packages as well.</p>