After I updated MikTex to the latest version, my Rmd files don't compile anymore. I installed tinytex, reinstalled miktex, R and RStudio several times. I use some newcommands like \C, \G etc. in a tex document which I include in my Rmd file. I use windows 10, the latest versions of R, RStudio and Miktex.
I asked a colleague (who had no compiling issues) to update his MikTex as well. After updating his MikTex, he had the same issue.
Here is the Rmd code:
---
documentclass: scrartcl
fontsize: 11pt
output:
pdf_document:
includes:
in_header: commands.tex
---
This is an example:
\begin{itemize}
\item hello
\item world
\end{itemize}
And here is the tex code:
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{icomma}
\usepackage[right,official]{eurosym}
\usepackage{hyperref}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage[shortlabels]{enumitem}
\usepackage{setspace}
\singlespacing
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Seitenformat und Layoutparameter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\hbadness=1000
\tolerance=10000
\voffset-2.80cm
\hoffset-2.60cm
\topmargin1.50cm
\headheight0.65cm
\headsep1.0cm
\topskip0cm
\textheight24.00cm
\footskip1.5cm
\footnotesep11pt
\evensidemargin2.50cm
\oddsidemargin2.50cm
\textwidth16cm
%\parindent0cm
%\parskip1.5ex plus0.5ex minus 0.5ex
% simple letters
\newcommand{\A}{{\mathbb A}}
\newcommand{\B}{{\mathbb B}}
\renewcommand{\C}{{\mathbb C}}
\newcommand{\D}{{\mathbb D}}
\newcommand{\E}{{\mathbb E}}
And I get:
processing file: example1.Rmd |......................................................................| 100% ordinary text without R code
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS example1.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output example1.tex --lua-filter "C:\Users\saski\Documents\R\win-library\4.0\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\saski\Documents\R\win-library\4.0\rmarkdown\rmarkdown\lua\latex-div.lua" --self-contained --highlight-style tango --pdf-engine pdflatex --include-in-header commands.tex --variable graphics output file: example1.knit.md
! LaTeX Error: Command \C undefined.
Fehler: LaTeX failed to compile example1.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See example1.log for more info. Ausführung angehalten
! LaTeX Error: File filename.sty not found.
– samcarter_is_at_topanswers.xyz