I am attempting to create a CV and resume in RMarkdown using the "vitae" package (https://github.com/mitchelloharawild/vitae/tree/master), but my RStudio has been returning the below error message:
! LaTeX Error: Missing \begin{document}.
Error: LaTeX failed to compile Master_Resume.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Master_Resume.log for more info. Execution halted
The error seems to only occur on a new computer I purchased, despite successfully installing RStudio on it and being able to install all packages successfully by following the article at https://robertochiosa.medium.com/import-export-r-packages-a6a122005e00. I am still able to complile/knit the RMarkdown file to a pdf successfully on my old computer, just not my new one.
Per the suggestion in the error message, I followed the troubleshooting steps at https://yihui.org/tinytex/r/#debugging. See the steps below and what happened after each step:
STEP ONE: Update all R and LaTeX packages.
I was successfully able to ensure all R and LaTeX packages are up-to-date,
STEP TWO: Reinstall TinyTex.
I was able to reinstall TinyTex successfully.
STEP THREE: If neither updating nor reinstalling solves the problem, set the option in R to show additional messages to help me debug the problem:
options(tinytex.verbose = TRUE)
This resulted in the message: "I was unable to find any missing LaTeX packages from the error log Master_Resume.log. ! LaTeX Error: Missing \begin{document}.
Error: LaTeX failed to compile Master_Resume.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Master_Resume.log for more info. Execution halted"