I have written a R script to generate 2 RMarkdown PDF reports for a given dataset.
The script runs without error on my main Linux machine with Texlive. I adjusted it for my work laptop with Windows and MiKTeX and it runs perfectly.
However when I installed the program on my coworker's Windows machine (he is the one who needs to be generating the reports every two weeks) RMarkdown fails to compile the second report. The first report runs just fine.
The log file ends with
[5 <D:/Tower_Raw Data/QAQC Reports/HB1ts_RawQAQCReport_20200322_files/figure-la
tex/unnamed-chunk-33-1.pdf>]
! Undefined control sequence.
\grffile@filename ->D:\Tower
_Raw Data\QAQC Reports\HB 1ts_RawQAQCReport_202...
l.292 ...22_files/figure-latex/unnamed-chunk-38-1}
\end{center}
! ==> Fatal error occurred, no output PDF file produced!
My first thought is that the "_" in the folder name "Tower_Raw Data" is a problem. Since the \grffile@filename line has unusual spacing around it. This doesn't seem to make sense though given that both reports are generated from the same data and written to the same folder with the first report compiling successfully.
Does anyone have a suggestion?
Here is the full log output if anyone is interested: https://pastebin.com/gFpgyzEc
pdflatex HB1ts_RawQAQCReport_20200322
. – Ulrike Fischer Apr 11 '20 at 16:02