Issues with compilation to PDF

Fellow bookdown enthusiasts,

This is a strange issue. I have a bookdown/Tufte format project. Two days ago in the morning, the 8 rmd file project compiled to pdf fine. I went home for lunch and when I came back, after a couple of small modifications, compilation failed with a number of number of errors I'd never seen before, related to closing $, references not found, indexing-related errors - most or all of which were red herrings. I rolled back the modifications and the project failed to compile. In troubleshooting, I moved the .rmd files to another folder (all of which compile find individually), then brought them back 1 by 1, recompiling each time. Things worked well until I added file #6, which appeared to compile but the resulting pdf file only had 3 of the 6 chapters included. When I added #7, a bunch of errors and compilation failed. It appears that the failure to compile occurs after the .tex file is formed and is being converted to the .pdf. Does anyone know if there's a compilation guide somewhere to help with this? It's a big project and would take days to create a minimal example (I doubt if I even could) so I'm looking for general troubleshooting advice.


What a puzzle!

My first suggestion is to try creating a new bookdown project and adding your chapters and seeing if that successfully compiles.

jt - I took your advice, creating a new project in a new folder and loaded the .rmd and other files. Then I copied the .rmd files to a backup folder, deleted all but the index.rmd, then starting adding them back to the project folder one-by-one to see where the error occurs. 01-, 02-, and 03- all compiled fine. When I added 04-, errors cropped up with the compiler pointing to 01-. Leaving out 04-, I added 05- to 07- and all was fine. 08- then caused another failure in 01-. Leaving 04- and 08- out and adding 09- to 16- compiled fine. Including either 04- or 08- causes failure with then same error messages as before starting this process. So, back to square one.

It's so odd that it just broke suddenly. Is there any chance updates got run on your computer?

Are you running this in RStudio? If so, are you running the latest version? Since it's not working currently, I'd recommend upgrading everything to the latest version just to see if that fixes it.

I had just updated R and RStudio to the latest versions a week or so before these issues and didn't see the problems until 6 days ago. I've since updated all the R libraries used and the issue remains, plus now there's a new issue where all the figures generated in the rmarkdown code have the axis scales and titles cut off and just the plot portion of the figure filling the page margins. Something is seriously wrong with my set up. I went to the
C:\myDesktop\Data Analysis Book_bookdown_files_main_files\figure-latex
folder where the generated figures' .png files are stored and the .png files also have the axis scales and titles missing, so that seems like an Rmarkdown/png generation issue. This is getting to be like the Cat in the Hat where everything I do seems to make it worse. I'll try reinstalling R and RStudio and try again.

I reinstalled R, RStudio, and all the relevant libraries were updated. The figure and compiling issues remain. I'm not sure what else to reinstall. I guess I'll try MikTex n ext but then I'm out of ideas.

Very sorry things got worse.

I'm a bookdown enthusiast, rather than an expert. I'm out of ideas.

@dkStevensNZed sorry for the delay - I was away for a few days and could not help.

What are the remaining issues exactly ? Can you sum up them so that I can know where to focus ?
We'll find what has changed, and which config to change or what to fix.

Thanks for your patience and sorry for the trouble

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.