mitchelloharawild / vitae

R Markdown Résumés and CVs

Home Page:https://pkg.mitchelloharawild.com/vitae/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

knit pandoc new version problem

fgardavaud opened this issue · comments

Hi,

I have code my curriculum vitae with this package (thanks a lot for that) based on Lorena Abad template (thks again).

If I knit my Rmd document with RStudio 2022.07.1+554 "Spotted Wakerobin" Release for macOS it works !

If I knit the same Rmd document with the next release RStudio 2022.07.2+576 "Spotted Wakerobin" it does not work.
I got this terminal output :
/Applications/RStudio.app/Contents/MacOS/quarto/bin/tools/pandoc +RTS -K512m -RTS CV_public_english.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output CV_public_english.tex --lua-filter /Library/Frameworks/R.framework/Versions/4.2/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.2/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --embed-resources --standalone --template /Library/Frameworks/R.framework/Versions/4.2/Resources/library/vitae/rmarkdown/templates/awesomecv/resources/awesome-cv.tex --highlight-style tango --pdf-engine xelatex --lua-filter /var/folders/l9/b_x839tj1w74jktj8jtfh2qh0000gn/T//RtmpMpgoDx/multiple-bibliographies.lua --variable show_footer=TRUE

! LaTeX Error: Missing \begin{document}.

Error : LaTeX failed to compile CV_public_english.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See CV_public_english.log for more info.

It's the same behavior for the most recent releases.

I think the problem is on pandoc behavior.

I analyze the difference between the two versions of Rstudio and, in my opinion, the problem could be the difference on pandoc embedded version as :

pandoc_version() (for RStudio 2022.07.1+554)
[1] ‘2.18’

pandoc_version() (for RStudio 2022.07.2+576)
[1] ‘2.19.2’

To knit my document I can use the old version of Rstudio but it will be obviously problematic in the future.

If someone can explain me how to deal with newer pandoc version it would be very appreciable.
Thanks for your time.

Same issue

I can't reproduce this error, and I have pandoc version 2.19.2.

Hi @mitchelloharawild, @loreabad6,
I analyze a bit more this bug.
If I compile my .Rmd document with RStudio 2022.07.1+554 "Spotted Wakerobin" Release for macOS it works !
In this release, pandoc version = 2.18
But with the same Rstudio version, if I install pandoc with for instance brew (so the last version of pandoc), the compilation will crash as Rstudio take the newer version of pandoc in the system.
So, I definitively think there is a problem with pandoc.
I make another test with the next version of Rstudio (RStudio 2022.07.2+576 "Spotted Wakerobin" Release for macOS) and without pandoc installed on my Mac, the compilation crash too with this output :
A new version of TeX Live has been released. If you need to install or update any LaTeX packages, you have to upgrade TinyTeX with tinytex::reinstall_tinytex(repository = "illinois"). ! LaTeX Error: Missing \begin{document}. Errorr : LaTeX failed to compile CV_public_english.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See CV_public_english.log for more info. Execution stopped

In this release, pandoc version = 2.19.2.

Next, I found this post of the Yihui master :
https://yihui.org/en/2017/11/pandoc-2/

Also, Do you want my .Rmd file ?

Thanks for the added info, if you're able to share your .Rmd that could help.

Found a way around this. I am not sure if it is a bug or if the includes formulation should be preferred to header-includes. loreabad6/R-CV#2 (comment)

@loreabad6
Great it's work on my side too.
Congratulation for debugging with success and for your reactivity !

Nice, glad this is figured out. I'm not sure why header-includes isn't working, as far as I'm aware the awesomecv template is set up to accept this as an input. If anyone can figure it out, would be happy to accept a PR to fix this.

$for(header-includes)$
$header-includes$
$endfor$