illinois-r / uiucthemes

RMarkdown Templates for UIUC Theme-Oriented Documents
https://illinois-r.github.io/uiucthemes/
Other
51 stars 12 forks source link

LaTeX in latex_journal_format #10

Closed daviddalpiaz closed 7 years ago

daviddalpiaz commented 7 years ago
$$
\mathbb{E}_{X, Y} \left[ (Y - f(X)) ^ 2 \right] = \mathbb{E}_{X} \mathbb{E}_{Y \mid X} \left[ ( Y - f(X) ) ^ 2 \mid X = x \right]
$$

The above won't knit. Produces the following error.

Collected error summary (may duplicate other messages):
  pdflatex: Command for 'pdflatex' gave return code 1
      Refer to 'Untitled.log' for details
Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs of latex/pdflatex.
! Undefined control sequence.
l.45 \mathbb
            {E}_{X, Y} \left[ (Y - f(X)) ^ 2 \right] = \mathbb{E}_{X} \mathb...

Error: Failed to compile Untitled.tex. See Untitled.log for more info.
Execution halted

This would knit with a a defauly RMarkdown document, without specifying any LaTeX packages.

coatless commented 7 years ago

@daviddalpiaz Add to the YAML preamble key \usepackage{amssymb}, e.g.:

preamble: >
  \usepackage{amsmath}
  \usepackage{amssymb}

Does that work? If so, would you want this to be moved inside the template.tex? Or kept in the preamble?

coatless commented 7 years ago

@daviddalpiaz could you reinstall via:

devtools::install_github('coatless/uiucthemes')

This should be addressed.

daviddalpiaz commented 7 years ago

Excellent! I'll try to get you the sections/wording later today or tomorrow.