tlverse/tlverse-handbook

HTML silenced in PDF output

Closed this issue · 3 comments

We'll eventually have to remove HTML output to compile a working PDF with all information included. For now, the fix below works but silences output:

Error: Functions that produce HTML output found in document targeting latex output.
Please change the output type of this document to HTML. Alternatively, you can allow
HTML output in non-HTML formats by adding this option to the YAML front-matter of
your rmarkdown file:

  always_allow_html: true

Note however that the HTML output will not be visible in non-HTML formats.

A reasonable workaround to this problem might be to use

if (knitr::is_latex_output()) {
  ...
}

throughout, to swap between "LaTeX-safe" and "HTML-only" outputs.

Hopefully resolved by #15

Actually resolved by #15 🎉