Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package babel Error: Unknown option french' or english' #257

Open
seananderson opened this issue Mar 21, 2024 · 7 comments
Open

Package babel Error: Unknown option french' or english' #257

seananderson opened this issue Mar 21, 2024 · 7 comments
Labels
dependency issue Problem with depended-on packages

Comments

@seananderson
Copy link
Member

For some reason, the current tinytex does not install the babel-french or babel-english packages when needed. This is a recent problem as far as I can tell. Users can fix this by running

tinytex::tlmgr_install('babel-french')
tinytex::tlmgr_install('babel-english')

I don't know if this will resolve itself or if we should note this in the install instructions, but at the very least I'm noting this here in case someone is searching for this error.

We even have to do this on the continuous integration script:

tinytex::tlmgr_install('babel-french')
tinytex::tlmgr_install('babel-english')

@krHolt
Copy link

krHolt commented Apr 24, 2024

Just a note that this babel error just popped up for me for the first time, but using the tinytex install lines you have here fixed it. Thanks.

@cgrandin cgrandin added the dependency issue Problem with depended-on packages label Apr 25, 2024
@carrieholt
Copy link

carrieholt commented Jul 3, 2024

Just a note that this babel error just popped up for me for the first time, but using the tinytex install lines you have here fixed it. Thanks.

Yes, please do add to the install instructions. I was quite confused why my new install on my new computer (R4.4.1, Rtools44, new tinytex) wasn't working until I found this. Thanks!

seananderson added a commit that referenced this issue Jul 3, 2024
@seananderson
Copy link
Member Author

@seananderson
Copy link
Member Author

Perhaps we should check this on the fly and issue an informative message. E.g.:

tinytex::check_installed("babel-french")

The downside is this takes a second or two for me. Hopefully this will resolve itself upstream.

@ricardd
Copy link
Contributor

ricardd commented Nov 14, 2024

another error that is seemingly related to failed dependencies, I didn't want to open another issue since this one is still opened

Expected behavior
It builds

Observed behavior
Error:

! Undefined control sequence.
l.600 \bibitem[\citeproctext
                            ]{ref-benoit2006} 

so something to do with references

Platform and version:
Windows
R 4.4.2 (2024-10-31 ucrt) -- "Pile of Leaves"
RStudio 2024.09.0 Build 375

> tinytex::tlmgr_version()
tlmgr revision 71331 (2024-05-24 09:30:36 +0200)
tlmgr using installation: C:/Users/RicardD/AppData/Roaming/TinyTeX
TeX Live (https://tug.org/texlive) version 2024

Additional context:
tinytex package was updated and reinstalled

This type of error occurs when something unexpected happens in the LaTeX dependencies (also in issue #224). Is there a way to avoid this? In the meantime, how to troubleshoot this? The pandoc call is below.

> render()
Rendering the Research Document as a PDF document in English ...
                                                                                                                    
"C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/pandoc" +RTS -K512m -RTS resdoc.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output resdoc.tex --lua-filter "C:\Users\RicardD\AppData\Local\R\win-library\4.4\bookdown\rmarkdown\lua\custom-environment.lua" --lua-filter "C:\Users\RicardD\AppData\Local\R\win-library\4.4\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\RicardD\AppData\Local\R\win-library\4.4\rmarkdown\rmarkdown\lua\latex-div.lua" --metadata-file "C:\Users\RicardD\AppData\Local\Temp\1\RtmpEhKqrO\file11f0536e7715" --embed-resources --standalone --table-of-contents --toc-depth 3 --template "C:\Users\RicardD\AppData\Local\R\win-library\4.4\csasdown\csas-tex\res-doc.tex" --number-sections --pdf-engine pdflatex --top-level-division=chapter --wrap=none --default-image-extension=png --include-in-header "C:\Users\RicardD\AppData\Local\Temp\1\RtmpEhKqrO\rmarkdown-str11f05633472e.html" --variable tables=yes --standalone -Mhas-frontmatter=false --citeproc 
tlmgr.pl: package repository https://ca.mirrors.cicku.me/ctan/systems/texlive/tlnet (not verified: pubkey missing)
tlmgr.pl install: package already present: l3backend
tlmgr.pl install: package already present: l3backend-dev
Error: LaTeX failed to compile resdoc.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See resdoc.log for more info.

this also breaks the unit testing when doing a build test

@seananderson and @cgrandin, what would you suggest to troubleshoot this?

@cgrandin
Copy link
Contributor

cgrandin commented Nov 15, 2024

@ricardd When I used tinytex, I would uninstall and reinstall tinytex to fix things like these. I would suggest that since it's faster than trying to debug the issue.

First make sure you are actually using it: tinytex::is_tinytex()

@ricardd
Copy link
Contributor

ricardd commented Nov 15, 2024

@cgrandin what I usually do is delete the folder where tinytex installs (in my case it's C:\Users\RicardD\AppData\Roaming\TinyTeX), I then go in RStudio and invoke tinytex to install again (tinytex::install_tinytex())

the first rendering after that takes a while since the required packages need to be reinstalled, but eventually it completes

despite the reinstall, the error above persists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency issue Problem with depended-on packages
Projects
None yet
Development

No branches or pull requests

5 participants