Home Comments Thread

108 Replies

Page 1 / 2
giscus-bot giscus-bot 2022-12-17 03:11:30
访客 *Nina* @ 2018-03-26 17:13:35 写道:

Dear Yihui,

Thanks for your time.

I am trying to knit the Rmd file to pdf, but the following shows. Could you help?

! Package inputenc Error: Unicode char 澶?(U+5927)  
(inputenc) not set up for use with LaTeX.

错误: Failed to compile 2_note_Introduction_to_data.tex. See 2_note_Introduction_to_data.log for more info.  
此外: Warning messages:  
1: 运行命令'"pdflatex" -halt-on-error -interaction=batchmode "2_note_Introduction_to_data.tex"'的状态是1  
2: In grepl("==> Fatal error occurred", x[i], fixed = TRUE) :  
输入的字符串1不适用于此语言环境  
停止执行  

Thanks so much!
Nina

yihui yihui 2022-12-17 03:14:43

This may not be an easy question without seeing the actual source document, but you could try latex_engine: xelatex under pdf_document (i.e. use XeLaTeX to compile the document): https://bookdown.org/yihui/rmarkdown/pdf-document.html

Originally posted on 2018-03-26 20:29:01

jcssingson jcssingson 2023-03-02 05:38:13

Hi! I also encountered the same problem, in my case it was:

! LaTeX Error: Unicode character ^^[ (U+001B)
               not set up for use with LaTeX.

I realized that this came from the message when I load a package that has a lengthy message once loaded. I solved this by adding "include = FALSE" in the chunk so the lengthy message is not included when the rmd file is being knit to pdf.

Hope this helps.

VrishaliSingam VrishaliSingam 2023-03-14 21:16:33

Hi ! I have also encountered similar problem and I am trying to debug it but not able to find the solution.
following was the ERROR message in my case:

! LaTeX Error: Unicode character ○ (U+25CB)
not set up for use with LaTeX.

Error: LaTeX failed to compile Case_study-Bellabeat.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Case_study-Bellabeat.log for more info.
Execution halted

cderv cderv 2023-03-14 21:25:57

Are you using a LaTeX engine that supports Unicode ? pdflatex the defauilt does not
See our tips about that https://bookdown.org/yihui/rmarkdown-cookbook/latex-unicode.html

VrishaliSingam VrishaliSingam 2023-03-14 21:40:36

Thank you for your reply. I was running the code in R Markdown ( RStudio) and the Markdown file included symbols i.e. The White Circles.
I deleted those symbols from my Text and the Error resolved.

giscus-bot giscus-bot 2022-12-17 03:11:31
Guest *DHZ* @ 2019-04-12 00:01:54 originally posted:

Hello Yihui,

I am having issues with using R markdown and trying to knit into a pdf. This issue shows up:

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7000)

log4cxx: setFile(/Users/hoferziccardi/Library/Application Support/MiKTeX/texmfs/data/miktex/log/pdflatex.log,true) call failed.

log4cxx: IO Exception : status code = 13

log4cxx: No output stream or file set for the appender named [RollingLogFile].

Sorry, but pdflatex did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

/Users/hoferziccardi/Library/Application Support/MiKTeX/texmfs/data/miktex/log/pdflatex.log

Error: Failed to compile working_List_de_Exercício_1_pdf.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips.

Execution halted

I'm not sure how to resolve this!

yihui yihui 2022-12-17 03:14:44

You may try to uninstall MiKTeX and install TinyTeX instead.

Originally posted on 2019-04-12 13:39:11

giscus-bot giscus-bot 2022-12-17 03:14:45
Guest *DHZ* @ 2019-04-16 07:48:46 originally posted:

Yihui, I appreciate you taking the time to answer.

I should have said this before, but I use a Mac.

I uninstalled MiKTeX and went into RStudio, pasting the following code to try to install it:

install.packages('tinytex')
tinytex::install_tinytex()

Is this correct?

The response was:

add_link_dir_dir: destination /usr/local/bin not writable, no links from /Users/hoferziccardi/Library/TinyTeX/bin/x86_64-darwin.

tlmgr: An error has occurred. See above messages. Exiting.

add of symlinks had 1 error(s), see messages above.

Error: Failed to install TinyTeX

In addition: Warning message:

Detected an existing tlmgr at /Users/hoferziccardi/Library/TinyTeX/bin/x86_64-darwin/tlmgr. It seems TeX Live has been installed (check tinytex::tinytex_root()). You are recommended to uninstall it, although TinyTeX should work well alongside another LaTeX distribution if a LaTeX document is compiled through tinytex::latexmk()

Is this because its a Mac? Should I install something else? I did try installing Mactex first (before even attempting Miktex) and it still gave an error message (can't remember which one, but it wouldn't let me knit to a pdf).

I'm new to R though, so I could just be making a stupid mistake and not be realizing it.

What should I do? Also, regarding it detecting an existing tlmgr I'm not sure what they mean by this. I definitely uninstalled the Miktex and Mactex I had installed earlier and emptied the bin.

yihui yihui 2022-12-17 03:14:46

It seems your TinyTeX installation was mostly successful. Please make sure all your R packages are up-to-date: https://yihui.name/en/2017/05/when-in-doubt-upgrade/

After that, quit and reopen RStudio, then retry to compile R Markdown to PDF.

If it still does not work, please file a Github issue to the tinytex repo.

Originally posted on 2019-04-17 13:24:29

giscus-bot giscus-bot 2022-12-17 03:11:32
Guest *Duleep Samuel* @ 2019-04-19 12:50:34 originally posted:

Sir will be thankful for a few more examples of usage. Thanks

giscus-bot giscus-bot 2022-12-17 03:11:33
Guest *Felix Kpogo* @ 2019-05-02 03:24:34 originally posted:

Hello Yihui,
I am a windows user, I have installed R, and I installed the MIKTex version on my PC but I am unable to knit to Pdf. This is the message I get:

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7000 64-bit)
entering extended mode

Sorry, but C:UsersFELIXK~1AppDataLocalProgramsMIKTEX~1.9miktexbinx64pdflatex.exe did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

C:UsersFelix KpogoAppDataLocalMiKTeX2.9miktexlogpdflatex.log
Error: Failed to compile demo2.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips.
In addition: Warning message:
In readLines(logfile) : incomplete final line found on 'demo2.log'
Execution halted

Can you please help me resolve this?

yihui yihui 2022-12-17 03:14:47

Try to install TinyTeX instead: https://bookdown.org/yihui/rmarkdown/installation.html

Originally posted on 2019-05-02 13:42:43

giscus-bot giscus-bot 2022-12-17 03:14:48
Guest *Emilija* @ 2019-05-04 10:52:02 originally posted:

same problem, doesn't help

scottkosty scottkosty 2023-06-02 17:31:04

I know this is late, but in case anyone else comes across this: I wonder if the issue could be the tilde, ~, in the path. You could try changing to the directory (e.g., in R with setwd()) before trying to compile. In general, tinytex::latexmk() will not work with a ~ in the path to the file. You can either change directories manually, or you could try putting \string just before the tilde in the file name argument.

giscus-bot giscus-bot 2022-12-17 03:11:34
Guest *Lau* @ 2019-05-11 10:26:43 originally posted:

I am having issues with using R markdown and trying to knit into a pdf.
This the message I get:

! Package inputenc Error: Unicode character ≥ (U+2265)
(inputenc) not set up for use with LaTeX.

Try other LaTeX engines instead (e.g., xelatex) if you are using pdflatex. For R Markdown users, see https://bookdown.org/yihui/rmarkdown/pdf-document.html
Errore: Failed to compile Guida_pericolosa.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See Guida_pericolosa.log for more info.
Esecuzione interrotta

Can you help me?

yihui yihui 2022-12-17 03:14:49

What is not clear in the error message?

Originally posted on 2019-05-11 14:37:32

giscus-bot giscus-bot 2022-12-17 03:11:35
Guest *Craig Van Pay* @ 2019-05-21 15:05:32 originally posted:

Hi Yihui,

I am new to LaTeX and tinytex and get this error when trying to knit a PDF:

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/W32TeX) (preloaded format=pdflatex)
restricted write18 enabled.
entering extended mode
! Package inputenc Error: Unicode character σ (U+03C3)
(inputenc) not set up for use with LaTeX.

Try other LaTeX engines instead (e.g., xelatex) if you are using pdflatex. For R Markdown users, see https://bookdown.org/yihui/rmarkdown/pdf-document.html
Error: Failed to compile ChildLangManuscript.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See ChildLangManuscript.log for more info.
Execution halted

Can you please advise?

yihui yihui 2022-12-17 03:14:49

Yes, I have already advised in the error message. What did you do after reading the full error message?

Originally posted on 2019-05-21 16:03:04

giscus-bot giscus-bot 2022-12-17 03:14:50
Guest *Craig Van Pay* @ 2019-05-22 16:51:16 originally posted:

Yes, sorry doing exactly what you specified helped in the error message. I did not know how to change the LaTeX engine but learned through another of your FAQ. Sorry for the dumb question. :)

giscus-bot giscus-bot 2022-12-17 03:11:36
Guest *Ajinkya* @ 2019-09-09 20:25:09 originally posted:

! Undefined control sequence.
l.6 ifnum 0ifxetex 1fiifluatex
1fi=0 % if pdftex

Error: Failed to compile example.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See example.log for more info.
Execution halted

I am getting this error. How should I resolve it?

giscus-bot giscus-bot 2022-12-17 03:11:37
访客 *黄傲* @ 2019-11-11 01:59:45 写道:

Hi, Yihui,
I'm a beginner of r markdown, and I encountered a problem when I try to get the pdf document.
tlmgr search --file --global "/grffile.sty"
! LaTeX Error: File `grffile.sty' not found.
I tried to tlmgr_install(), but it seems no change. could you please give me some recommendation?

Thanks a lot !

giscus-bot giscus-bot 2022-12-17 03:14:51
Guest *Guilherme Ottoni* @ 2019-11-11 13:13:15 originally posted:

I've tried the following and I couldn't manage to solve the problem:
tlmgr_search('/grffile.sty')
tlmgr search --file --global "/grffile.sty"
tlmgr.pl: package repository http://linorg.usp.br/CTAN/systems/texlive/tlnet (verified)
It returns no package, so I can't install any.

yihui yihui 2022-12-17 03:14:53

I just fixed the issue in rmarkdown. Please see rstudio/tinytex#152 (comment)

Originally posted on 2019-11-11 15:56:04

giscus-bot giscus-bot 2022-12-17 03:14:54
Guest *Guilherme Ottoni* @ 2019-11-11 16:19:17 originally posted:

Working perfectly!
Many thanks, Yihui

giscus-bot giscus-bot 2022-12-17 03:11:38
Guest *César Lemos* @ 2019-11-11 15:01:31 originally posted:

Hi, Yihui!

I try to get the pfd document and the following message appears:

tlmgr search --file --global "/grffile.sty"
! LaTeX Error: File `grffile.sty' not found.

Do you have any recommendations for the file to be generated?

Many thanks!!

yihui yihui 2022-12-17 03:14:52

Please see rstudio/tinytex#152 (comment)

Originally posted on 2019-11-11 15:55:31

giscus-bot giscus-bot 2022-12-17 03:14:55
Guest *César Lemos* @ 2019-11-11 16:38:11 originally posted:

Thank you very much!! :D

giscus-bot giscus-bot 2022-12-17 03:11:39
Guest *Ana-Maria-Magdalena Zambori* @ 2019-12-09 10:42:26 originally posted:

Hi, Yihui!

I have this Error....output file: Klausur.knit.md

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS Klausur.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output Klausur.tex --self-contained --include-in-header "C:UsersANAZADocumentsRwin-library3.5rmarkdownrmdlatexsubtitle.tex" --highlight-style tango --latex-engine pdflatex --variable graphics --include-in-header "C:UsersANAZAAppDataLocalTempRtmpkhl970rmarkdown-str3bb012e16b5c.html" --include-in-header "C:UsersANAZADocumentsRwin-library3.5rmarkdownrmdlatexcompact-title.tex"
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7000 64-bit)
entering extended mode
! Extra alignment tab has been changed to cr.
endtemplate

Fehler: Failed to compile Klausur.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See Klausur.log for more info.
Ausführung angehalten

Can you help me?

yihui yihui 2022-12-17 03:14:56

I'm not sure if it is the same issue as rstudio/rmarkdown#1716, but please try remotes::install_github('rstudio/rmarkdown').

Originally posted on 2019-12-09 14:57:20

giscus-bot giscus-bot 2022-12-17 03:11:41
Guest *Liz Hurtado* @ 2020-01-02 17:40:24 originally posted:

Hi, Yihui!
I have this error. I appreciate yout help.

output file: cv.knit.md

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/W32TeX) (preloaded format=pdflatex)
restricted write18 enabled.
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil: c:/users/lizbh/appdata/roaming/tinytex/texmf-dist/web2c/fmtutil.cnf
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil: c:/users/lizbh/documents/.tinytex/texmf-config/web2c/fmtutil.cnf
fmtutil [INFO]: writing formats under c:/users/lizbh/documents/.tinytex/texmf-var/web2c
fmtutil [INFO]: did not find entry for byfmt=pdflatex, skipped
fmtutil [INFO]: total formats: 0
fmtutil [INFO]: exiting with status 0
I can't find the format file `pdflatex.fmt'!
Running the command C:UserslizbhAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

kpathsea: Running mktexfmt pdflatex.fmt

The command name is C:UserslizbhAppDataRoamingTinyTeXbinwin32mktexfmt
! fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
! fmtutil: c:/users/lizbh/appdata/roaming/tinytex/texmf-dist/web2c/fmtutil.cnf
! fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
! fmtutil: c:/users/lizbh/documents/.tinytex/texmf-config/web2c/fmtutil.cnf
! fmtutil [INFO]: writing formats under c:/users/lizbh/documents/.tinytex/texmf-var/web2c
! fmtutil [INFO]: did not find entry for byfmt=pdflatex, skipped
! fmtutil [INFO]: total formats: 0
! fmtutil [INFO]: exiting with status 0
! Running the command C:UserslizbhAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! fmtutil: c:/users/lizbh/appdata/roaming/tinytex/texmf-dist/web2c/fmtutil.cnf
! fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
! fmtutil: c:/users/lizbh/documents/.tinytex/texmf-config/web2c/fmtutil.cnf
! fmtutil [INFO]: writing formats under c:/users/lizbh/documents/.tinytex/texmf-var/web2c
! fmtutil [INFO]: did not find entry for byfmt=pdflatex, skipped
! fmtutil [INFO]: total formats: 0
! fmtutil [INFO]: exiting with status 0
! Running the command C:UserslizbhAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
! fmtutil: c:/users/lizbh/documents/.tinytex/texmf-config/web2c/fmtutil.cnf
! fmtutil [INFO]: writing formats under c:/users/lizbh/documents/.tinytex/texmf-var/web2c
! fmtutil [INFO]: did not find entry for byfmt=pdflatex, skipped
! fmtutil [INFO]: total formats: 0
! fmtutil [INFO]: exiting with status 0
! Running the command C:UserslizbhAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! fmtutil: c:/users/lizbh/documents/.tinytex/texmf-config/web2c/fmtutil.cnf
! fmtutil [INFO]: writing formats under c:/users/lizbh/documents/.tinytex/texmf-var/web2c
! fmtutil [INFO]: did not find entry for byfmt=pdflatex, skipped
! fmtutil [INFO]: total formats: 0
! fmtutil [INFO]: exiting with status 0
! Running the command C:UserslizbhAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! fmtutil [INFO]: writing formats under c:/users/lizbh/documents/.tinytex/texmf-var/web2c
! fmtutil [INFO]: did not find entry for byfmt=pdflatex, skipped
! fmtutil [INFO]: total formats: 0
! fmtutil [INFO]: exiting with status 0
! Running the command C:UserslizbhAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! fmtutil [INFO]: did not find entry for byfmt=pdflatex, skipped
! fmtutil [INFO]: total formats: 0
! fmtutil [INFO]: exiting with status 0
! Running the command C:UserslizbhAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! fmtutil [INFO]: total formats: 0
! fmtutil [INFO]: exiting with status 0
! Running the command C:UserslizbhAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! fmtutil [INFO]: exiting with status 0
! Running the command C:UserslizbhAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! Running the command C:UserslizbhAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! kpathsea: Running mktexfmt pdflatex.fmt

! The command name is C:UserslizbhAppDataRoamingTinyTeXbinwin32mktexfmt

Error: Failed to compile cv.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See cv.log for more info.
Execution halted

yihui yihui 2022-12-17 03:14:59

Could you try tinytex::tlmgr_install(c('texlive-scripts', 'dehyph-exptl'))? Thanks!

Originally posted on 2020-01-27 22:24:50

giscus-bot giscus-bot 2022-12-17 03:11:42
Guest *Iara Passos* @ 2020-01-09 13:55:36 originally posted:

Hi! I'm trying to run the bookdown-demo in Rstudio Cloud and it returns me this error:

output file: bookdown-demo.knit.md

tlmgr search --file --global '/unicode-math.sty'
Unknown directive ...containerchecksum 57a177b65450718631f36bfd8db0f2d1bff788f3bf147137b6412714cc945c7e08832f14f9e7e659adf7e072a91f13a2ea27fe3161cd9b60313bc956f1f543c6... , please fix it! at /usr/share/texlive/tlpkg/TeXLive/TLPOBJ.pm line 210, <$retfh> line 5910.
! LaTeX Error: File `unicode-math.sty' not found.

! Emergency stop.
<read *="">

Error: Failed to compile bookdown-demo.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See bookdown-demo.log for more info.
In addition: Warning messages:
1: In system2("tlmgr", args, ...) :
running command ''tlmgr' search --file --global '/unicode-math.sty'' had status 25
2: In parse_packages(logfile, quiet = c(TRUE, FALSE, FALSE)) :
Failed to find a package that contains unicode-math.sty
Execution halted

Exited with status 1.

I updated the packages and when I try to run (tinytex::tlmgr_update()) it returns this error:
tlmgr update --all --self
(running on Debian, switching to user mode!)
Unknown directive ...containerchecksum 57a177b65450718631f36bfd8db0f2d1bff788f3bf147137b6412714cc945c7e08832f14f9e7e659adf7e072a91f13a2ea27fe3161cd9b60313bc956f1f543c6... , please fix it! at /usr/share/texlive/tlpkg/TeXLive/TLPOBJ.pm line 210, <$retfh> line 5910.
fmtutil [ERROR]: format directory not writable: /var/lib/texmf/web2c

I already used bookdown in RStudio Cloud and until december, 2019 it was working very well.

Can you help me? Thank you!

yihui yihui 2022-12-17 03:14:57

Try tinytex::install_tinytex()

Originally posted on 2020-01-09 16:34:09

giscus-bot giscus-bot 2022-12-17 03:17:51
Guest *Salem* @ 2021-09-26 16:02:35 originally posted:

I was unable to find any missing LaTeX packages from the error log Handout_test.log.
! Paragraph ended before optparams@@ was complete.

giscus-bot giscus-bot 2022-12-17 03:11:43
Guest *Guneykan Ozkaya* @ 2020-01-25 19:19:06 originally posted:

Hi please help:

kpathsea: Running mktexfmt pdflatex.fmt
mktexfmt: No such file or directory
! kpathsea: Running mktexfmt pdflatex.fmt

! mktexfmt: No such file or directory

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

yihui yihui 2022-12-17 03:14:58

Could you try tinytex::tlmgr_install(c('texlive-scripts', 'dehyph-exptl'))? Thanks!

Originally posted on 2020-01-27 22:07:12

giscus-bot giscus-bot 2022-12-17 03:14:58
Guest *Guneykan Ozkaya* @ 2020-01-27 22:09:52 originally posted:

I got this:

TeX Live does not seem to be installed. See https://yihui.org/tinytex/.tlmgr install texlive-scripts
sh: tlmgr: command not found
error in running commandTeX Live does not seem to be installed. See https://yihui.org/tinytex/.tlmgr update --self
sh: tlmgr: command not found
error in running commandsh: fmtutil-sys: command not found
error in running commandTeX Live does not seem to be installed. See https://yihui.org/tinytex/.tlmgr install texlive-scripts
sh: tlmgr: command not found
error in running commandsh: tlmgr: command not found
error in running command

yihui yihui 2022-12-17 03:15:00

That means you need to tinytex::install_tinytex() first.

Originally posted on 2020-01-28 15:55:26

giscus-bot giscus-bot 2022-12-17 03:15:01
Guest *Guneykan Ozkaya* @ 2020-01-28 15:58:41 originally posted:

Thanks a lot but I cannot:

rm: /Users/guneykan/Library/TinyTeX/texmf-dist/tex/latex/adjustbox/tc-pdftex.def: Permission denied  
rm: /Users/guneykan/Library/TinyTeX/texmf-dist/tex/latex/adjustbox/trimclip.sty: Permission denied  
rm: /Users/guneykan/Library/TinyTeX/texmf-dist/tex/latex/adjustbox/adjcalc.sty: Permission denied  
rm: /Users/guneykan/Library/TinyTeX/texmf-dist/tex/latex/adjustbox/adjustbox.sty: Permission denied  
....  
rm: /Users/guneykan/Library/TinyTeX/texmf-dist/tex/latex/ucs/data: Permission denied  
rm: /Users/guneykan/Library/TinyTeX/texmf-dist/tex/latex/ucs: Directory not empty  
rm: /Users/guneykan/Library/TinyTeX/texmf-dist/tex/latex: Directory not empty  
rm: /Users/guneykan/Library/TinyTeX/texmf-dist/tex: Directory not empty  
rm: /Users/guneykan/Library/TinyTeX/texmf-dist: Directory not empty  
rm: /Users/guneykan/Library/TinyTeX: Directory not empty  
mv: rename texlive/texmf-dist to /Users/guneykan/Library/TinyTeX/texmf-dist: Directory not empty  
[install-unx.sh](http://install-unx.sh): line 20: /Users/guneykan/Library/TinyTeX/bin/x86_64-darwin/tlmgr: No such file or directory  
[install-unx.sh](http://install-unx.sh): line 27: /Users/guneykan/Library/TinyTeX/bin/x86_64-darwin/tlmgr: No such file or directory  
sh: /Users/guneykan/Library/TinyTeX/bin/x86_64-darwin/tlmgr: No such file or directory  
error in running commandsh: /Users/guneykan/Library/TinyTeX/bin/x86_64-darwin/tlmgr: No such file or directory  
error in running commandTinyTeX installed to /Users/guneykan/Library/TinyTeX  
TinyTeX was not successfully installed or configured.Your PATH variable is /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin. See https://yihui.org/tinytex/faq/ for more information.
giscus-bot giscus-bot 2022-12-17 03:11:44
Guest *Marly Tatiana Celis* @ 2020-02-02 16:01:34 originally posted:

Hi there ! I'm getting this error after trying everything to solve it. What is it about? How can I solve it

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/W32TeX) (preloaded format=pdflatex)
restricted write18 enabled.
entering extended mode

yihui yihui 2022-12-17 03:15:02

Sorry, but I have no idea. It seems there isn't even an error message.

Have you tried tinytex:::install_prebuilt()?

Originally posted on 2020-02-03 16:59:31

giscus-bot giscus-bot 2022-12-17 03:17:03
Guest *Marly Tatiana Celis* @ 2020-02-03 20:01:16 originally posted:

First, thank you for replying. Second, I posted the question because I was really frustrated after following all the steps you suggest for debugging. Also, I was not sure what the error/warning was about, since I have already updated and reinstalled back everything. At the end, the issue was a misplaced character in a latex syntax. So it was more a series of unfortunate events. I guess that identifying what an error is about is more of an art than a science. I really appreciate you taking the time to answer though. Thanks

yihui yihui 2022-12-17 03:17:04

Sorry to hear that! In this case, a minimal reproducible example can help a lot when you ask this type of questions. You might be able to figure it out sooner by yourself as you minimize your example. When you have time, I recommend watching Jenny's talk at this year's rstudio::conf. The video is not available yet, but the slides are helpful enough (especially page 37): https://speakerdeck.com/jennybc/object-of-type-closure-is-not-subsettable?slide=37

Originally posted on 2020-02-03 20:11:47

giscus-bot giscus-bot 2022-12-17 03:17:13
Guest *TT* @ 2020-03-12 16:42:38 originally posted:

I am also getting this error - can you please detail how you solved?

yihui yihui 2022-12-17 03:17:14

What did you try? Did you follow the debugging tips above? https://yihui.org/tinytex/r/#debugging

Originally posted on 2020-03-12 17:23:12

giscus-bot giscus-bot 2022-12-17 03:17:15
Guest *Marly Tatiana Celis* @ 2020-03-12 21:17:11 originally posted:

The way I solved it was: 1) I carefully followed the steps recommended here. 2) I was creating a reprex, and that's how I realized my own mistake; after all, I was able to solve it without asking any further. I'd suggest you check the slides Yihui Xie linked in the previous reply. (As they say "To find a needle, try looking in a smaller stack") Try creating a reprex, it may sound time-consuming, but I bet it will help you.

giscus-bot giscus-bot 2022-12-17 03:11:45
Guest *Cris* @ 2020-02-05 22:16:47 originally posted:

Hello! I am aware there was a problem with fig.align and knitting a pdf a while back. (rstudio/rmarkdown#325) But I am having this problem now.

When I remove the fig.align the document knits to PDF without problems, but when I include it, only the .tex file is produced and the console shows the following message at the end:

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/W32TeX) (preloaded format=pdflatex)
restricted write18 enabled.
entering extended mode
I was unable to find any missing LaTeX packages from the error log Reporte.log.
! Undefined control sequence.
C:Users
Documents Informes...
l.103 ...ero_files/figure-latex/unnamed-chunk-2-1}
end{center}

Error: LaTeX failed to compile

My session info:
R version 3.6.2 (2019-12-12)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17763)

Matrix products: default

locale:
[1] LC_COLLATE=Spanish_Mexico.1252 LC_CTYPE=Spanish_Mexico.1252 LC_MONETARY=Spanish_Mexico.1252 LC_NUMERIC=C
[5] LC_TIME=Spanish_Mexico.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] mxmaps_0.6.0 lubridate_1.7.4 readxl_1.3.1 forcats_0.4.0 stringr_1.4.0 dplyr_0.8.3 purrr_0.3.3 readr_1.3.1 tidyr_1.0.2
[10] tibble_2.1.3 ggplot2_3.2.1 tidyverse_1.3.0

giscus-bot giscus-bot 2022-12-17 03:11:46
Guest *Michel* @ 2020-02-17 18:36:56 originally posted:

I have this error and I don't know what to do! Could anyone help? I use miktex.
Erro: LaTeX failed to compile respostas.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips.
Além disso: Warning messages:
1: In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
'"pdflatex"' not found
2: In system2(...) : '"pdflatex"' not found
Execução interrompida

No LaTeX installation detected (LaTeX is required to create PDF output). You should install a LaTeX distribution for your platform: https://www.latex-project.org/get/

If you are not sure, you may install TinyTeX in R: tinytex::install_tinytex()

Otherwise consider MiKTeX on Windows - http://miktex.org

MacTeX on macOS - https://tug.org/mactex/
(NOTE: Download with Safari rather than Chrome strongly recommended)

Linux: Use system package manager

yihui yihui 2022-12-17 03:17:05

The message said:

If you are not sure, you may install TinyTeX in R: tinytex::install_tinytex()

Have you done that?

Originally posted on 2020-02-17 19:21:19

giscus-bot giscus-bot 2022-12-17 03:11:47
Guest *joachimr* @ 2020-02-20 14:14:28 originally posted:

Dear Yiuhi - Thanks so much first of all for this amazing TeX solution! All of a sudden today I am unable to render any PDF in RStudio, with files that ran just fine minutes before. I get the following log output. Can you help me identify the reason please?

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdflatex 2019.5.12) 20 FEB 2020 14:34
entering extended mode
restricted write18 enabled.
%&-line parsing enabled.
**MODE_proposal_APA.tex
(./MODE_proposal_APA.tex
LaTeX2e <2018-12-01>
(/Users/jrennstich/Library/TinyTeX/texmf-dist/tex/latex/apa7/apa7.cls
Document Class: apa7 2019/12/30 v1.04 APA formatting (7th edition)
(/Users/jrennstich/Library/TinyTeX/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(/Users/jrennstich/Library/TinyTeX/texmf-dist/tex/latex/base/size12.clo
File: size12.clo 2019/12/20 v1.4l Standard LaTeX file (size option)
)
c@part=count80
c@section=count81
c@subsection=count82
c@subsubsection=count83
c@paragraph=count84
c@subparagraph=count85
c@figure=count86
c@table=count87
abovecaptionskip=skip41
belowcaptionskip=skip42
bibindent=dimen102
) (/Users/jrennstich/Library/TinyTeX/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2019/09/21 v2.5h e-TeX tools for LaTeX (JAW)
etb@tempcnta=count88
)
Class apa7 Info: No bibliography package was specified; defaulting to (but not
loading) Biblatex on input line 218.
(/Users/jrennstich/Library/TinyTeX/texmf-dist/tex/latex/lm/lmodern.sty
Package: lmodern 2009/10/30 v1.6 Latin Modern Fonts
LaTeX Font Info: Overwriting symbol font `operators' in version `normal'
(Font) OT1/cmr/m/n --> OT1/lmr/m/n on input line 22.
LaTeX Font Info: Overwriting symbol font `letters' in version `normal'
(Font) OML/cmm/m/it --> OML/lmm/m/it on input line 23.
LaTeX Font Info: Overwriting symbol font `symbols' in version `normal'
(Font) OMS/cmsy/m/n --> OMS/lmsy/m/n on input line 24.
LaTeX Font Info: Overwriting symbol font `largesymbols' in version `normal'
(Font) OMX/cmex/m/n --> OMX/lmex/m/n on input line 25.
LaTeX Font Info: Overwriting symbol font `operators' in version `bold'
(Font) OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 26.
LaTeX Font Info: Overwriting symbol font `letters' in version `bold'
(Font) OML/cmm/b/it --> OML/lmm/b/it on input line 27.
LaTeX Font Info: Overwriting symbol font `symbols' in version `bold'
(Font) OMS/cmsy/b/n --> OMS/lmsy/b/n on input line 28.
LaTeX Font Info: Overwriting symbol font `largesymbols' in version `bold'
(Font) OMX/cmex/m/n --> OMX/lmex/m/n on input line 29.
LaTeX Font Info: Overwriting math alphabet `mathbf' in version `normal'
(Font) OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 31.
LaTeX Font Info: Overwriting math alphabet `mathsf' in version `normal'
(Font) OT1/cmss/m/n --> OT1/lmss/m/n on input line 32.
LaTeX Font Info: Overwriting math alphabet `mathit' in version `normal'
(Font) OT1/cmr/m/it --> OT1/lmr/m/it on input line 33.
LaTeX Font Info: Overwriting math alphabet `mathtt' in version `normal'
(Font) OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 34.
LaTeX Font Info: Overwriting math alphabet `mathbf' in version `bold'
(Font) OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 35.
LaTeX Font Info: Overwriting math alphabet `mathsf' in version `bold'
(Font) OT1/cmss/bx/n --> OT1/lmss/bx/n on input line 36.
LaTeX Font Info: Overwriting math alphabet `mathit' in version `bold'
(Font) OT1/cmr/bx/it --> OT1/lmr/bx/it on input line 37.
LaTeX Font Info: Overwriting math alphabet `mathtt' in version `bold'
(Font) OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 38.
) (/Users/jrennstich/Library/TinyTeX/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2020/02/11 v2.0o Standard LaTeX package
(/Users/jrennstich/Library/TinyTeX/texmf-dist/tex/latex/base/t1enc.def
File: t1enc.def 2020/02/11 v2.0o Standard LaTeX file
LaTeX Font Info: Redeclaring font encoding T1 on input line 48.
)
LaTeX Font Info: Try loading font information for T1+lmr on input line 112.
(/Users/jrennstich/Library/TinyTeX/texmf-dist/tex/latex/lm/t1lmr.fd
File: t1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
)
! Undefined control sequence.
l.115 xdef@fontenc@load@list{@fontenc@load@list

Here is how much of TeX's memory you used:
865 strings out of 494553
9926 string characters out of 6176313
67543 words of memory out of 5000000
4604 multiletter control sequences out of 15000+600000
6937 words of font info for 16 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
30i,0n,24p,804b,76s stack positions out of 5000i,500n,10000p,200000b,80000s

! ==> Fatal error occurred, no output PDF file produced!

yihui yihui 2022-12-17 03:17:06

Have you followed the debugging tips on this page? It asked you to update packages first. Did you do that?

Originally posted on 2020-02-20 14:51:27

giscus-bot giscus-bot 2022-12-17 03:17:07
Guest *joachimr* @ 2020-02-20 16:14:44 originally posted:

Yes. Followed all the instructions there.

yihui yihui 2022-12-17 03:17:08

That's weird. A quick google search for the error message led me to https://tex.stackexchange.com/a/529280/9128, and if you run tinytex::tlmgr_update(), it should run fmtutil-sys --all, which should fix the issue, according to David Carlisle's answer.

Anyway, if that doesn't work, you can probably try to reinstall TinyTeX.

Originally posted on 2020-02-20 16:22:42

giscus-bot giscus-bot 2022-12-17 03:17:09
Guest *joachimr* @ 2020-02-20 18:08:01 originally posted:

Did as instructed (and kept getting errors when running "
fmtutil-sys --all"). So I uninstalled and re-installed (but with command install_tinytex). I got the following error messages when I ran the command:

tlmgr install: package ifluatex not present in repository.

tlmgr install: package ifxetex not present in repository.

and later

[72/74, 00:21/00:21] install: xkeyval [13k]
[73/74, 00:21/00:21] install: xunicode [26k]
[74/74, 00:21/00:21] install: zapfding [46k]
running mktexlsr ...
tlmgr: action install returned an error; continuing.
done running mktexlsr.
running updmap-sys ...
done running updmap-sys.
regenerating language.dat
regenerating language.def
regenerating language.dat.lua
regenerating fmtutil.cnf in /Users/jrennstich/Library/TinyTeX/texmf-dist
running fmtutil-sys --no-error-if-no-engine=luahbtex,luajittex,mfluajit --no-error-if-no-format --byengine tex ...
done running fmtutil-sys --no-error-if-no-engine=luahbtex,luajittex,mfluajit --no-error-if-no-format --byengine tex.
running fmtutil-sys --no-error-if-no-engine=luahbtex,luajittex,mfluajit --byfmt mf ...
done running fmtutil-sys --no-error-if-no-engine=luahbtex,luajittex,mfluajit --byfmt mf.
running fmtutil-sys --no-error-if-no-engine=luahbtex,luajittex,mfluajit --byhyphen "/Users/jrennstich/Library/TinyTeX/texmf-var/tex/generic/config/language.dat" ...
done running fmtutil-sys --no-error-if-no-engine=luahbtex,luajittex,mfluajit --byhyphen "/Users/jrennstich/Library/TinyTeX/texmf-var/tex/generic/config/language.dat".
running fmtutil-sys --no-error-if-no-engine=luahbtex,luajittex,mfluajit --byhyphen "/Users/jrennstich/Library/TinyTeX/texmf-var/tex/generic/config/language.def" ...
done running fmtutil-sys --no-error-if-no-engine=luahbtex,luajittex,mfluajit --byhyphen "/Users/jrennstich/Library/TinyTeX/texmf-var/tex/generic/config/language.def".
running fmtutil-sys --no-error-if-no-engine=luahbtex,luajittex,mfluajit --byhyphen "/Users/jrennstich/Library/TinyTeX/texmf-var/tex/generic/config/language.dat.lua" ...
tlmgr: An error has occurred. See above messages. Exiting.

giscus-bot giscus-bot 2022-12-17 03:17:09
Guest *joachimr* @ 2020-02-20 18:15:14 originally posted:

I suspect there's some leftover from previous TeX or tinytex installations. Is there anyway to check that or delete them manually? I ran uninstall_tinytex(force = TRUE) before, but perhaps there is another way to check and be sure there is no old/other installation? I checked in the folder structure but couldn't find anything really, am not sure where I need to look however.

yihui yihui 2022-12-17 03:17:10

uninstall_tinytex() should uninstall TinyTeX cleanly. There shouldn't be any leftover. My guess for the failure of installation is that tlmgr chose a random CTAN mirror that was somehow corrupted or not fully synced to the main repository. You can take a look at the first few lines of the installation log, which looks like this
Automated TeX Live installation using profile: ../tinytex.profile
Loading http://ctan.mirrors.hoobly.com/systems/texlive/tlnet/tlpkg/texlive.tlpdb
Installing TeX Live 2019 from: http://ctan.mirrors.hoobly.com/systems/texlive/tlnet (not verified)

I succeeded with this mirror, so you can probably try

tinytex::install_tinytex(repos = 'http://ctan.mirrors.hoobly.com/systems/texlive/tlnet')

Originally posted on 2020-02-20 23:54:52

giscus-bot giscus-bot 2022-12-17 03:17:11
Guest *joachimr* @ 2020-02-21 09:15:05 originally posted:

Thanks again. No change. I keep getting that l.115 xdef@fontenc@load@list{@fontenc@load@list error.

yihui yihui 2022-12-17 03:17:12

Then I'm out of ideas. This is really weird. I can't reproduce it on my computer. Can you try tinytex:::fmtutil()?

Originally posted on 2020-02-21 14:55:26

giscus-bot giscus-bot 2022-12-17 03:17:13
Guest *joachimr* @ 2020-02-21 15:20:51 originally posted:

I solved it with the help of some folks over at stackexchange. I had to delete the .tinytex folder in my user folder.

giscus-bot giscus-bot 2022-12-17 03:11:48
Guest *Wilson Lee* @ 2020-02-24 23:53:35 originally posted:

Hi Yihui,
Thanks for your great and cool stuff. I follow the steps on debugging but still get this message when trying to render Rmarkdown to a PDF file

This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex)
restricted write18 enabled.
entering extended mode

I was unable to find any missing LaTeX packages from the error log EEA2020.log.

! Package pdftex.def Error: File `~/Dropbox/Research Paper/In Progress/Project

#1/Rplot/Rplot01.png' not found: using draft setting.

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

giscus-bot giscus-bot 2022-12-17 03:11:49
Guest *Aldo Alexis Benitez Lopez* @ 2020-03-01 04:36:56 originally posted:

Hi, Yihui!
I keep getting this error and I don't know what to do.

! Package pdftex.def Error: File `alfa.png' not found: using draft setting.

Error: LaTeX failed to compile teoria.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips.

giscus-bot giscus-bot 2022-12-17 03:11:50
Guest *pras patel* @ 2020-04-02 01:24:29 originally posted:

Hi Yihui ,
I stuck with below error when I am trying to Create output in PDF from using RMARKDOWN-(knit to APA6_pdf).
I really appreciate your help in advance.
Thanks.
------------------------------------ Rmarkdown ERROR----------------------------------------------
! Sorry, but C:PROGRA~1MIKTEX~1.9miktexbinx64pdflatex.exe did not succeed.

! The log file hopefully contains the information to get MiKTeX going again:

! C:UsersprasuAppDataLocalMiKTeX2.9miktexlogpdflatex.log

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

giscus-bot giscus-bot 2022-12-17 03:11:51
访客 *Xinyi Liu* @ 2020-04-02 04:53:25 写道:

Hi Yihui!
I was going to knit my rmarkdown to a pdf file but it throw an error like this:

I was unable to find any missing LaTeX packages from the error log hw2.log.  
! Package inputenc Error: Unicode character ν (U+03BD)  
(inputenc) not set up for use with LaTeX.

Try other LaTeX engines instead (e.g., xelatex) if you are using pdflatex. For R Markdown users, see <https://bookdown.org/yihui/rmarkdown/pdf-document.html>  
错误: LaTeX failed to compile hw2.tex. See <https://yihui.org/tinytex/r/#debugging> for debugging tips. See hw2.log for more info.  
停止执行  

Could you help me with it?
Thanks a lot!

giscus-bot giscus-bot 2022-12-17 03:17:18
Guest *Xiaochi* @ 2020-04-15 09:34:20 originally posted:

I encountered the same error.

yihui yihui 2022-12-17 03:17:20

Did you read the error messages above? If you did, what did you try?

Originally posted on 2020-04-15 21:46:26

giscus-bot giscus-bot 2022-12-17 03:11:52
Guest *Pan Sharling* @ 2020-04-06 01:41:29 originally posted:

Hi! I tried to use R markdown but it shows this error. Thank you for your help!

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdflatex)
restricted write18 enabled.
entering extended mode
tlmgr search --file --global '/STA255-Final-A_files/figure-latex/3 a'
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = (unset),
LC_CTYPE = "en_CN.UTF-8",
LANG = "en_CN.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
TeX Live 2019 is frozen forever and will no
longer be updated. This happens in preparation for a new release.

If you're interested in helping to pretest the new release (when
pretests are available), please read https://tug.org/texlive/pretest.html.
Otherwise, just wait, and the new release will be ready in due time.
! LaTeX Error: File `STA255-Final-A_files/figure-latex/3 a' not found.

Error: LaTeX failed to compile STA255-Final-A.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See STA255-Final-A.log for more info.
In addition: Warning message:
In parse_packages(logfile, quiet = !verbose) :
Failed to find a package that contains STA255-Final-A_files/figure-latex/3 a
Execution halted

yihui yihui 2022-12-17 03:17:20

Try not to use spaces in chunk labels, e.g. use "3-a" instead of "3 a".

Originally posted on 2020-04-15 21:47:26

giscus-bot giscus-bot 2022-12-17 03:17:22
Guest *Pan Sharling* @ 2020-04-16 00:02:53 originally posted:

It works! Thank you very much!

giscus-bot giscus-bot 2022-12-17 03:11:53
Guest *pras patel* @ 2020-04-07 22:30:42 originally posted:

Hi Yihui,

I am trying to install papaja in R studio but I am getting error below so please help me to out of this problem. Thanks in advance.

Error: LaTeX failed to compile trial3.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips.
In addition: Warning message:
In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
'"pdflatex"' not found
Execution halted

yihui yihui 2022-12-17 03:17:16

Sounds like you need to install LaTeX. See https://bookdown.org/yihui/rmarkdown/installation.html

Originally posted on 2020-04-08 02:07:12

giscus-bot giscus-bot 2022-12-17 03:11:54
Guest *pras patel* @ 2020-04-09 00:00:32 originally posted:

Hi Yihui,
I applied your suggestion but have new error so could you please help me to getting out of this situation. I am trying to install papaja in R and following below mentioned steps.

1.Update to the most current version of R by downloading from CRAN.
2.Update to the most current version of RStudio
3.From RStudio, go to the Tools|Install Packages… and install:
a.RMarkdown
b.knitR
c.tinyTex (do not use any other version of LaTeX! This one is known to be useful, downloads in seconds instead of hours, and is designed to work directly with R.)
4.Watch for errors and FIX THEM before continuing. Google any errors you get and apply the fixes. This WILL NOT WORK if you have unresolved errors!
5.Install papaja with the following commands

install.packages(c('devtools', 'curl'))
devtools::install_github("crsh/papaja")


Got error when trying to run this code "devtools::install_github("crsh/papaja")
".

Error: .onLoad failed in loadNamespace() for 'pkgload', details:
call: NULL
error: package ‘backports’ does not have a namespace

I really appreciate your help. Thanks in advance.

yihui yihui 2022-12-17 03:17:17

Sounds like certain R packages are broken in your system. You may need to reinstall these problematic packages (e.g. 'backports' in this case).

Originally posted on 2020-04-09 18:57:45

giscus-bot giscus-bot 2022-12-17 03:11:55
Guest *Rubén* @ 2020-04-13 15:33:42 originally posted:

Hi Yihui! I keep getting this message when I try to compile a .Rmd file:


! fmtutil [ERROR]: -user mode but path setup is -sys type, bailing out.
! ...v NietoAppDataRoamingTinyTeXbinwin32runscript.tlu:915: command failed with exit code 1:
! perl.exe "c:UsersRubn Jov NietoAppDataRoamingTinyTeXtexmf-distscriptstexlivefmtutil.pl" --user --byfmt pdflatex
! Running the command C:UsersRubn Jov NietoAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! ...v NietoAppDataRoamingTinyTeXbinwin32runscript.tlu:915: command failed with exit code 1:
! perl.exe "c:UsersRubn Jov NietoAppDataRoamingTinyTeXtexmf-distscriptstexlivefmtutil.pl" --user --byfmt pdflatex
! Running the command C:UsersRubn Jov NietoAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! perl.exe "c:UsersRubn Jov NietoAppDataRoamingTinyTeXtexmf-distscriptstexlivefmtutil.pl" --user --byfmt pdflatex
! Running the command C:UsersRubn Jov NietoAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! Running the command C:UsersRubn Jov NietoAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! kpathsea: Running mktexfmt pdflatex.fmt

! The command name is C:UsersRubn Jov NietoAppDataRoamingTinyTeXbinwin32mktexfmt

! warning: kpathsea: mktexfmt output `c:/Users/Rubn Jov Nieto/AppData/Roaming/TinyTeX/texmf-var/web2c/pdftex/pdflatex.fmt' instead of a filename.

Error: LaTeX failed to compile dsdd.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See dsdd.log for more info.
Además: Warning message:
In xfun::read_utf8(f2) :
The file C:UsersRUBNJO~1AppDataLocalTempRtmpYFv1hKstderr2f905c5e2519 is not encoded in UTF-8. These lines contain invalid UTF-8 characters: 2, 3, 4, 8, 9


I've tried everything I've read in the debugging part, since tinytex:::install_prebuilt(), tinytex::reinstall_tinytex(), update R and the package.

When I tinytex:::is_tinytex() it appears TRUE. But i don't know why it doesn't works for me...

Thanks in advance for all your work and attention

yihui yihui 2022-12-17 03:17:21

If you try tinytex::reinstall_tinytex(), please make sure you do that after you update your R packages (to have the latest version of tinytex), and restart your R session.

Originally posted on 2020-04-15 21:49:09

giscus-bot giscus-bot 2022-12-17 03:11:56
Guest *ujjwal singh* @ 2020-04-14 19:43:39 originally posted:

Hi Yihui ,

I found error

output file: ss.knit.md

! Sorry, but C:PROGRA~1MIKTEX~1.9miktexbinx64pdflatex.exe did not succeed.

! The log file hopefully contains the information to get MiKTeX going again:

! C:UsersUjjwal SinghAppDataLocalMiKTeX2.9miktexlogpdflatex.log

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

Please suggest me to overcome this problem

yihui yihui 2022-12-17 03:17:19

Since you are using MiKTeX, I have no idea. Perhaps you can try to install TinyTeX and see if it works.

Originally posted on 2020-04-15 21:43:40

giscus-bot giscus-bot 2022-12-17 03:17:41
Guest *Sergio Mansilla* @ 2020-05-29 20:25:27 originally posted:

Hey @disqus_5lVCHCcxOW:disqus I found a solution. I had the exact same problem as you. All I did was uninstall MiKTeX and run the commands for installing tinytex.

giscus-bot giscus-bot 2022-12-17 03:17:54
Guest *dili chili wili mili* @ 2021-12-31 05:40:16 originally posted:

Worked for me too!

giscus-bot giscus-bot 2022-12-17 03:17:55
Guest *Nhi Nguyen* @ 2022-01-27 23:27:56 originally posted:

OMGGG THANK YOU. This worked!!

giscus-bot giscus-bot 2022-12-17 03:11:57
访客 *Wushaohao Chen* @ 2020-04-16 00:48:39 写道:

Hi, Yihui!
I have this error when knit the pdf from R markdown. Could you help me with it? Thank you so much!

output file: Homework2.knit.md

! LaTeX Error: File `geometry.sty' not found.

*! Emergency stop.
<read ="">

! Unfortunately, the package upquote could not be installed.

! Please check the log file:

! C:UsersTEMP.DESKTOP-QIO3G7I.000AppDataLocalMiKTeX2.9miktexlogpdflatex.log

错误: LaTeX failed to compile Homework2.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Homework2.log for more info.
此外: There were 19 warnings (use warnings() to see them)
停止执行

yihui yihui 2022-12-17 03:17:23

The simplest solution is probably this: https://bookdown.org/yihui/rmarkdown-cookbook/install-latex.html You can uninstall MiKTeX, but don't have to.

If you must use MiKTeX and cannot use TinyTeX, see the last paragraph here: https://bookdown.org/yihui/rmarkdown-cookbook/install-latex-pkgs.html

Originally posted on 2020-04-16 15:50:54

giscus-bot giscus-bot 2022-12-17 03:11:58
Guest *Kalpit Pandey* @ 2020-04-19 11:28:49 originally posted:

Hi, Yihui!
I have this error.

|........ | 11%  
ordinary text without R code

|................ | 22%  
label: setup (with options)

processing file: testPdf.Rmd  
List of 1  
$ include: logi FALSE

|....................... | 33%  
ordinary text without R code

|............................... | 44%  
label: unnamed-chunk-1 (with options)  
List of 1  
$ include: logi FALSE

|....................................... | 56%  
ordinary text without R code

|............................................... | 67%  
label: cars  
|...................................................... | 78%  
ordinary text without R code

|.............................................................. | 89%  
label: pressure (with options)  
List of 1  
$ echo: logi FALSE

|......................................................................| 100%  
ordinary text without R code

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS [testPdf.utf8.md](http://testPdf.utf8.md) --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output testPdf.tex --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --lua-filter "C:/Users/kalpi/OneDrive/Documents/R/win-library/3.6/rmarkdown/rmd/lua/pagebreak.lua" --lua-filter "C:/Users/kalpi/OneDrive/Documents/R/win-library/3.6/rmarkdown/rmd/lua/latex-div.lua" --variable "geometry:margin=1in"  
output file: [testPdf.knit.md](http://testPdf.knit.md)

This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/W32TeX) (preloaded format=pdflatex)  
restricted write18 enabled.  
I can't find the format file `pdflatex.fmt'!  
fmtutil [ERROR]: -user mode but path setup is -sys type, bailing out.  
...rskalpiAppDataRoamingTinyTeXbinwin32runscript.tlu:915: command failed with exit code 1:  
perl.exe c:UserskalpiAppDataRoamingTinyTeXtexmf-distscriptstexlive[fmtutil.pl](http://fmtutil.pl) --user --byfmt pdflatex  
Running the command C:UserskalpiAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

kpathsea: Running mktexfmt pdflatex.fmt

The command name is C:UserskalpiAppDataRoamingTinyTeXbinwin32mktexfmt  
I was unable to find any missing LaTeX packages from the error log testPdf.log.  
! fmtutil [ERROR]: -user mode but path setup is -sys type, bailing out.  
! ...rskalpiAppDataRoamingTinyTeXbinwin32runscript.tlu:915: command failed with exit code 1:  
! perl.exe c:UserskalpiAppDataRoamingTinyTeXtexmf-distscriptstexlive[fmtutil.pl](http://fmtutil.pl) --user --byfmt pdflatex  
! Running the command C:UserskalpiAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! ...rskalpiAppDataRoamingTinyTeXbinwin32runscript.tlu:915: command failed with exit code 1:  
! perl.exe c:UserskalpiAppDataRoamingTinyTeXtexmf-distscriptstexlive[fmtutil.pl](http://fmtutil.pl) --user --byfmt pdflatex  
! Running the command C:UserskalpiAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! perl.exe c:UserskalpiAppDataRoamingTinyTeXtexmf-distscriptstexlive[fmtutil.pl](http://fmtutil.pl) --user --byfmt pdflatex  
! Running the command C:UserskalpiAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! Running the command C:UserskalpiAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! kpathsea: Running mktexfmt pdflatex.fmt

! The command name is C:UserskalpiAppDataRoamingTinyTeXbinwin32mktexfmt

Error: LaTeX failed to compile testPdf.tex. See <https://yihui.org/tinytex/r/#debugging> for debugging tips. See testPdf.log for more info.  
Execution halted

File: testPdf.rmd

---  
title: "R Markdwon"  
author: "Kalpit"  
date: "19/04/2020"  
output: pdf_document  
---

```{r setup, include=FALSE}  
knitr::opts_chunk$set(echo = TRUE)  
```

```{r, include=FALSE}  
options(tinytex.verbose = TRUE)  
```

## R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http: [rmarkdown.rstudio.com](http://rmarkdown.rstudio.com)="">.

When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

```{r cars}  
summary(cars)  
```

## Including Plots

You can also embed plots, for example:

```{r pressure, echo=FALSE}  
plot(pressure)  
```

Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
yihui yihui 2022-12-17 03:17:24

See below: https://yihui.org/tinytex/r/#comment-4872674616

Originally posted on 2020-04-19 13:50:35

giscus-bot giscus-bot 2022-12-17 03:11:59
Guest *Chul-Kyoo Joseph Jung* @ 2020-04-26 00:40:05 originally posted:

Hi Yihui,
I always got this error message. Could you help me?

output file: dp02_slide.knit.md

tlmgr search --file --global '/tikzlibrarytopaths.code.tex'
tlmgr search --file --global '/tikzlibraryarrows.code.tex'
tlmgr search --file --global '/tikzlibraryplotmarks.code.tex'
Trying to automatically install missing LaTeX packages...
tlmgr install pgf
tlmgr: package repository http://ctan.mirror.colo-serv.net/systems/texlive/tlnet (not verified: gpg unavailable)
tlmgr install: package already present: pgf
tlmgr path add
tlmgr search --file --global '/tikzlibrarytopaths.code.tex'
tlmgr search --file --global '/tikzlibraryarrows.code.tex'
tlmgr search --file --global '/tikzlibraryplotmarks.code.tex'
! File ended while scanning use of beamer@collect@@Body.

par
<*> dp02_slide.tex

Error: Failed to compile dp02_slide.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See dp02_slide.log for more info.
Execution halted

yihui yihui 2022-12-17 03:17:24

Please do what the error message told you to do first (at least you didn't update your R packages). Thanks!

Originally posted on 2020-04-26 01:45:24

giscus-bot giscus-bot 2022-12-17 03:17:25
Guest *Chul-Kyoo Joseph Jung* @ 2020-04-26 03:12:25 originally posted:

Thanks for your response. As you suggest I updated R last week 3.6.3 version and followed your debugging guideline in your webpage such as install.packages('tinytex') and tinytex::reinstall_tinytex(). And I still get

! File ended while scanning use of beamer@collect@@Body.

par
<*> dp02_slide.tex

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

Do I miss something here? Any tip would be a great help!

yihui yihui 2022-12-17 03:17:26

Thanks for following the guideline! Now we need a minimal reproducible example. I suggest you post a question to RStudio Community or Stack Overflow with that example.

Originally posted on 2020-04-26 18:12:04

giscus-bot giscus-bot 2022-12-17 03:12:00
Guest *Caren* @ 2020-04-28 06:19:08 originally posted:

Hi, Yihui.

Could you please help me with the error I got?
The error message is the following:

! Package inputenc Error: Unicode character − (U+2212)
(inputenc) not set up for use with LaTeX.
Try other LaTeX engines instead (e.g., xelatex) if you are using pdflatex. For R Markdown users, see https://bookdown.org/yihui/rmarkdown/pdf-document.html
Error: LaTeX failed to compile Homework-4.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Homework-4.log for more info.
Execution halted

I have downloaded XeLaTeX from http://www.texts.io/support/0001/ but I don't know why I couldn't use this compiler.
Thanks a lot.

yihui yihui 2022-12-17 03:17:27

No need to download XeLaTeX separately. You can install TinyTeX (which includes xelatex): https://bookdown.org/yihui/rmarkdown-cookbook/install-latex.html And change the LaTeX engine to xelatex: https://bookdown.org/yihui/rmarkdown-cookbook/latex-unicode.html

Originally posted on 2020-04-28 18:42:35

giscus-bot giscus-bot 2022-12-17 03:17:31
Guest *sungyang* @ 2020-05-11 23:10:57 originally posted:

I had the same error message when I tried to convert table to PDF. It works when I convert table to html.
! Package inputenc Error: Unicode character ??(U+2264)
(inputenc) not set up for use with LaTeX.

Try other LaTeX engines instead (e.g., xelatex) if you are using pdflatex. For R Markdown users, see https://bookdown.org/yihui/rmarkdown/pdf-document.html
LaTeX failed to compile d.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See d.log for more info.

In grepl("==> Fatal error occurred", x[i], fixed = TRUE) :

giscus-bot giscus-bot 2022-12-17 03:17:42
Guest *Rubayat Jinnah* @ 2020-06-10 17:07:05 originally posted:

How did you solve this error?

giscus-bot giscus-bot 2022-12-17 03:12:01
Guest *Dorin Stanciu* @ 2020-04-30 09:43:58 originally posted:

Hi Yihui, I just wanted to thank you for all the great gifts you've given us and for all the dedication and sacrifice you put in helping us to use them. You're not just a genius but also a wonderful person. Your advice saved my work countless times. Best of luck, mate!

yihui yihui 2022-12-17 03:17:28

Thanks for the kind words, Dorin!

Originally posted on 2020-04-30 13:26:10

giscus-bot giscus-bot 2022-12-17 03:17:28
Guest *Dorin Stanciu* @ 2020-04-30 13:45:29 originally posted:

Don't mention it!
We forget too often to say it and take people like you for granted.
And, when I look at the pace and level at which you do things, I find myself between depression and highest motivation :) Fortunately, the latter wins always. But the feeling that you have a magical device and compress more hours into the day, and somehow you never sleep, is still there... :)
So, thanks again, and I look forward for many, many decades of Yihui Xie wisdom around.

giscus-bot giscus-bot 2022-12-17 03:12:02
Guest *Sam Kristen* @ 2020-04-30 15:59:41 originally posted:

Dear Yihui!
I encounter this error after trying all tips above. I'm currently having options(tinytex.verbose = TRUE) in my RMarkdown. I'm working on my thesis and would really appreciate your prompt help!! Thank you!!

This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded format=pdflatex)
restricted write18 enabled.
entering extended mode
tlmgr search --file --global '/tikzlibrarytopaths.code.tex'
tlmgr search --file --global '/tikzlibraryplotmarks.code.tex'
tlmgr search --file --global '/tikzlibraryarrows.code.tex'
tlmgr search --file --global '/tikzlibrarypositioning.code.tex'
Trying to automatically install missing LaTeX packages...
tlmgr install pgf
You don't have permission to change the installation in any way,
specifically, the directory /usr/local/texlive/2017/tlpkg/ is not writable.
Please run this program as administrator, or contact your local admin.
tlmgr: An error has occurred. See above messages. Exiting.
tlmgr update --self
tlmgr: package repository http://ctan.mirror.colo-serv.net/systems/texlive/tlnet (not verified: gnupg not available)
You don't have permission to change the installation in any way,
specifically, the directory /usr/local/texlive/2017/tlpkg/ is not writable.
Please run this program as administrator, or contact your local admin.
tlmgr: An error has occurred. See above messages. Exiting.
fmtutil [ERROR]: format directory not writable: /usr/local/texlive/2017/texmf-var/web2c
tlmgr install pgf
You don't have permission to change the installation in any way,
specifically, the directory /usr/local/texlive/2017/tlpkg/ is not writable.
Please run this program as administrator, or contact your local admin.
tlmgr: An error has occurred. See above messages. Exiting.
tlmgr path add
add of symlinks had 2 error(s), see messages above.
add_link_dir_dir: destination /usr/local/bin not writable, no links from /usr/local/texlive/2017/bin/x86_64-darwin.
add_link_dir_dir: /usr/local/share/info/dir exists; not making symlink.
man symlink destination (/usr/local/share/man) not writable,cannot add symlinks.
tlmgr: An error has occurred. See above messages. Exiting.
! Package inputenc Error: Unicode char € (U+80)
(inputenc) not set up for use with LaTeX.

Error: Failed to compile Simplifying-RSA_3rd-Draft.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See Simplifying-RSA_3rd-Draft.log for more info.
Execution halted

yihui yihui 2022-12-17 03:17:29

Please read https://yihui.org/tinytex/r/#debugging again and follow the instructions first. From the error message, at least you didn't update your R packages successfully.

Originally posted on 2020-04-30 20:29:25

giscus-bot giscus-bot 2022-12-17 03:12:03
Guest *Lordda* @ 2020-05-02 20:21:57 originally posted:

Hi Yihui,

I have some trouble using latex environment in Rmarkdown. I was trying to use theorem or proof environment you mentioned in the guidebook, but when I actually use them they were the uncompiled Latex code under those environment, and if I quote some R code inside there would be extra "```" at the bottom. Here are the codes:

---  
title: "HW"  
author: "Author"  
#date:"`r Sys.Date()"  
output:  
pdf_document: default  
bookdown::pdf_document2:  
base_format: pagedown::pdf_paged  
df_print: paged  
---

```{r global_options, include=FALSE}  
knitr::opts_chunk$set(fig.width=6, fig.height=6, fig.path='Figs/',  
echo=TRUE, warning=FALSE, message=FALSE)  
```

```{theorem}  
Here is my theorem.  
begin{equation}  
E=mc^2  
(#eq:emc)  
end{equation}  
```

```{proof, name="#1"}  
Here is my proof.

begin{equation}  
e^{ipi}+1=0  
end{proof}

```{r echo=TRUE}  
set.seed(777)  
m <- 10000  
pi0 <- 0.9  
a <- 10  
z <- 1*( runif(m) <= 1-pi0 )  
x <- runif(m)  
x[z==1] <- rbeta( sum(z), shape1=1, shape2=a )  
hist(x)  
```
giscus-bot giscus-bot 2022-12-17 03:12:04
Guest *Jesus Walter Salinas Flores* @ 2020-05-04 19:51:16 originally posted:

I have this error. I appreciate your help.

I was unable to find any missing LaTeX packages from the error log Ejemplo-1-RMarkdown.log.
! Package pdftex.def Error: File `https://www.storybench.org/wp-content/uploads
/2017/05/tidyverse-730x294.png' not found: using draft setting.

Error: LaTeX failed to compile Ejemplo-1-RMarkdown.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Ejemplo-1-RMarkdown.log for more info.
Ejecución interrumpida

yihui yihui 2022-12-17 03:17:30

You cannot use images from URLs. You can only use local images.

Originally posted on 2020-05-04 23:40:44

giscus-bot giscus-bot 2022-12-17 03:14:06
Guest *Javiera* @ 2020-05-12 15:13:16 originally posted:

Hi!
I have this error, can you help me?

Running the command C:UsersjavAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

kpathsea: Running mktexfmt pdflatex.fmt

The command name is C:UsersjavAppDataRoamingTinyTeXbinwin32mktexfmt
I was unable to find any missing LaTeX packages from the error log Reporte_CES_V6.log.
! Running the command C:UsersjavAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! kpathsea: Running mktexfmt pdflatex.fmt

! The command name is C:UsersjavAppDataRoamingTinyTeXbinwin32mktexfmt

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

Ejecución interrumpida

yihui yihui 2022-12-17 03:17:33

I'm investigating this issue right now. Please keep an eye on rstudio/tinytex#210 Thanks, and I'm sorry for the trouble!

Originally posted on 2020-05-14 03:03:59

giscus-bot giscus-bot 2022-12-17 03:17:38
Guest *Javiera* @ 2020-05-14 16:20:27 originally posted:

Thanks! I will keep an eye.

giscus-bot giscus-bot 2022-12-17 03:14:07
Guest *Carl Morgenstern* @ 2020-05-13 01:46:11 originally posted:

Hi Yihui

I am trying to produce a pdf file from an R notebook. When I knitr it I end up with this. All my packages are up to date. I have both the R Markdown console output as well as the end of the log file.

I hope that you help. Thanks!

Carl Morgenstern

label: unnamed-chunk-16 (with options)  
List of 2  
$ echo : logi FALSE  
$ warning: logi FALSE

|......................................................................| 100%  
ordinary text without R code

/Applications/<http://RStudio.app/Contents/MacOS/pandoc/pandoc> +RTS -K512m -RTS [TraceReduction.utf8.md](http://TraceReduction.utf8.md) --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output TraceReduction.tex --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --lua-filter /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rmarkdown/rmd/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rmarkdown/rmd/lua/latex-div.lua --variable 'geometry:margin=1in' --include-in-header /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rmarkdown/rmd/latex/subtitle.tex --include-in-header /var/folders/7q/k7zsmnlj5t3c0r9cqw_jpp0h0000gp/T//Rtmp9iD2RK/rmarkdown-str17cb54fcafae7.html  
output file: [TraceReduction.knit.md](http://TraceReduction.knit.md)

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdflatex)  
restricted write18 enabled.  
entering extended mode  
I was unable to find any missing LaTeX packages from the error log TraceReduction.log.  
! LaTeX Error: There's no line here to end.

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

The log says at the very end:

LaTeX Font Info: Font shape `T1/lmtt/bx/n' in size <10> not available  
(Font) Font shape `T1/lmtt/b/n' tried instead on input line 183.

Overfull hbox (128.74324pt too wide) in paragraph at lines 189--189  
[]T1/lmtt/m/n/10 ## -- Attaching packages ------------------------------------  
---------------------------------- tidyverse 1.3.0 --[]  
[]

Overfull hbox (128.74324pt too wide) in paragraph at lines 202--202  
[]T1/lmtt/m/n/10 ## -- Conflicts ---------------------------------------------  
---------------------------- tidyverse_conflicts() --[]  
[]

[1

{/usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/[pdftex.map](http://pdftex.map)}]  
LaTeX Font Info: Try loading font information for TS1+lmtt on input line 207  
.  
(/usr/local/texlive/2019/texmf-dist/tex/latex/lm/ts1lmtt.fd  
File: ts1lmtt.fd 2009/10/30 v1.6 Font defs for Latin Modern  
) [2] [3]

! LaTeX Error: There's no line here to end.

See the LaTeX manual or LaTeX Companion for explanation.  
Type H <return> for immediate help.  
...

l.363 }  
  
Here is how much of TeX's memory you used:  
14029 strings out of 492616  
209557 string characters out of 6129482  
322864 words of memory out of 5000000  
17722 multiletter control sequences out of 15000+600000  
33795 words of font info for 53 fonts, out of 8000000 for 9000  
1141 hyphenation exceptions out of 8191  
42i,9n,50p,822b,508s stack positions out of 5000i,500n,10000p,200000b,80000s

! ==> Fatal error occurred, no output PDF file produced!
giscus-bot giscus-bot 2022-12-17 03:14:08
Guest *Andrey Sivyakov* @ 2020-05-13 02:56:05 originally posted:

This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/W32TeX) (preloaded format=pdflatex)
restricted write18 enabled.
I can't find the format file `pdflatex.fmt'!
Running the command C:UserssolgaAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

kpathsea: Running mktexfmt pdflatex.fmt

The command name is C:UserssolgaAppDataRoamingTinyTeXbinwin32mktexfmt
I was unable to find any missing LaTeX packages from the error log test1.log.
! Running the command C:UserssolgaAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! kpathsea: Running mktexfmt pdflatex.fmt

! The command name is C:UserssolgaAppDataRoamingTinyTeXbinwin32mktexfmt

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

yihui yihui 2022-12-17 03:17:33

I'm investigating this issue right now. Please keep an eye on rstudio/tinytex#210 Thanks, and sorry for the trouble!

Originally posted on 2020-05-14 03:03:18

giscus-bot giscus-bot 2022-12-17 03:17:35
Guest *Andrey Sivyakov* @ 2020-05-14 03:10:24 originally posted:

Thank you! I ended up using MiKTeX eventually. There seem to be issues with installation of MiKTeX/TexLive packages when you install them not as admin. What I ended up doing after installation of MiKTeX was knitting .rmd file from cmd as Admin. This way MiKTeX will let you know what packages are missing and install them all. After that I can knit rmd to PDF using the button in RStudio. Note sure it will help you troubleshoot the issue with TinyTex though :)

Thanks again!

Andrey

giscus-bot giscus-bot 2022-12-17 03:14:09
Guest *Joanne Imanuel* @ 2020-05-14 01:59:01 originally posted:

Hi Yihui,
I get the following Message Box when I try to knit an Rmarkdown file to PDF.

"The code execution cannot proceed because luatex.dll was not found. Reinstalling the program may fix this problem."

with the following output in R
output file: TestFile.knit.md

! Running the command C:UsersJoanne RuthAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! kpathsea: Running mktexfmt pdflatex.fmt

! The command name is C:UsersJoanne RuthAppDataRoamingTinyTeXbinwin32mktexfmt

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

I have tried uninstalling and then reinstalling tinytex even reinstalling R but nothing seems to work.
During the installation, I get the message box saying that there would be two error messages pertaining to luatex.dll and that they can just be ignored. Somehow, they end up being a problem when I try to knit.

Would appreciate any help.
Many thanks!

yihui yihui 2022-12-17 03:17:32

I'm investigating this issue right now. Please keep an eye on rstudio/tinytex#210 Thanks, and sorry for the trouble!

Originally posted on 2020-05-14 03:02:39

giscus-bot giscus-bot 2022-12-17 03:17:34
Guest *Joanne Imanuel* @ 2020-05-14 03:09:34 originally posted:

Thanks for the quick reply.
Will keep an eye on the GitHub thread.
Appreciate the help!

giscus-bot giscus-bot 2022-12-17 03:17:39
Guest *Vidhi Patel* @ 2020-05-15 11:39:58 originally posted:

even i am getting this error. I have tried everything reinstalling, uninstalling, updating R everything. Please help

yihui yihui 2022-12-17 03:17:40

As I said below, the thread rstudio/tinytex#210 contains the latest updates about this problem, which has affected many people, and you are certainly not alone. Thanks!

Originally posted on 2020-05-15 19:19:35

giscus-bot giscus-bot 2022-12-17 03:14:10
Guest *Melvin Lopez* @ 2020-05-14 03:43:19 originally posted:

I have spent a number of hours trying different solution to resolve my PDF compilation problem. From my search I have tried a number of suggestions to no avail from this thread. rstudio/tinytex#103. Unfortunately, it doesn't say if Keabla's issue was resolved, but any assistance would be greatly appreciated.

Regards,
Mel

LOG:
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS test.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output test.tex --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --lua-filter "H:/Users/Melvin/R/win-library/4.0/rmarkdown/rmd/lua/pagebreak.lua" --lua-filter "H:/Users/Melvin/R/win-library/4.0/rmarkdown/rmd/lua/latex-div.lua" --variable "geometry:margin=1in"
output file: test.knit.md

This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/W32TeX) (preloaded format=pdflatex)
restricted write18 enabled.
I can't find the format file `pdflatex.fmt'!
Running the command C:UsersmelviAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

kpathsea: Running mktexfmt pdflatex.fmt

The command name is C:UsersmelviAppDataRoamingTinyTeXbinwin32mktexfmt
I was unable to find any missing LaTeX packages from the error log test.log.
! Running the command C:UsersmelviAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! kpathsea: Running mktexfmt pdflatex.fmt

! The command name is C:UsersmelviAppDataRoamingTinyTeXbinwin32mktexfmt

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

TinyTex Install
tinytex:::is_tinytex() = TRUE

PDFLATEX Info

file.info(tinytex:::win_app_dir('TinyTeX', 'bin', 'win32', 'pdflatex.exe'))
size isdir mode
C:UsersmelviAppDataRoaming/TinyTeX/bin/win32/pdflatex.exe 1536 FALSE 777
mtime
C:UsersmelviAppDataRoaming/TinyTeX/bin/win32/pdflatex.exe 2020-05-13 22:59:52
ctime
C:UsersmelviAppDataRoaming/TinyTeX/bin/win32/pdflatex.exe 2020-05-13 22:59:52
atime
C:UsersmelviAppDataRoaming/TinyTeX/bin/win32/pdflatex.exe 2020-05-13 23:12:32
exe
C:UsersmelviAppDataRoaming/TinyTeX/bin/win32/pdflatex.exe win32

Tinytex root

tinytex::tinytex_root()
[1] "C:UsersmelviAppDataRoamingTinyTeX"

PATH INFO

Sys.getenv('PATH')
[1] "C:rtools40usrbin;C:Program FilesRR-4.0.0binx64;H:OculusSupportoculus-runtime;C:Program Files (x86)Common FilesOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:WindowsSystem32OpenSSH;C:Program Files (x86)NVIDIA CorporationPhysXCommon;C:Program Files (x86)Calibre2;C:Program FilesNVIDIA CorporationNVIDIA NvDLISR;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:WINDOWSSystem32OpenSSH;h:Program FilesGitcmd;C:UsersmelviAppDataRoamingTinyTeX;C:UsersmelviAppDataLocalMicrosoftWindowsApps;C:UsersmelviAppDataRoamingTinyTeXtexmf-disttexlatexlatexconfig;C:UsersmelviAppDataRoamingTinyTeXbinwin32"
(tinytex::tlmgr_path())
Use of uninitialized value in bitwise or (|) at C:UsersmelviAppDataRoamingTinyTeXtexmf-distscriptstexlivetlmgr.pl line 1497.
[1] 0

(function() { tinytex:::tweak_path(); Sys.getenv('PATH') })()
[1] "C:rtools40usrbin;C:Program FilesRR-4.0.0binx64;H:OculusSupportoculus-runtime;C:Program Files (x86)Common FilesOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:WindowsSystem32OpenSSH;C:Program Files (x86)NVIDIA CorporationPhysXCommon;C:Program Files (x86)Calibre2;C:Program FilesNVIDIA CorporationNVIDIA NvDLISR;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:WINDOWSSystem32OpenSSH;h:Program FilesGitcmd;C:UsersmelviAppDataRoamingTinyTeX;C:UsersmelviAppDataLocalMicrosoftWindowsApps;C:UsersmelviAppDataRoamingTinyTeXtexmf-disttexlatexlatexconfig;C:UsersmelviAppDataRoamingTinyTeXbinwin32"

p = tinytex:::win_app_dir('TinyTeX', 'bin', 'win32', 'tlmgr.bat')
p
[1] "C:UsersmelviAppDataRoaming/TinyTeX/bin/win32/tlmgr.bat"
file_test('-x', p)
C:UsersmelviAppDataRoaming/TinyTeX/bin/win32/tlmgr.bat
TRUE
(function() {

  • tinytex:::tweak_path()
  • print(Sys.which('pdflatex'))
  • system2('pdflatex', '--version')
  • })()
    pdflatex
    "C:UsersmelviAppDataRoamingTinyTeXbinwin32pdflatex.exe"
    pdfTeX 3.14159265-2.6-1.40.21 (TeX Live 2020/W32TeX)
    kpathsea version 6.3.2
    Copyright 2020 Han The Thanh (pdfTeX) et al.
    There is NO warranty. Redistribution of this software is
    covered by the terms of both the pdfTeX copyright and
    the Lesser GNU General Public License.
    For more information about these matters, see the file
    named COPYING and the pdfTeX source.
    Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
    Compiled with libpng 1.6.37; using libpng 1.6.37
    Compiled with zlib 1.2.11; using zlib 1.2.11
    Compiled with xpdf version 4.02

pdflatex
Error: object 'pdflatex' not found
""
[1] ""

yihui yihui 2022-12-17 03:17:36

You can ignore rstudio/tinytex#103 but keep an eye on rstudio/tinytex#210 instead. Thanks, and I'm sorry for the trouble!

Originally posted on 2020-05-14 03:50:04

giscus-bot giscus-bot 2022-12-17 03:17:37
Guest *Melvin Lopez* @ 2020-05-14 04:17:23 originally posted:

Thank you, I thought I was losing my mind or my troubleshooting skills were @#$@#

I guess I will have to wait until its fixed. Would going to a different distribution help?

giscus-bot giscus-bot 2022-12-17 03:14:11
Guest *ladylori33* @ 2020-05-14 04:31:18 originally posted:

I am trying to knit a pdf document and am receiving the following message. I have gone through the debugging instructions as well as some of the additional suggestions in the comments for similar issues, and haven't been able to resolve the issue. Anything that you can do to help would be greatly appreciated.

This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/W32TeX) (preloaded format=pdflatex)
restricted write18 enabled.
I can't find the format file `pdflatex.fmt'!
Running the command C:UserslstevAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

kpathsea: Running mktexfmt pdflatex.fmt

The command name is C:UserslstevAppDataRoamingTinyTeXbinwin32mktexfmt
I was unable to find any missing LaTeX packages from the error log report.log.
! Running the command C:UserslstevAppDataRoamingTinyTeXbinwin32fmtutil-user.exe

! kpathsea: Running mktexfmt pdflatex.fmt

! The command name is C:UserslstevAppDataRoamingTinyTeXbinwin32mktexfmt

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

yihui yihui 2022-12-17 03:17:37

Please keep an eye on rstudio/tinytex#210 Thanks, and sorry for the trouble!

Originally posted on 2020-05-14 13:09:06

giscus-bot giscus-bot 2022-12-17 03:14:12
Guest *Qian Wang* @ 2020-06-04 14:29:03 originally posted:

Hi Yihui,

I am stuck with this error message when I am trying to create output in PDF while using R Markdown after knitting.

Error: LaTeX failed to compile my-R-Markdown.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips.

I have tried all debugging tips but this error message still exist.

Could you pls so kind and help me?

Thanks

Qian

giscus-bot giscus-bot 2022-12-17 03:14:13
Guest *Rubayat Jinnah* @ 2020-06-10 03:34:04 originally posted:

Hi, I am using Rmarkdown and xelatex as a pdf engine. I am getting the following error.
! LaTeX Error: Option clash for package fontspec.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.65 ...Package[eu@zf@math]{fontspec}[2008/08/09]

giscus-bot giscus-bot 2022-12-17 03:14:14
Guest *Sócrates Brasileiro* @ 2020-06-23 19:38:06 originally posted:

Hi, thank you for your dedication. Just sharing a recent experience that brought me to this site. While compiling a RMarkdown file to a pdf, I received an error message that lead me here. The error message was:

"
! Missing $ inserted.

$
l.457 $ y_{j, k} = mu + a_{k} + b_{j,k} $
Try to find the following text in Multilevel-Specification.Rmd:
$ y_{j, k}
You may need to add $ $ around a certain inline R expression r in Multilevel-Specification.Rmd (see the above hint). See rstudio/rmarkdown#385 for more info.
Error: LaTeX failed to compile Multilevel-Specification.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Multilevel-Specification.log for more info.
Execution halted"

I had no inline r expression, and I was able to compile to MSWord (although the inline equation was not properly formatted). So I thought there was a separated issue regarding compiling to pdf, and I came to this site and I started following all the suggested steps to debug it, but always unsuccessfuly. When I tried tinytex:::install_prebuilt(), then I got worried, because, it started installing something and did not stoped, the pop-up window was saying that it was installed up to 64315136565% or something like that when I forcefully shut RStudio down. After all trials, I tried to uninstall MikTek and install TexLive. I left it overnight, and in the morning it was saying it would still take 10 hours to finish. I just aborted it.

Then I came back to the first part of the error message. And I realized that I had an inline equation $ y_{j, k} = mu + a_{k} + b_{j,k} $ with blank spaces between dollar signs and math symbols. I just trimmed off blank spaces ($y_{j, k} = mu + a_{k} + b_{j,k}$) and done, it compiled.

yihui yihui 2022-12-17 03:17:43

Thanks for posting back! Here is the official documentation about math expressions in Pandoc's Markdown: https://pandoc.org/MANUAL.html#math

Originally posted on 2020-06-23 20:18:22

giscus-bot giscus-bot 2022-12-17 03:14:15
Guest *Jammi N Rao* @ 2020-07-07 18:32:56 originally posted:

Hi Yihui,
I am using R v 4 and RStudio both recently re-installed. Knit woirked fine until this morning and then for no discernible reason I get this error on the same .RMD file

!fmtutil [ERROR]: -user mode but path setup is -sys type, bailing out

Is it obvious what the probllem is

yihui yihui 2022-12-17 03:17:44

I don't have an idea about this error. A blind shot in the dark that I usually recommend is tinytex:::install_prebuilt().

Originally posted on 2020-07-07 23:53:49

giscus-bot giscus-bot 2022-12-17 03:14:16
Guest *Oscar MK* @ 2020-08-22 07:07:48 originally posted:

Hi, Yihui!
I am working in Rstudio Cloud and I have this error. I appreciate yout help.

! Undefined control sequence.
l.8 tikz
node [scale=1, inner sep=0] {

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

giscus-bot giscus-bot 2022-12-17 03:14:17
Guest *RHT* @ 2020-08-25 01:54:58 originally posted:

bookdown::render_book('index.Rmd', "bookdown::pdf_book", config_file='_bookdown.yml', clean=TRUE)

! ! Unable to read an entire line---bufsize=200000.

! Please increase buf_size in texmf.cnf.

giscus-bot giscus-bot 2022-12-17 03:14:18
Guest *RHT* @ 2020-08-25 02:35:35 originally posted:

bookdown::render_book('index.Rmd', "bookdown::pdf_book", config_file='_bookdown.yml', clean=TRUE)

! ! Unable to read an entire line---bufsize=200000.

! Please increase buf_size in texmf.cnf.

Solution:

Sys.setenv(buf_size=999999)
bookdown::render_book('index.Rmd', "bookdown::pdf_book", config_file='_bookdown.yml', clean=TRUE)
Sys.unsetenv("buf_size")

giscus-bot giscus-bot 2022-12-17 03:14:19
Guest *Pamela* @ 2020-09-29 02:01:26 originally posted:

Hi Yihui: I updated the Latex package following your instructions but I got the following error message:
tlmgr update --all --self
Error in system2("tlmgr", args, ...) : '"tlmgr"' not found

install.packages(tlmgr)
Error in install.packages : 'match' requires vector arguments

what I should do?
Thank you
Best
Pamela

yihui yihui 2022-12-17 03:17:45

I don't think you have installed TinyTeX. Please try tinytex::install_tinytex().

Originally posted on 2020-09-29 15:00:17

giscus-bot giscus-bot 2022-12-17 03:14:19
Guest *Muhammet F Isik* @ 2020-11-07 19:55:05 originally posted:

I keep getting error below, Can anyone help me about this ?

output file: asdada.knit.md

! kpathsea: Running mktexfmt pdflatex.fmt

! mktexfmt [ERROR]: -user mode but path setup is -sys type, bailing out.

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

No LaTeX installation detected (LaTeX is required to create PDF output). You should install a LaTeX distribution for your platform: https://www.latex-project.org/get/

If you are not sure, you may install TinyTeX in R: tinytex::install_tinytex()

Otherwise consider MiKTeX on Windows - http://miktex.org

MacTeX on macOS - https://tug.org/mactex/
(NOTE: Download with Safari rather than Chrome strongly recommended)

Linux: Use system package manager

giscus-bot giscus-bot 2022-12-17 03:14:20
Guest *Sahil* @ 2020-11-19 03:43:39 originally posted:

I am trying to knit a .RMD file as .PDF file. I am getting the following error on console. I tried updating packages via Tools but it didn't work.

How do I change the xfun version?
namespace 'xfun' 0.17 is already loaded, but >= 0.19 is required

giscus-bot giscus-bot 2022-12-17 03:17:45
yihui yihui 2022-12-17 03:17:46

install.packages('xfun')

Originally posted on 2020-11-19 14:24:09

giscus-bot giscus-bot 2022-12-17 03:14:21
Guest *dreamywants* @ 2021-01-26 20:13:43 originally posted:

Hi Yihui,
Thanks for the documentation! When I try to knit to PDF with the accompanying Latex code, I keep running across this problem after finishing with knitting:
! Package inputenc Error: Unicode character : (U+FF1A)
(inputenc) not set up for use with LaTeX.

Try other LaTeX engines instead (e.g., xelatex) if you are using pdflatex. See https://bookdown.org/yihui/rmarkdown-cookbook/latex-unicode.html
Error: LaTeX failed to compile TEST.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See TEST.log for more info.
In addition: There were 50 or more warnings (use warnings() to see the first 50)
Execution halted

I am really confused about what is going wrong here. I tried changing Global Options>Sweaver>xelatex and am having the exact same error. Any help would be appreciated!!

yihui yihui 2022-12-17 03:17:47

Did you see the first link in the error message and try what it says? The xelatex in Global Options of RStudio is probably irrelevant (it only applies to Rnw documents but you seem to be using Rmd).

Originally posted on 2021-01-26 22:04:00

giscus-bot giscus-bot 2022-12-17 03:17:48
Guest *dreamywants* @ 2021-01-28 23:19:30 originally posted:

Thanks for your reply - I tried using bookdown::pdf_document2 with lualatex, and it worked a couple of times. However, when it did work, 8/10 of my fixest and texreg output did not render into actual tables and just stayed as Latex output, and only 2/10 of the tables did render, and I have no idea why some rendered and some did not. And really frustratingly, just now I have tried reknitting again to pdf_document2 with lualatex, but it is returning the following error (when it did not before for the exact same code!):

! Misplaced noalign.
hline ->noalign
{ifnum 0=`}fi let hskip vskip let vrule hrule let...
l.680 hline

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

This error has only started popping up in the last 30 minutes - it was not a problem before. I am using texreg (and not stargazer) for most of my tables because it is the best output for my needs (I need to see up to 4 models side by side and longtable style), and this is extremely frustrating how random and buggy it is. Any help or ideas??

yihui yihui 2022-12-17 03:17:49

Sorry, but I suggest you post the question to Stack Overflow or RStudio Community and attach a minimal reproducible example (I mentioned that in the 4th bullet above: https://yihui.org/tinytex/r/#debugging but I'm not sure if you saw it) . It's not practical for me to answer all questions about LaTeX by myself. If you don't have any luck elsewhere on public forums, you may come back again.

Originally posted on 2021-01-29 18:17:11

giscus-bot giscus-bot 2022-12-17 03:14:22
Guest *Kostas Mammas* @ 2021-01-30 17:59:14 originally posted:

Hi Yihui,

I am trying to compile the crc template in PDF format, and while building the book, I am getting the following error:

! LaTeX Error: File `caption.sty' not found.

! Emergency stop.
<read *="">

As per the documentation, I am using tinytex::parse_install("bookdown.log") to install the caption package but I am getting the following log:

Please send bug reports and questions to bug-wget@gnu.org.
Can't spawn "cmd.exe": No such file or directory at C:/Users/users/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2617.
Can't spawn "cmd.exe": No such file or directory at C:/Users/users/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2634.
Setting up lz4 with C:/Users/users/AppData/Roaming/TinyTeX/tlpkg/installer/lz4/lz4.exe as C:UsersusersAppDataRoamingTinyTeXtlpkginstallerlz4lz4.exe didn't work
*** LZ4 command line interface 32-bits v1.8.3, by Yann Collet ***
Can't spawn "cmd.exe": No such file or directory at C:/Users/users/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2617.
Can't spawn "cmd.exe": No such file or directory at C:/Users/users/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2617.
Can't spawn "cmd.exe": No such file or directory at C:/Users/users/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2634.
Setting up xz with C:/Users/users/AppData/Roaming/TinyTeX/tlpkg/installer/xz/xz.exe as C:UsersusersAppDataRoamingTinyTeXtlpkginstallerxzxz.exe didn't work
xz (XZ Utils) 5.2.4
liblzma 5.2.4
TLPDB::_install_data: unsupported container format xz for http://ctan.mirrors.hoobly.com/systems/texlive/tlnet/archive/caption.tar.xz
tlmgr.pl: package repository http://ctan.mirrors.hoobly.com/systems/texlive/tlnet (not verified: gpg unavailable)
[1/1, ??:??/??:??] install: caption [31k]
tlmgr.pl: package log updated: C:/Users/users/AppData/Roaming/TinyTeX/texmf-var/web2c/tlmgr.log

I tried installing/ uninstalling everything, using prebuilt tinytex but still no progress.

Thanks!

giscus-bot giscus-bot 2022-12-17 03:14:23
Guest *Avi Ahuja* @ 2021-03-09 22:06:11 originally posted:

Hi, I tried these debugging options, but keep getting this error message. I haven't been able to compile to pdf for a while now. I reupdated all the packages as you suggested:

! Package inputenc Error: Unicode character ▂ (U+2582)
(inputenc) not set up for use with LaTeX.

Try other LaTeX engines instead (e.g., xelatex) if you are using pdflatex. See https://bookdown.org/yihui/rmarkdown-cookbook/latex-unicode.html
Error: LaTeX failed to compile homework-4-.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See homework-4-.log for more info.
Execution halted

giscus-bot giscus-bot 2022-12-17 03:14:24
Guest *Squalk* @ 2021-03-10 03:35:53 originally posted:

output file: http://Taller_1-Cadenas-de-Markov.knit.md

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS http://Taller_1-Cadenas-de-Markov.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output Taller_1-Cadenas-de-Markov.tex --lua-filter "C:UsersUSUARI~1DOCUME~1RWIN-LI~14.0RMARKD~1RMARKD~1luaPAGEBR~1.LUA" --lua-filter "C:UsersUSUARI~1DOCUME~1RWIN-LI~14.0RMARKD~1RMARKD~1luaLATEX-~1.LUA" --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --include-in-header "C:UsersUSUARI~1AppDataLocalTempRtmpwbJ87trmarkdown-str18105c0e5d07.html"
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/W32TeX) (preloaded format=pdflatex)
restricted write18 enabled.
entering extended mode
I was unable to find any missing LaTeX packages from the error log Taller_1-Cadenas-de-Markov.log.
! Package array Error: Empty preamble: `l' used.

Error: LaTeX failed to compile Taller_1-Cadenas-de-Markov.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Taller_1-Cadenas-de-Markov.log for more info.
Además: Warning message:
In has_crop_tools() :
Tool(s) not installed or not in PATH: pdfcrop, ghostcript
-> As a result, figure cropping will be disabled.
Ejecución interrumpida

giscus-bot giscus-bot 2022-12-17 03:14:25
Guest *saria* @ 2021-03-23 15:48:28 originally posted:

Hi Yihui,
I'm trying to build the book for the bookdown demo but keep getting this error:

Error: LaTeX failed to compile bookdown-demo.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips.
In addition: Warning messages:
1: In has_crop_tools() :
Tool(s) not installed or not in PATH: pdfcrop, ghostcript
-> As a result, figure cropping will be disabled.
2: In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
'"xelatex"' not found
Execution halted
Error: Failed to run 'render_book' in a new R session.
Execution halted

Exited with status 1.

Any help you can provide would be much appreciated.

giscus-bot giscus-bot 2022-12-17 03:14:26
访客 *梁意珠* @ 2021-03-24 04:29:24 写道:

Hi Yihui,
I'm stuck in the following error when I'm trying to knit PDF.

I was unable to find any missing LaTeX packages from the error log Report.log.  
! Missing { inserted.  
<to be="" read="" again="">  
__um_group_begin:  
l.133 (<.,.>_mathcal  
{H}:mathcal{H} times mathcal{H} rightarrow mathbb...

错误: LaTeX failed to compile Report.tex. See <https://yihui.org/tinytex/r/#debugging> for debugging tips. See Report.log for more info.  
此外: Warning message:  
In has_crop_tools() :  
Tool(s) not installed or not in PATH: ghostcript  
-> As a result, figure cropping will be disabled.  
停止执行
giscus-bot giscus-bot 2022-12-17 03:14:26
Guest *Mary* @ 2021-05-20 03:59:29 originally posted:

Hi, Yihui,
I try to create output of a pdf form, but I meet this error:

Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'rlang' 0.4.8 is already loaded, but >= 0.4.10 is required
Calls: ... namespaceImportFrom -> asNamespace -> loadNamespace
In addition: Warning messages:
1: In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="Mengxian-Qiu-45829500---STAT2170---R-assignment.Rmd": ????????????????
2: In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="D:/????/AUS 2021-session 1/STAT2170 ?????-Applied Statistics/R assessment": ????????????????
Execution halted

yihui yihui 2022-12-17 03:17:50

Your rlang is too old. Please follow the debugging instructions above: https://yihui.org/tinytex/r/#debugging (step 1).

Originally posted on 2021-05-20 13:20:26

giscus-bot giscus-bot 2022-12-17 03:14:28
Guest *Anna* @ 2021-08-23 01:37:00 originally posted:

Hi Yihui,
I am trying to install tinytex but I cannot download the zip package from the site which is currently not accessible due to an insecure connection. I am getting an error message that says: a connection with the server could not be established. Are you able to have a look at this or provide a workaround?
Thanks!

https://uploads.disquscdn.com/images/3a3113e1157258321b78c111cc6f6eab200ad5edb25f5af4fb83741addd857a7.png

yihui yihui 2022-12-17 03:17:51

Hi, if R can't download the zip package, you can download it using your web browser, and pass the downloaded file path to tinytex:::install_prebuilt() to install.

Originally posted on 2021-08-23 03:36:42

giscus-bot giscus-bot 2022-12-17 03:14:29
Guest *happydude123* @ 2021-11-12 13:59:19 originally posted:

hi, i am also having trouble getting a document to compile. this is the error i'm seeing. what should i do?

C:UsersmeAppDataRoamingTinyTeXtexmf-distscriptstexlivetlmgr.pl: TLPDB::from_file could not initialize from: https://mirror.ctan.org/systems/texlive/tlnet/tlpkg/texlive.tlpdb
C:UsersmeAppDataRoamingTinyTeXtexmf-distscriptstexlivetlmgr.pl: Maybe the repository setting should be changed.
C:UsersmeAppDataRoamingTinyTeXtexmf-distscriptstexlivetlmgr.pl: More info: https://tug.org/texlive/acquire.html
! LaTeX Error: File `caption.sty' not found.

! Emergency stop.
<read *="">

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

yihui yihui 2022-12-17 03:17:52

It seems you cannot access https://mirror.ctan.org for some reason. See if this works:

tinytex::tlmgr_repo("https://ctan.math.illinois.edu")

If you cannot access https://ctan.math.illinois.edu either, you may choose a CTAN mirror that works for you. See the hep page ?tinytex::tlmgr_repo.

Originally posted on 2021-11-12 15:24:27

giscus-bot giscus-bot 2022-12-17 03:14:30
访客 *Yuwei Shen* @ 2021-11-13 16:13:23 写道:

Hi Yihui,
I stuck with below error when I followed the debugging step to update packages.
Thank you in advance.

还安装相依关系‘bit’, ‘rappdirs’, ‘bit64’, ‘data.table’, ‘gargle’, ‘uuid’, ‘ids’, ‘fastmap’, ‘vroom’, ‘tzdb’, ‘jquerylib’, ‘RcppArmadillo’, ‘dtplyr’, ‘googledrive’, ‘googlesheets4’

有二进制版本的,但源代码版本是后来的:  
binary source needs_compilation  
readr 2.0.2 2.1.0 TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) tinytex::tlmgr_update()  
Error in askYesNo(msg) :  
Unrecognized response “tinytex::tlmgr_update()”
yihui yihui 2022-12-17 03:17:53

The question told you to answer Yes, no, or cancel (type one of these words). You answered "tinytex::tlmgr_update()".

Originally posted on 2021-11-14 03:04:36

giscus-bot giscus-bot 2022-12-17 03:14:32
Guest *Samy* @ 2022-02-15 19:47:50 originally posted:

I have tried updating, using the remotes option, and I don't have MikTek installed, I tried the options(tinytex.verbose = TRUE) part too but it simply won't compile a PDF with an image saying the image isn't in the path (even though it is)

! LaTeX Error: File `/Users/me/ttest1' not found.

giscus-bot giscus-bot 2022-12-17 03:14:33
Guest *kasha* @ 2022-02-18 06:12:10 originally posted:

Hey, I have this error

! LaTeX Error: File `tabu.sty' not found.

! Emergency stop.
<read *="">

Error: LaTeX failed to compile POE-2021-09-SEP.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See POE-2021-09-SEP.log for more info.
In addition: There were 15 warnings (use warnings() to see them)
Execution halted

giscus-bot giscus-bot 2022-12-17 03:14:34
Guest *Aaron* @ 2022-03-18 18:08:43 originally posted:

Hi Yihui,

Not sure why I'm getting the following error. I'm stuck and can't figure this out. Any help you can provide would be appreciated. I'm not sure what the error message below means. I tried reinstalling packages.

This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2021/W32TeX) (preloaded format=pdflatex)
restricted write18 enabled.
entering extended mode
I was unable to find any missing LaTeX packages from the error log Test.log.
! Illegal parameter number in definition of CT@cell@color.

6
l.151 cellcolor{ #666666}
{textcolor{white}{textbf{rating_std}}} & cellc...

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

giscus-bot giscus-bot 2022-12-17 03:14:34
Guest *Joost* @ 2022-04-28 07:08:35 originally posted:

Hi Yihui,

I am rendering multiple pdf files in parallel with RMarkdown and tinytex , and always get this error:

Error in checkForRemoteErrors(val) :
7 nodes produced errors; first error: LaTeX failed to compile name_of_file.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See name_of_file.log for more info.

The log then showes this error.

! LaTeX Error: File `name_of_file_files/figure-latex/plot_1-1' not found.

However, if I rerun the code for all instances where the pdf was not rendered they render completly fine [but others might fail with the same error].

Any suggestion what might cause this to happen and how it can be solved?

Thanks!

giscus-bot giscus-bot 2022-12-17 03:14:35
Guest *Carolina Delgadillo* @ 2022-07-15 01:19:27 originally posted:

Hi I can't Knit my notebook to a PDF because of this

! LaTeX Error: Unicode character ́ (U+0301)

not set up for use with LaTeX

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

In addition: There were 50 or more warnings (use warnings() to see the first 50)

Execution halted

what should I do?

giscus-bot giscus-bot 2022-12-17 03:14:37
Guest *FAtma* @ 2022-10-13 11:47:11 originally posted:

I stuck with below error when I am trying to Create output in PDF
Package inputenc Error: Unicode char u8:− not set up for use with LaTeX.

giscus-bot giscus-bot 2022-12-17 03:14:38
Guest *Ruhma* @ 2022-10-14 13:42:21 originally posted:

Hello,

I keep getting this message when I try to knit the file:

I was unable to find any missing LaTeX packages from the error log Case-Study-2.log.

! LaTeX Error: Unicode character β (U+03B2)
not set up for use with LaTeX.

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

Execution halted

giscus-bot giscus-bot 2022-12-17 03:14:39
Guest *Mark* @ 2022-11-02 03:29:40 originally posted:

I am getting the following error in R:

! ! Unable to read an entire line---bufsize=200000.

! Please increase buf_size in texmf.cnf.

How do I increase the bufsize? I am using tinytex.

Thanks!

mamadou-data mamadou-data 2022-12-30 03:19:08

Bonjour, je n'arrive pas à pas à faire une sortie pdf. Voici le message d'erreur:

I was unable to find any missing LaTeX packages from the error log MethodesDevoirNo2DiedhiouGueye.log.
! LaTeX Error: Unicode character λ (U+03BB)
not set up for use with LaTeX.

Erreur : LaTeX failed to compile MethodesDevoirNo2DiedhiouGueye.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See MethodesDevoirNo2DiedhiouGueye.log for more info.
Exécution arrêtée

cderv cderv 2023-01-03 15:40:39

! LaTeX Error: Unicode character λ (U+03BB)
not set up for use with LaTeX.

La doc sur comment utiliser des caractères unicode avec LaTeX devrait aider.
https://bookdown.org/yihui/rmarkdown-cookbook/latex-unicode.html

Pour les futurs problèmes:

C'est plus adapté pour demander de l'aide que les commentaires sur cette page.

Merci !

vaishaliporthi vaishaliporthi 2023-06-04 06:06:46

Hi!

I am having trouble knitting my R markdown file into PDF in cloud version as well as in my Rstudio installed in desktop, here is the error displayed:

! Paragraph ended before \split was complete.

\par
l.349

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

Could anyone please suggest me how to fix this error. Thanks in advance!

scottkosty scottkosty 2023-06-04 09:54:51

@vaishaliporthi could you provide a minimal example file?

vaishaliporthi vaishaliporthi 2023-06-04 16:52:37

How do I attach Rmd file here?

scottkosty scottkosty 2023-06-04 19:31:52

How do I attach Rmd file here?

For me, it says "Attach files by dragging & dropping, selecting or pasting them". I see that at the bottom of this text box while I'm replying.

vaishaliporthi vaishaliporthi 2023-06-04 22:17:59

I was able to fix the error after following the troubleshooting methods (removing space lines between the latex code) provided in the textbook "Optimization modeling using R" by Timothy R. Anderson. Thank you @scottkosty for your help!

vaishaliporthi vaishaliporthi 2023-06-04 22:49:00

Can you please help me how to fix the error:

Error in contrib.url (repos,"source"):
trying to use CRAN without setting a mirror
Calls: ...eval_with_user_handlers-> eval ->eval -> install.packages ->contrib.url

Even though I have installed ROI.plugin.glpk package , same error occurs.

Thanks in advance!

scottkosty scottkosty 2023-06-05 07:05:11

@vaishaliporthi how did you get the error? Were you trying to install a package? Does the information at the following help? https://stackoverflow.com/questions/55244209/error-in-contrib-urlrepos-source-in-r-trying-to-use-cran-without-setting-a

annimarika annimarika 2023-06-08 20:10:09

processing file: Lähetuste-kodutöö-4.Rmd

output file: Lähetuste-kodutöö-4.knit.md

"C:/Program Files/RStudio/bin/quarto/bin/tools/pandoc" +RTS -K512m -RTS Lähetuste-kodutöö-4.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output Lähetuste-kodutöö-4.tex --lua-filter "C:\Users\Mariannilo\AppData\Local\Programs\R\R-4.2.2\library\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\Mariannilo\AppData\Local\Programs\R\R-4.2.2\library\rmarkdown\rmarkdown\lua\latex-div.lua" --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --variable "geometry:margin=1in"
! LaTeX Error: Unicode character ^^[ (U+001B)
not set up for use with LaTeX.

Error: LaTeX failed to compile Lähetuste-kodutöö-4.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Lähetuste-kodutöö-4.log for more info.
Execution halted

EcologyHan EcologyHan 2023-07-13 09:01:30

Hi!

I am having trouble knitting the .tex file into PDF in my Rstudio (MAC m1) installed in desktop, here is the error displayed:

! Package pdftex.def Error: File `20170730_Appendix_3_final_files/figure-latex/app3.10-1.pdf' not found: using draft setting.

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

and

! LaTeX Error: Unknown graphics extension: .4-1.

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

Could anyone please suggest me how to fix this error.
Thanks in advance!!!

fabolousu fabolousu 2023-09-06 11:40:53

Hello! I'm knitting a resume with Rmarkdown with the awesome cv template, but during the process I get this message error:

! Package fontspec Error: The font "Roboto-Regular" cannot be found.

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

What should I do? Thank you for your help in advance! Excuse if the question is stupid.

cderv cderv 2023-09-06 11:51:28

This is a font issue. You need to check that you have the font on your system, or you need to install it somehow. Sometimes it could be a typo in how the font is called on your system. Also, for LaTeX, fonts can be available through package like https://www.ctan.org/tex-archive/fonts/roboto

hope it helps

fabolousu fabolousu 2023-09-06 12:34:55

Thanks! I checked and I already have it on my system. Maybe could be a problem with the directory of the fonts?

fabolousu fabolousu 2023-09-06 12:39:47

Problem solved! Thanks anyway :)

777qiann 777qiann 2023-09-10 13:53:11

Hi! I'm trying to knitting a file with Rmarkdown with the ctex template of yihui, but I get this message error:

! Package fontspec Error: The font "Roboto-Regular" cannot be found.

Error: LaTeX failed to compile 111.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips.
In advance: Warning message:
In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
'"xelatex"' not found
Execution halted

How can i solve this problem? Thank you for your help in advance!

yihui yihui 2023-09-11 05:04:24

Please provide xfun::session_info('tinytex').

cderv cderv 2023-09-11 07:41:20

Same error as @fabolousu shared earlier last week in the comment section.

It seems problem was solved, but solution was not shared. Any hint @fabolousu ?

fabolousu fabolousu 2023-09-11 09:23:38

You need to download the roboto font package from google or anywhere else then move the package inside the fonts folder of your rmarkdown latex doc. The fonts folder directory is the same as the directory of the project I guess. Then try to knit again.

777qiann 777qiann 2023-09-11 10:28:14

Thanks! The font problem has been solved but there is another error:
Error: LaTeX failed to compile 1.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips.
:Warning message:
In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
'"xelatex"' not found
Execution halted

how can i do to deal with this problem?Thanks for your help

777qiann 777qiann 2023-09-11 10:30:29

The result of xfun::session_info('tinytex') in R is like this:

xfun::session_info('tinytex')
R version 4.3.1 (2023-06-16 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045), RStudio 2022.7.2.576

Locale:
LC_COLLATE=Chinese (Simplified)_China.utf8
LC_CTYPE=Chinese (Simplified)_China.utf8
LC_MONETARY=Chinese (Simplified)_China.utf8
LC_NUMERIC=C
LC_TIME=Chinese (Simplified)_China.utf8

time zone: Asia/Shanghai
tzcode source: internal

Package version:
graphics_4.3.1 grDevices_4.3.1 stats_4.3.1 tinytex_0.46
tools_4.3.1 utils_4.3.1 xfun_0.40

yihui yihui 2023-09-11 14:22:15

It seems you didn't install TinyTeX but was using another LaTeX distribution. I think your problem should be solved if you use TinyTeX: tinytex::install_tinytex()

Then tinytex should be able to detect the missing package and install it automatically for you:

> tinytex::parse_packages(text = '! Package fontspec Error: The font "Roboto-Regular" cannot be found.')
tlmgr search --file --global '/Roboto-Regular(-(Bold|Italic|Regular).*)?[.](tfm|afm|mf|otf|ttf)'
[1] "roboto"
777qiann 777qiann 2023-09-11 15:23:17

Thanks for response!
I use TinyteX with tinytex::install_tinytex()
but get this error:

tinytex::install_tinytex()
trying URL 'https://yihui.org/tinytex/TinyTeX-1.zip'
Content type 'application/octet-stream' length 129152113 bytes (123.2 MB)
downloaded 23.8 MB

Error in system2("tlmgr", args, ...) : '"tlmgr"' not found
In addition: Warning message:
In extract(pkg, exdir = path.expand(target)) :
error 1 in extracting from zip file

I thought the package "tlmgr" should be installed first so i tryed,but it did not word:
Warning in install.packages :
package ‘tlmgr’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

My version of R and Rstudio are both latest.I also tryed install the package with other cran but failed every time.

I dont konw what's wrongn with my R system,or Did I make any mistake in my opration

yihui yihui 2023-09-11 15:49:59

Content type 'application/octet-stream' length 129152113 bytes (123.2 MB)
downloaded 23.8 MB

That indicates the download was incomplete (I don't know why; perhaps an internet connection problem). You can try to download https://yihui.org/tinytex/TinyTeX-1.zip manually, and pass the path of the downloaded zip file to tinytex:::install_prebuilt() to install it.

777qiann 777qiann 2023-09-14 00:57:06

Thanks for all your help!!!!I have solved the problem and compile my file to pdf version!!I am sosososo excited!!Thanks very much

🎉 1
LexiangYang LexiangYang 2023-09-21 19:51:04

Hi, I have trouble on knitting the RMarkDown file to PDF, could you give me some advice?

processing file: Homework1.Rmd
5/18
6/18 [Fueltype_Sellingprice]
7/18
8/18 [Selling_Pricehistogram]
9/18
10/18 [Percentile_IQR]
11/18
12/18 [Kms_Driven Normality]
13/18
14/18 [Price&Kms]
15/18
16/18 [side-by-side barplot]
17/18
18/18 [Stacked plot]
/Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/pandoc +RTS -K512m -RTS Homework1.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output Homework1.tex --lua-filter /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --embed-resources --standalone --highlight-style tango --pdf-engine pdflatex --variable graphics --variable 'geometry:margin=1in'
output file: Homework1.knit.md

! LaTeX Error: Unicode character ∗ (U+2217)
not set up for use with LaTeX.

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

yihui yihui 2023-09-21 20:31:07

This typically means you should use xelatex or lualatex instead of the default pdflatex engine: https://bookdown.org/yihui/rmarkdown-cookbook/latex-unicode.html

LexiangYang LexiangYang 2023-09-22 21:34:28

Thank you!! But I have an extra question that when I input the code:
output:
pdf_document:
latex_engine: xelatex
it said that there is no object called "output", could you tell me how to solve this issue? Thanks a lot!

yihui yihui 2023-09-23 16:51:46

That's YAML metadata, not R code. If you don't know R Markdown basics, you may read this section: https://bookdown.org/yihui/rmarkdown/basics.html

Mahdismgds Mahdismgds 2023-09-30 03:02:36

Hi Yihui,
I am currently working on my thesis using the bookdown package in R markdown. While attempting to knit a PDF from my R markdown document, I encountered an issue:

Output file: 01-chap1.knit.md

LaTeX Error: Bad math environment delimiter.

Error: LaTeX failed to compile 01-chap1.tex. For debugging tips, you can refer to https://yihui.org/tinytex/r/#debugging, and you can also check 01-chap1.log for additional information.

I would greatly appreciate your assistance in resolving this error. Thank you very much for your help.

cderv cderv 2023-10-02 10:06:21

Without content of 01-chap1.Rmd, it will be hard to exactly point you where the issue is. Though Bad math environment delimiter. means that some math delimiters are not correctly placed.

You can check 01-chap1.log which will tell you which lines fails in 01-chap1.tex. Verify all $ and $$ usage in your Rmd file too, as you may have forgotten to escape some that should no be math.

Hope it helps

narayanana narayanana 2023-10-09 10:23:53

Hi Yihui,
I have trouble installing LaTeX related packages... I have TinyTeX already installed. It
In Rstudio, I have tinytex R package installed and I tried to run the following:

tinytex::tlmgr_search('setspace')
tlmgr search --file --global "setspace"
First directive needs to be 'name', not at C:/Users//AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLPOBJ.pm line 106, <$retfh> line 1.

I also tried with MikTeX version.. for some reason tinytex R package does not see installation of MikTex so that It can user the packages installed under MikTeX...

Any ideas/suggestions in resolving this issue?

yihui yihui 2023-10-09 13:54:54

Sounds like tlmgr is broken again: https://tex.stackexchange.com/q/522421/9128 Please provide your xfun::session_info('tinytex').

yihui yihui 2023-10-09 15:36:15

I just tested the latest version of TinyTeX on Windows but was unable to reproduce your problem. I was using

tlmgr revision 66798 (2023-04-08 02:15:21 +0200)

I'd suggest that you follow the debugging guide and try to update or reinstall packages first: https://yihui.org/tinytex/r/#debugging

narayanana narayanana 2023-10-10 00:00:03

Thanks so much for your response! I had to remove and install it fresh and it started working.

太感谢了!

yihui yihui 2023-10-10 00:37:49

You are welcome! 不用谢!

narayanana narayanana 2023-10-09 16:10:47

Thanks for your response... how do I check the version of tlmgr?

yihui yihui 2023-10-09 16:49:39

Please read both of my responses above. xfun::session_info('tinytex') will output the version.

narayanana narayanana 2023-10-10 00:00:57

Thanks so much for your response! I had to remove and install it fresh and it started working.

太感谢了

Mahdismgds Mahdismgds 2023-10-10 19:45:37

Hi All,

I'm working on my thesis using the bookdown package and needed to create some tables using the kableExtra package. I've installed and loaded the package, and here's the code I've used:
List of packages required for this analysis
pkg <- c("dplyr", "ggplot2", "knitr", "bookdown", "fitdistrplus", "tidyverse", "tibble", "readr", "tabulate", "janitor", "flextable", "tidyr", "gt", "xtable", "kableExtra")

Load packages
library(thesisdown)
library(dplyr)
library(ggplot2)
library(knitr)
library(fitdistrplus)
library(tidyverse)
library(tibble)
library(readr)
library(tabulate)
library(janitor)
library(flextable)
library(tidyr)
library(gt)
library(xtable)
library(kableExtra)

When attempting to knit a PDF, I encountered an error despite having installed and loaded the kableExtra package. I've also ensured that my RStudio is updated to the latest version. When I removed 'library(kableextra),' the PDF was successfully generated. However, I encountered issues when attempting to use the kableExtra package to create tables. This is the error:
Quitting from lines 175-198 [load_pkgs] (02-chap2.Rmd)
Error:
! package or namespace load failed for 'kableExtra':
.onLoad failed in loadNamespace() for 'kableExtra', details:
call: !is.null(rmarkdown::metadata$output) && rmarkdown::metadata$output %in%
error: 'length = 2' in coercion to 'logical(1)'
Backtrace:

  1. base::library(kableExtra)
  2. base::tryCatch(...)
  3. base (local) tryCatchList(expr, classes, parentenv, handlers)
  4. base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
  5. value[3L]
    Execution halted

I would greatly appreciate your assistance in resolving this error. Thank you very much for your help.

yihui yihui 2023-10-19 05:02:42

This is a bug in kableExtra and not relevant to tinytex. Please see haozhu233/kableExtra#751

yinmin19 yinmin19 2023-10-12 16:04:05

Hi Yihui,
I am new to Rmarkdown and trying to knit Rmd file to PDF. But I got the following error. I installed the "tinytex" packages and my R Studio version is 4.3.1.

processing file: PDF.Rmd
                                                                                                            
"C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/pandoc" +RTS -K512m -RTS PDF.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output PDF.tex --lua-filter "C:\Users\MAYINM~1\AppData\Local\R\WIN-LI~1\4.3\RMARKD~1\RMARKD~1\lua\PAGEBR~1.LUA" --lua-filter "C:\Users\MAYINM~1\AppData\Local\R\WIN-LI~1\4.3\RMARKD~1\RMARKD~1\lua\LATEX-~1.LUA" --embed-resources --standalone --highlight-style tango --pdf-engine pdflatex --variable graphics --variable "geometry:margin=1in" 
output file: PDF.knit.md

This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex)
... Thant\AppData\Roaming\TinyTeX\bin\windows\runscript.tlu:941: ... Thant\AppData\Roaming\TinyTeX\bin\windows\runscript.tlu:864: no appropriate script or program found: fmtutil
I can't find the format file `pdflatex.fmt'!
Running the command C:\Users\Ma Yin Min Thant\AppData\Roaming\TinyTeX\bin\windows\fmtutil-user.exe

kpathsea: Running mktexfmt pdflatex.fmt

The command name is C:\Users\Ma Yin Min Thant\AppData\Roaming\TinyTeX\bin\windows\mktexfmt
I was unable to find any missing LaTeX packages from the error log PDF.log.
! ... Thant\AppData\Roaming\TinyTeX\bin\windows\runscript.tlu:941: ... Thant\AppData\Roaming\TinyTeX\bin\windows\runscript.tlu:864: no appropriate script or program found: fmtutil
! Running the command C:\Users\Ma Yin Min Thant\AppData\Roaming\TinyTeX\bin\windows\fmtutil-user.exe

! Running the command C:\Users\Ma Yin Min Thant\AppData\Roaming\TinyTeX\bin\windows\fmtutil-user.exe

! kpathsea: Running mktexfmt pdflatex.fmt

! The command name is C:\Users\Ma Yin Min Thant\AppData\Roaming\TinyTeX\bin\windows\mktexfmt

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

Could you please help me fix the error? Thank you and looking forward to hearing back.

yihui yihui 2023-10-19 05:03:30

Please read the error message and follow the debugging tips first. Thanks!

yihui yihui 2023-10-30 22:59:48
ccy03 ccy03 2023-10-18 02:30:33

Hello YiHui,

I am trying to knit the Rmd file to pdf, but the following shows. Could you help?

processing file: file_name.Rmd

"C:/Users/ccy/Documents/2023/Y1S2/Quantitative/RStudio/resources/app/bin/quarto/bin/tools/pandoc" +RTS -K512m -RTS file_name.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output Chung_ChenYing_21346743_ECOM_2001_PFE_BBY_WBA.tex --lua-filter "C:\Users\ccy\Documents\2023\Y1S2\Quantitative\R-4.3.1\library\bookdown\rmarkdown\lua\custom-environment.lua" --lua-filter "C:\Users\ccy\Documents\2023\Y1S2\Quantitative\R-4.3.1\library\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\ccy\Documents\2023\Y1S2\Quantitative\R-4.3.1\library\rmarkdown\rmarkdown\lua\latex-div.lua" --embed-resources --standalone --table-of-contents --toc-depth 2 --number-sections --highlight-style tango --pdf-engine pdflatex --variable graphics --wrap preserve --variable "geometry:margin=1in" --include-in-header "C:\Users\ccy\AppData\Local\Temp\Rtmp8Iu842\rmarkdown-str9682cb83458.html" --variable tables=yes --standalone -Mhas-frontmatter=false
output file: file_name.knit.md

Error: LaTeX failed to compile file_name.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips.
In addition: There were 36 warnings (use warnings() to see them)
Execution halted

yihui yihui 2023-10-19 05:04:30

Please read the error message and follow the debugging tips first. Thanks!

CaptLasky CaptLasky 2023-10-19 21:53:59

Hi Yihui,

I've checked the debugging steps and also rstudio/tinytex#210.

I can't find the format file `pdflatex.fmt'!
warning: kpathsea: configuration file texmf.cnf not found in these directories:  

Running the command C:\Users\[User Name]\AppData\Roaming\TinyTeX\bin\windows\fmtutil-user.exe

kpathsea: Running mktexfmt pdflatex.fmt

The command name is C:\Users\[User Name]\AppData\Roaming\TinyTeX\bin\windows\mktexfmt
I was unable to find any missing LaTeX packages from the error [FileName].log.
! ...rlando\AppData\Roaming\TinyTeX\bin\windows\runscript.tlu:941: ...rlando\AppData\Roaming\TinyTeX\bin\windows\runscript.tlu:864: no appropriate script or program found: fmtutil

! kpathsea: Running mktexfmt pdflatex.fmt

I have re-install and checked the path of claimed "missing file" texmf.cnf and pdflatex.fmt file. I have also done the prebuilt check along with all possible update check.

Thanks in advance for your reply!

yihui yihui 2023-10-20 04:20:09

Do you have spaces in your user name?

yihui yihui 2023-10-30 22:59:21
ccy03 ccy03 2023-10-20 13:08:45
yihui yihui 2023-10-20 13:58:30

Please reply on Github. Email attachments won't work for Github issues or discussions.

ccy03 ccy03 2023-10-22 15:08:09

Hi YiHui, why my formula function came out like this? It shows the dollar sign.

$$ E(r) = w_1 E(r_1) + w_2 E(r_2) Var(r) = w_1ˆ2 Var(r_1) + w_2ˆ2 Var(r_2) + 2w_1w_2 Cov(r_1, r_2) $$

ccy03 ccy03 2023-10-22 15:10:48

It shows the dollar sign at the pdf file after i knitr
$$ E(r) = w_1 E(r_1) + w_2 E(r_2)
Var(r) = w_1ˆ2 Var(r_1) + w_2ˆ2 Var(r_2) + 2w_1w_2 Cov(r_1, r_2) $$

ccy03 ccy03 2023-10-22 15:13:20

and it didn't place in the middle

Julianrc17 Julianrc17 2023-10-24 07:31:18

Hi! I have a problem I can't solve with your tinytex package. I can't open PDF files with the R Markdown as the example when I do the knit.
The error is the next one:

==> rmarkdown::render('C:/Users/Juli\u{e1}n/Desktop/UNIVERSIDAD/MADOBIS/ASIGNATURAS/FUNDAMENTOS MATEM\u{c1}TICOS.COMPUTACIONALES/2\u{ba}PARTE ESTAD\u{cd}STICA/R/hi.Rmd',  encoding = 'UTF-8');


processing file: hi.Rmd
                                                                                                     
"C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/pandoc" +RTS -K512m -RTS hi.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output hi.tex --lua-filter "C:\Users\Julián\AppData\Local\R\win-library\4.3\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\Julián\AppData\Local\R\win-library\4.3\rmarkdown\rmarkdown\lua\latex-div.lua" --embed-resources --standalone --highlight-style tango --pdf-engine pdflatex --variable graphics --variable "geometry:margin=1in" 
output file: hi.knit.md

! ...ulián\AppData\Roaming\TinyTeX\bin\windows\runscript.tlu:941: ...ulián\AppData\Roaming\TinyTeX\bin\windows\runscript.tlu:864: no appropriate script or program found: fmtutil

! kpathsea: Running mktexfmt pdflatex.fmt

Error: LaTeX failed to compile hi.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See hi.log for more info.
Además: Warning messages:
1: In strsplit(info, "\n") :
  unable to translate 'User data directory: C:\Users\Juli<a0>n\AppData\Roaming\pandoc' to a wide string
2: In strsplit(info, "\n") : input string 4 is invalid
Ejecución interrumpida

Maybe is for my Users name that is Julián with accent but i dont know how to change it. I couldn't use it other way without changing it ? Or maybe is another problem please solve me I already test everything you post on the debugging screen and it doesn't work, even installed and uninstalled all r and rstudio and I cant solve it.

yihui yihui 2023-10-24 15:13:31

Multiple people have reported the same problem above, e.g., https://github.com/yihui/yihui.org/discussions/1089#discussioncomment-7265373 and https://github.com/yihui/yihui.org/discussions/1089#discussioncomment-7332827 I don't know the cause for now and will investigate it. My guess is that it might have something to do with a certain update in either TeX Live or RStudio IDE, which made pdflatex fail when the Windows user name contains spaces or multibyte characters.

yihui yihui 2023-10-30 22:58:48

Could you try the latest version of tinytex?

install.packages('tinytex')

Please remember to restart R after installation. Make sure packageVersion('tinytex') >= '0.49') after installation. Then reinstall TinyTeX:

tinytex::reinstall_tinytex()

Thanks!

Julianrc17 Julianrc17 2023-10-31 13:41:15

It shows me the next error: Error in loadNamespace(x) : there is no package called ‘remotes’. Im new to R studio so I dont know if I had to do another thing.

yihui yihui 2023-10-31 13:58:42

Sorry, you need to install the remotes package: install.packages('remotes')

Julianrc17 Julianrc17 2023-10-31 14:36:26

Ok already done. But it stills show me the error

processing file: asdasdas.Rmd
                                                                                                     
output file: asdasdas.knit.md

"C:/RStudio/resources/app/bin/quarto/bin/tools/pandoc" +RTS -K512m -RTS asdasdas.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output asdasdas.tex --lua-filter "C:\Users\Julián\AppData\Local\R\win-library\4.3\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\Julián\AppData\Local\R\win-library\4.3\rmarkdown\rmarkdown\lua\latex-div.lua" --embed-resources --standalone --highlight-style tango --pdf-engine pdflatex --variable graphics --variable "geometry:margin=1in" 
! ...ulián\AppData\Roaming\TinyTeX\bin\windows\runscript.tlu:941: ...ulián\AppData\Roaming\TinyTeX\bin\windows\runscript.tlu:864: no appropriate script or program found: fmtutil

! kpathsea: Running mktexfmt pdflatex.fmt

Error: LaTeX failed to compile asdasdas.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See asdasdas.log for more info.
Además: Warning messages:
1: In strsplit(info, "\n") :
  unable to translate 'User data directory: C:\Users\Juli<a0>n\AppData\Roaming\pandoc' to a wide string
2: In strsplit(info, "\n") : input string 4 is invalid
Ejecución interrumpida
yihui yihui 2023-10-31 14:55:26

Did you restart R and check if packageVersion('tinytex') >= '0.48.3') as I mentioned above?

Julianrc17 Julianrc17 2023-10-31 15:08:49

Yes I did

yihui yihui 2023-10-31 15:57:49

Hmm. That's odd. What's the output of tinytex:::system2? And does tinytex:::fmtutil() give the same error "no appropriate script or program found: fmtutil"?

Julianrc17 Julianrc17 2023-11-06 10:25:38

The output is :

> tinytex:::system2
function (command, args, ...) 
{
    if (length(list(...)) > 0 || !is_short(command)) {
        base::system2(command, args, ...)
    }
    else shell(paste(c(command, args), collapse = " "))
}
<bytecode: 0x000002a1e303a160>
<environment: namespace:tinytex>

Ant this the other command:

> tinytex:::fmtutil()
warning: kpathsea: configuration file texmf.cnf not found in these directories: C:/Users/Juli�n/AppData/Roaming/TinyTeX/bin/windows;C:/Users/Juli�n/AppData/Roaming/TinyTeX/bin/windows/share/texmf-local/web2c;C:/Users/Juli�n/AppData/Roaming/TinyTeX/bin/windows/share/texmf-dist/web2c;C:/Users/Juli�n/AppData/Roaming/TinyTeX/bin/windows/share/texmf/web2c;C:/Users/Juli�n/AppData/Roaming/TinyTeX/bin/windows/texmf-local/web2c;C:/Users/Juli�n/AppData/Roaming/TinyTeX/bin/windows/texmf-dist/web2c;C:/Users/Juli�n/AppData/Roaming/TinyTeX/bin/windows/texmf/web2c;C:/Users/Juli�n/AppData/Roaming/TinyTeX/bin;C:/Users/Juli�n/AppData/Roaming/TinyTeX/bin/share/texmf-local/web2c;C:/Users/Juli�n/AppData/Roaming/TinyTeX/bin/share/texmf-dist/web2c;C:/Users/Juli�n/AppData/Roaming/TinyTeX/bin/share/texmf/web2c;C:/Users/Juli�n/AppData/Roaming/TinyTeX/bin/texmf-local/web2c;C:/Users/Juli�n/AppData/Roaming/TinyTeX/bin/texmf-dist/web2c;C:/Users/Juli�n/AppData/Roaming/TinyTeX/bin/texmf/web2c;C:/Users/Juli�n/AppData/Roaming/texmf-local/web2c;C:/Users/Juli�n/AppData/Roaming/TinyTeX;C:/Users/Juli�n/AppData/Roaming/TinyTeX/share/texmf-local/web2c;C:/Users/Juli�n/AppData/Roaming/TinyTeX/share/texmf-dist/web2c;C:/Users/Juli�n/AppData/Roaming/TinyTeX/share/texmf/web2c;C:/Users/Juli�n/AppData/Roaming/TinyTeX/texmf-local/web2c;C:/Users/Juli�n/AppData/Roaming/TinyTeX/texmf-dist/web2c;C:/Users/Juli�n/AppData/Roaming/TinyTeX/texmf/web2c.
...ulián\AppData\Roaming\TinyTeX\bin\windows\runscript.tlu:941: ...ulián\AppData\Roaming\TinyTeX\bin\windows\runscript.tlu:864: no appropriate script or program found: fmtutil
Warning message:
In shell(paste(c(command, args), collapse = " ")) :
  'fmtutil-sys --all' execution failed with error code 1
yihui yihui 2023-11-06 14:35:54

Thanks! This is really odd. Anyway, what's the output of list.files(dirname(tinytex:::which_bin('fmtutil-sys')))?

Julianrc17 Julianrc17 2023-11-06 15:46:44
> list.files(dirname(tinytex:::which_bin('fmtutil-sys')))
  [1] "afm2tfm.exe"                               "api-ms-win-core-file-l1-2-0.dll"          
  [3] "api-ms-win-core-file-l2-1-0.dll"           "api-ms-win-core-localization-l1-2-0.dll"  
  [5] "api-ms-win-core-processthreads-l1-1-1.dll" "api-ms-win-core-synch-l1-2-0.dll"         
  [7] "api-ms-win-core-timezone-l1-1-0.dll"       "api-ms-win-crt-convert-l1-1-0.dll"        
  [9] "api-ms-win-crt-environment-l1-1-0.dll"     "api-ms-win-crt-filesystem-l1-1-0.dll"     
 [11] "api-ms-win-crt-heap-l1-1-0.dll"            "api-ms-win-crt-locale-l1-1-0.dll"         
 [13] "api-ms-win-crt-math-l1-1-0.dll"            "api-ms-win-crt-multibyte-l1-1-0.dll"      
 [15] "api-ms-win-crt-process-l1-1-0.dll"         "api-ms-win-crt-runtime-l1-1-0.dll"        
 [17] "api-ms-win-crt-stdio-l1-1-0.dll"           "api-ms-win-crt-string-l1-1-0.dll"         
 [19] "api-ms-win-crt-time-l1-1-0.dll"            "api-ms-win-crt-utility-l1-1-0.dll"        
 [21] "bibtex.exe"                                "dvilualatex.exe"                          
 [23] "dviluatex.exe"                             "dvipdfm.exe"                              
 [25] "dvipdfmx.dll"                              "dvipdfmx.exe"                             
 [27] "dvips.exe"                                 "ebb.exe"                                  
 [29] "eps2eps.exe"                               "etex.exe"                                 
 [31] "extractbb.exe"                             "fc-cache.exe"                             
 [33] "fc-cat.exe"                                "fc-list.exe"                              
 [35] "fc-match.exe"                              "fc-pattern.exe"                           
 [37] "fc-query.exe"                              "fc-scan.exe"                              
 [39] "fc-validate.exe"                           "fmtutil-sys.exe"                          
 [41] "fmtutil-user.exe"                          "fmtutil.exe"                              
 [43] "gftodvi.exe"                               "gftopk.exe"                               
 [45] "gftype.exe"                                "icudt72.dll"                              
 [47] "inimf.exe"                                 "initex.exe"                               
 [49] "kpathsealibw64.dll"                        "kpseaccess.exe"                           
 [51] "kpsereadlink.exe"                          "kpsestat.exe"                             
 [53] "kpsewhich.exe"                             "latex.exe"                                
 [55] "latexmk.exe"                               "lua53w64.dll"                             
 [57] "luahbtex.dll"                              "luahbtex.exe"                             
 [59] "lualatex.exe"                              "luaotfload-tool.exe"                      
 [61] "luatex.dll"                                "luatex.exe"                               
 [63] "mf-nowin.exe"                              "mf.exe"                                   
 [65] "mft.exe"                                   "mktexfmt.exe"                             
 [67] "mktexlsr.exe"                              "mktexmf.exe"                              
 [69] "mktexpk.exe"                               "mktextfm.exe"                             
 [71] "mktexupd.exe"                              "msvcp140.dll"                             
 [73] "msvcr100.dll"                              "pdf2dsc.exe"                              
 [75] "pdf2ps.exe"                                "pdfddeservername.txt"                     
 [77] "pdfetex.exe"                               "pdflatex.exe"                             
 [79] "pdfopt.exe"                                "pdftex.dll"                               
 [81] "pdftex.exe"                                "pktogf.exe"                               
 [83] "pktype.exe"                                "ps2ascii.exe"                             
 [85] "ps2pdf.exe"                                "ps2pdf12.exe"                             
 [87] "ps2pdf13.exe"                              "ps2pdf14.exe"                             
 [89] "ps2ps.exe"                                 "rungs.exe"                                
 [91] "runscript.dll"                             "runscript.exe"                            
 [93] "runscript.tlu"                             "teckit_compile.exe"                       
 [95] "tex.dll"                                   "tex.exe"                                  
 [97] "texhash.exe"                               "texlua.exe"                               
 [99] "texluac.exe"                               "tlmgr.bat"                                
[101] "ucrtbase.dll"                              "updmap-sys.exe"                           
[103] "updmap-user.exe"                           "updmap.exe"                               
[105] "vcruntime140.dll"                          "wrunscript.exe"                           
[107] "xdvipdfmx.exe"                             "xelatex-unsafe.bat"                       
[109] "xelatex-unsafe.exe"                        "xelatex.exe"                              
[111] "xetex-unsafe.bat"                          "xetex-unsafe.exe"                         
[113] "xetex.dll"                                 "xetex.exe"   
yihui yihui 2023-11-06 16:37:19

Thanks! This might be a bug of TeX Live, and I just asked in the mailing list: https://tug.org/pipermail/tex-live/2023-November/049633.html

Julianrc17 Julianrc17 2023-11-07 12:03:54
yihui yihui 2023-11-07 14:32:04

According to https://tug.org/pipermail/tex-live/2023-November/049634.html, TinyTeX won't work for you since your username contains multibyte characters.

The good news is that you can install TinyTeX anywhere on your computer, which means you can choose a directory that doesn't contain multibyte characters, e.g., C:/TinyTeX.

tinytex::uninstall_tinytex()
tinytex::install_tinytex(dir = "C:/TinyTeX")

Then restart RStudio / R. Let me know if this works.

Julianrc17 Julianrc17 2023-11-07 15:21:01
yihui yihui 2023-11-07 15:27:24

Okay, at least you have confirmed that TeX Live doesn't work when the username contains non-ASCII characters. Thanks!

yihui yihui 2023-11-17 19:52:30

You no longer need to change your username if you don't want to: https://github.com/yihui/yihui.org/discussions/1089#discussioncomment-7429164

ka2yee ka2yee 2023-11-09 20:43:29

Hi Yihui, I'm having problems with using pdfpages package with rmarkdown. I want to insert a multipage PDF into my rmarkdown rendered PDF document. I'm using tinytex.

The yaml has \usepackage{pdfpages}

and in the body of the rmarkdown I have \includepdf[pages=-]{test.pdf}

I keep getting this error:
! Undefined control sequence.
l.222 \includepdf
[pages=-]{test.pdf}

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

I've gone into cmd and used:

tlmgr install pdfpages

It seems to have said its installed. I see the necessary packages in this location on my PC.
C:\Users\myprofile\AppData\Roaming\TinyTeX\texmf-dist\tex\latex

I shutdown R-studio and try knitr to PDF, but same error. If I remove the \includepdf[pages=-]{test.pdf} line then the PDF renders.

Any suggestions on troubleshooting? I've been working on it for a few days now. I could save each page of the multi-page PDF as an image and use includegraph, but that is not as ideal as doing it all at once.

Any help appreciated. Thanks!

yihui yihui 2023-11-09 21:11:17

Sorry but I can't help you before you help me help you by providing the necessary information: https://yihui.org/tinytex/r/#debugging

Angenazz Angenazz 2023-11-11 13:03:11

Hello?
i keep getting this error code everytime i try to complile my r markdown to pdf.

|.................                                          |  29% [setup]   

processing file: HW2.Rmd
                                                                                                     
"C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/pandoc" +RTS -K512m -RTS HW2.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output HW2.tex --lua-filter "C:\Users\User\AppData\Local\R\win-library\4.3\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\User\AppData\Local\R\win-library\4.3\rmarkdown\rmarkdown\lua\latex-div.lua" --embed-resources --standalone --highlight-style tango --pdf-engine pdflatex --variable graphics --variable "geometry:margin=1in" 
output file: HW2.knit.md

The system cannot find the path specified.
! warning: kpathsea: configuration file texmf.cnf not found in these directories: 
....
! ...s\User\AppData\Roaming\TinyTeX\bin\windows\runscript.tlu:941: ...s\User\AppData\Roaming\TinyTeX\bin\windows\runscript.tlu:864: no appropriate script or program found: fmtutil
! Running the command C:\Users\User\AppData\Roaming\TinyTeX\bin\windows\fmtutil-user.exe
! kpathsea: Running mktexfmt pdflatex.fmt

! The command name is C:\Users\User\AppData\Roaming\TinyTeX\bin\windows\mktexfmt

Error: LaTeX failed to compile HW2.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See HW2.log for more info.
Execution halted
yihui yihui 2023-11-12 03:28:38

Does your username contain non-ASCII characters?

And please also see https://github.com/yihui/yihui.org/discussions/1089#discussioncomment-7429164 for a possible solution.

vaishaliporthi vaishaliporthi 2023-12-12 07:48:42

Hi there! could you please help me fix the following error: output file: ETM_506_PROJECT_REPORT.knit.md

tlmgr update --all --self
texlive-scripts package not found (?!), skipping revision consistency check
tlmgr.pl: package repository https://mirrors.rit.edu/CTAN/systems/texlive/tlnet (not verified: gpg unavailable)
tlmgr.pl install: package already present: l3backend
! LaTeX Error: Mismatched LaTeX support files detected.
(LaTeX) Loading 'l3backend-pdftex.def' aborted!
(LaTeX)
(LaTeX) The L3 programming layer in the LaTeX format
(LaTeX) is dated 2023-06-30, but in your TeX tree the files require
(LaTeX) at least 2023-10-10.

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

I am unable to knit my rmd file to pdf due to the above error. Please help!

cderv cderv 2023-12-12 08:25:38

Did you already try to update and install latest Tex Live ? You can easily reinstall TinyTeX with latest version of tools.

Usually Mismatched LaTeX support files detected. is an issue with updating existing packages before installing a new one.

vaishaliporthi vaishaliporthi 2023-12-12 08:30:35

I have reinstalled TinyTex and tried knitting but it did not work

cderv cderv 2023-12-12 09:07:51

Did you update the tinytex R package already ? Could you provide your xfun::session_info('tinytex') ?

We are suppose to handle such error

Can you confirm you are using the latest tinytex R package, and then latest TinyTeX (tinytex::reinstall_tinytex()) ? Thanks.

If so we may have another issue to deal with... 🤔

leslieruan leslieruan 2023-12-20 15:21:53

hey there, when I was using the package "DataExplorer " and using the function "create_report", it raised the error for rending :processing file: Final-Project.rmarkdown
|.......................................... | 82% [unnamed-chunk-20]
Quitting from lines 428-430 [unnamed-chunk-20] (Final-Project.rmarkdown)
Error:
! LaTeX failed to compile /var/folders/9z/wxtf2s6j2f947n693nk94j_h0000gn/T//Rtmpdz5QcY/filebb805e3e35ed.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See filebb805e3e35ed.log for more info.
Backtrace:

  1. DataExplorer::create_report(dataset)
  2. rmarkdown::render(...)
  3. output_format$intermediates_generator(original_input, intermediates_dir)
  4. rmarkdown:::copy_render_intermediates(...)
  5. rmarkdown::find_external_resources(original_input)
    ...
  6. tinytex::latexmk(file, engine, if (biblatex) "biber" else "bibtex")
  7. tinytex:::latexmk_emu(...)
  8. tinytex (local) run_engine()
  9. tinytex (local) on_error()
  10. tinytex:::show_latex_error(file, logfile)

Execution halted but it works well in R ,just not for render, do you know the reason? thanks a million!

Cristrinaranjus Cristrinaranjus 2024-01-10 14:55:00

Hello Yihui,

I am trying to knit some document with the papaja template. This is the .log file that I have obtained, as it has errors that I don't know how to fix. Someone could know something about this?

Thanks!

This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2024.1.10)  10 JAN 2024 15:43
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**manuscript.tex
(./manuscript.tex
LaTeX2e <2023-11-01>
L3 programming layer <2024-01-04>
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/apa6/apa6.cls
Document Class: apa6 2023/08/07 v2.35 APA formatting (6th edition)
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/article.cls
Document Class: article 2023/05/17 v1.4n Standard LaTeX document class
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/size12.clo
File: size12.clo 2023/05/17 v1.4n Standard LaTeX file (size option)
)
\c@part=\count187
\c@section=\count188
\c@subsection=\count189
\c@subsubsection=\count190
\c@paragraph=\count191
\c@subparagraph=\count192
\c@figure=\count193
\c@table=\count194
\abovecaptionskip=\skip48
\belowcaptionskip=\skip49
\bibindent=\dimen140
) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2020/10/05 v2.5k e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count195
)
Class apa6 Info: No bibliography package was specified; defaulting to (but not loading) Biblatex on input line 213.
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/lm/lmodern.sty
Package: lmodern 2015/05/01 v1.6.1 Latin Modern Fonts
LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
(Font)                  OT1/cmr/m/n --> OT1/lmr/m/n on input line 22.
LaTeX Font Info:    Overwriting symbol font `letters' in version `normal'
(Font)                  OML/cmm/m/it --> OML/lmm/m/it on input line 23.
LaTeX Font Info:    Overwriting symbol font `symbols' in version `normal'
(Font)                  OMS/cmsy/m/n --> OMS/lmsy/m/n on input line 24.
LaTeX Font Info:    Overwriting symbol font `largesymbols' in version `normal'
(Font)                  OMX/cmex/m/n --> OMX/lmex/m/n on input line 25.
LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 26.
LaTeX Font Info:    Overwriting symbol font `letters' in version `bold'
(Font)                  OML/cmm/b/it --> OML/lmm/b/it on input line 27.
LaTeX Font Info:    Overwriting symbol font `symbols' in version `bold'
(Font)                  OMS/cmsy/b/n --> OMS/lmsy/b/n on input line 28.
LaTeX Font Info:    Overwriting symbol font `largesymbols' in version `bold'
(Font)                  OMX/cmex/m/n --> OMX/lmex/m/n on input line 29.
LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `normal'
(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 31.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `normal'
(Font)                  OT1/cmss/m/n --> OT1/lmss/m/n on input line 32.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `normal'
(Font)                  OT1/cmr/m/it --> OT1/lmr/m/it on input line 33.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `normal'
(Font)                  OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 34.
LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `bold'
(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 35.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `bold'
(Font)                  OT1/cmss/bx/n --> OT1/lmss/bx/n on input line 36.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `bold'
(Font)                  OT1/cmr/bx/it --> OT1/lmr/bx/it on input line 37.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `bold'
(Font)                  OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 38.
) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2021/04/29 v2.0v Standard LaTeX package
LaTeX Font Info:    Trying to load font information for T1+lmr on input line 112.
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/lm/t1lmr.fd
File: t1lmr.fd 2015/05/01 v1.6.1 Font defs for Latin Modern
)) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2020/01/02 v5.9 Page Geometry
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
\KV@toks@=\toks17
) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/iftex/ifvtex.sty
Package: ifvtex 2019/10/25 v1.7 ifvtex legacy package. Use iftex instead.
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/iftex/iftex.sty
Package: iftex 2022/02/03 v1.0f TeX engine tests
))
\Gm@cnth=\count196
\Gm@cntv=\count197
\c@Gm@tempcnt=\count198
\Gm@bindingoffset=\dimen141
\Gm@wd@mp=\dimen142
\Gm@odd@mp=\dimen143
\Gm@even@mp=\dimen144
\Gm@layoutwidth=\dimen145
\Gm@layoutheight=\dimen146
\Gm@layouthoffset=\dimen147
\Gm@layoutvoffset=\dimen148
\Gm@dimlist=\toks18
) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR)
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2022/03/10 v1.4e Standard LaTeX Graphics (DPC,SPQR)
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2021/08/11 v1.11 sin cos tan (DPC)
) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 107.
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2022/09/22 v1.2b Graphics/color driver for pdftex
))
\Gin@req@height=\dimen149
\Gin@req@width=\dimen150
) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty
Package: gettitlestring 2019/12/15 v1.6 Cleanup title references (HO)
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/kvoptions/kvoptions.sty
Package: kvoptions 2022-06-15 v3.15 Key value format for package options (HO)
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
Package: ltxcmds 2023-12-04 v1.26 LaTeX kernel commands for general use (HO)
) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty
Package: kvsetkeys 2022-10-05 v1.19 Key value parser (HO)
))) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/booktabs/booktabs.sty
Package: booktabs 2020/01/12 v1.61803398 Publication quality tables
\heavyrulewidth=\dimen151
\lightrulewidth=\dimen152
\cmidrulewidth=\dimen153
\belowrulesep=\dimen154
\belowbottomsep=\dimen155
\aboverulesep=\dimen156
\abovetopsep=\dimen157
\cmidrulesep=\dimen158
\cmidrulekern=\dimen159
\defaultaddspace=\dimen160
\@cmidla=\count199
\@cmidlb=\count266
\@aboverulesep=\dimen161
\@belowrulesep=\dimen162
\@thisruleclass=\count267
\@lastruleclass=\count268
\@thisrulewidth=\dimen163
) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/threeparttable/threeparttable.sty
Package: threeparttable 2003/06/13  v 3.0
\@tempboxb=\box51
)
\b@level@one@skip=\skip50
\e@level@one@skip=\skip51
\b@level@two@skip=\skip52
\e@level@two@skip=\skip53
\b@level@three@skip=\skip54
\e@level@three@skip=\skip55
\b@level@four@skip=\skip56
\e@level@four@skip=\skip57
\b@level@five@skip=\skip58
\e@level@five@skip=\skip59
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/caption/caption.sty
Package: caption 2023/08/05 v3.6o Customizing captions (AR)
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/caption/caption3.sty
Package: caption3 2023/07/31 v2.4d caption3 kernel (AR)
\caption@tempdima=\dimen164
\captionmargin=\dimen165
\caption@leftmargin=\dimen166
\caption@rightmargin=\dimen167
\caption@width=\dimen168
\caption@indent=\dimen169
\caption@parindent=\dimen170
\caption@hangindent=\dimen171
Package caption Info: Standard document class detected.
)
\c@caption@flags=\count269
\c@continuedfloat=\count270
Package caption Info: threeparttable package is loaded.
)
\c@APAenum=\count271
\@text@par@indent=\skip60
\gr@box=\box52
\gr@boxwidth=\skip61
\gr@boxheight=\skip62
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/tools/bm.sty
Package: bm 2023/07/08 v1.2f Bold Symbol Support (DPC/FMi)
\symboldoperators=\mathgroup4
\symboldletters=\mathgroup5
\symboldsymbols=\mathgroup6
Package bm Info: No bold for \OMX/lmex/m/n, using \pmb.
LaTeX Font Info:    Redeclaring math alphabet \mathbf on input line 149.
)
\c@appendix=\count272
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty
Package: fancyhdr 2022/11/09 v4.1 Extensive control of page headers and footers
\f@nch@headwidth=\skip63
\f@nch@O@elh=\skip64
\f@nch@O@erh=\skip65
\f@nch@O@olh=\skip66
\f@nch@O@orh=\skip67
\f@nch@O@elf=\skip68
\f@nch@O@erf=\skip69
\f@nch@O@olf=\skip70
\f@nch@O@orf=\skip71
) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/endfloat/endfloat.sty
Package: endfloat 2019/04/15 v2.7 LaTeX2e package puts figures and tables at end (jdm)
\c@posttable=\count273
\efloat@postttt=\write3
\@ef@tttopen=\count274
\c@postfigure=\count275
\efloat@postfff=\write4
\@ef@fffopen=\count276
)) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsmath/amsmath.sty
Package: amsmath 2023/05/13 v2.17o AMS math features
\@mathmargin=\skip72
For additional information on amsmath, use the `?' option.
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2021/08/26 v2.01 AMS text
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks19
\ex@=\dimen172
)) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
LaTeX Info: Redefining \boldsymbol on input line 28.
\pmbraise@=\dimen173
) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsmath/amsopn.sty
Package: amsopn 2022/04/08 v2.04 operator names
)
\inf@bad=\count277
LaTeX Info: Redefining \frac on input line 234.
\uproot@=\count278
\leftroot@=\count279
LaTeX Info: Redefining \overline on input line 399.
LaTeX Info: Redefining \colon on input line 410.
\classnum@=\count280
\DOTSCASE@=\count281
LaTeX Info: Redefining \ldots on input line 496.
LaTeX Info: Redefining \dots on input line 499.
LaTeX Info: Redefining \cdots on input line 620.
\Mathstrutbox@=\box53
\strutbox@=\box54
LaTeX Info: Redefining \big on input line 722.
LaTeX Info: Redefining \Big on input line 723.
LaTeX Info: Redefining \bigg on input line 724.
LaTeX Info: Redefining \Bigg on input line 725.
\big@size=\dimen174
LaTeX Font Info:    Redeclaring font encoding OML on input line 743.
LaTeX Font Info:    Redeclaring font encoding OMS on input line 744.
\macc@depth=\count282
LaTeX Info: Redefining \bmod on input line 905.
LaTeX Info: Redefining \pmod on input line 910.
LaTeX Info: Redefining \smash on input line 940.
LaTeX Info: Redefining \relbar on input line 970.
LaTeX Info: Redefining \Relbar on input line 971.
\c@MaxMatrixCols=\count283
\dotsspace@=\muskip16
\c@parentequation=\count284
\dspbrk@lvl=\count285
\tag@help=\toks20
\row@=\count286
\column@=\count287
\maxfields@=\count288
\andhelp@=\toks21
\eqnshift@=\dimen175
\alignsep@=\dimen176
\tagshift@=\dimen177
\tagwidth@=\dimen178
\totwidth@=\dimen179
\lineht@=\dimen180
\@envbody=\toks22
\multlinegap=\skip73
\multlinetaggap=\skip74
\mathdisplay@stack=\toks23
LaTeX Info: Redefining \[ on input line 2953.
LaTeX Info: Redefining \] on input line 2954.
) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsfonts/amssymb.sty
Package: amssymb 2013/01/14 v3.01 AMS font symbols
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsfonts/amsfonts.sty
Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
\symAMSa=\mathgroup7
\symAMSb=\mathgroup8
LaTeX Font Info:    Redeclaring math symbol \hbar on input line 98.
LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'
(Font)                  U/euf/m/n --> U/euf/b/n on input line 106.
)) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2021/04/29 v2.0v Standard LaTeX package
) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2021/02/14 v1.3d Input encoding file
\inpenc@prehook=\toks24
\inpenc@posthook=\toks25
) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/textcomp.sty
Package: textcomp 2020/02/02 v2.0n Standard LaTeX package
) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2023/11/15 v3.01 LaTeX color extensions (UK)
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 274.
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/mathcolor.ltx)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1350.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1354.
Package xcolor Info: Model `RGB' extended on input line 1366.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1368.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1369.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1370.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1371.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1372.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1373.
)
\cslhangindent=\skip75
\csllabelwidth=\skip76
\cslentryspacingunit=\skip77
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/tools/calc.sty
Package: calc 2023/07/08 v4.3 Infix arithmetic (KKT,FJ)
\calc@Acount=\count289
\calc@Bcount=\count290
\calc@Adimen=\dimen181
\calc@Bdimen=\dimen182
\calc@Askip=\skip78
\calc@Bskip=\skip79
LaTeX Info: Redefining \setlength on input line 80.
LaTeX Info: Redefining \addtolength on input line 81.
\calc@Ccount=\count291
\calc@Cskip=\skip80
) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/babel/babel.sty
Package: babel 2024/01/07 v24.1 The Babel package
\babel@savecnt=\count292
\U@D=\dimen183
\l@unhyphenated=\language5
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/babel/txtbabel.def)
\bbl@readstream=\read2
\bbl@dirlevel=\count293
Package babel Info: You haven't specified a language as a class or package
(babel)             option. I'll load 'nil'. Reported on input line 4342.
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/babel/nil.ldf
Language: nil 2024/01/07 v24.1 Nil language
\l@nil=\language6
))
\everypar=\toks26
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/babel/locale/en/babel-english.tex)
Package babel Info: Importing data for english
(babel)             from babel-en.ini. Reported on input line 93.
(c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/was/upgreek.sty
Package: upgreek 2003/02/12 v2.0 (WaS)
Package upgreek Info: Using Euler Roman for upright Greek on input line 31.
\symugrf@m=\mathgroup9
LaTeX Font Info:    Overwriting symbol font `ugrf@m' in version `bold'
(Font)                  U/eur/m/n --> U/eur/b/n on input line 38.
) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/tools/longtable.sty
Package: longtable 2023-11-01 v4.19 Multi-page Table package (DPC)
\LTleft=\skip81
\LTright=\skip82
\LTpre=\skip83
\LTpost=\skip84
\LTchunksize=\count294
\LTcapwidth=\dimen184
\LT@head=\box55
\LT@firsthead=\box56
\LT@foot=\box57
\LT@lastfoot=\box58
\LT@gbox=\box59
\LT@cols=\count295
\LT@rows=\count296
\c@LT@tables=\count297
\c@LT@chunks=\count298
\LT@p@ftn=\toks27
) (c:/Users/Cristina/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/lscape.sty
Package: lscape 2020/05/28 v3.02 Landscape Pages (DPC)
)

! LaTeX Error: File `multirow.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: 
! Emergency stop.
<read *> 
         
l.106 \usepackage
                 {tabularx}		% Control Column width^^M 
Here is how much of TeX's memory 

> you used:

 7727 strings out of 476125
 122348 string characters out of 5792614
 1924528 words of memory out of 5000000
 29715 multiletter control sequences out of 15000+600000
 561366 words of font info for 38 fonts, out of 8000000 for 9000
 14 hyphenation exceptions out of 8191
 72i,0n,79p,253b,444s stack positions out of 10000i,1000n,20000p,200000b,200000s

!  ==> Fatal error occurred, no output PDF file produced!
cderv cderv 2024-01-10 16:25:12

! LaTeX Error: File `multirow.sty' not found.

It seems like multirow is missing.

Note sure which tool is using it (maybe papaja ?). You can ask on their repo for help.

Or you can try install https://www.ctan.org/pkg/multirow
It should have install automatically tough when using TinyTeX ... 🤔

Cristrinaranjus Cristrinaranjus 2024-01-10 16:52:26

Thanks for your time! Using apaquarto instead of a template by papaja has worked for me.

cderv cderv 2024-01-10 17:44:54

So probably an issue in papaja template. Good to know it works !

andreapierucci andreapierucci 2024-03-21 16:08:43

Hi Yihui and Cderv,

It's more than 5 months I'm not working in rmd with latex and I tried to compile an old file. Unfortunately I stuck with the same error:

! LaTeX Error: Environment singlespace undefined.

this is the script in rmd:

output:  
  pdf_document: default
  word_document: default
  html_document: default
   - \usepackage{ragged2e}
   - \usepackage{setspace} 
   

\begin{singlespace}
\begin{center}

\Large

options(tinytex.verbose = TRUE)
setwd("C:/Users/pierand/Documents/Stesura_tesi/Stesura_tesi")

library(jpeg)
library(grid)
logo <- readJPEG("xxxxxxxxxxxx.jpg")

grid.raster(logo)

xxxxxxxxxxxxxxxx\
\vspace{8mm}
\Huge
xxxxxxxxxxxxxs\
\vspace{15mm}

\Large
xxxxxxxxxx\
\vspace{8mm}

\Huge
xxxxxxxxxxxxxxxxxxxxxxx\
\vspace{15mm}

\Large
xxxxxxxxxxxxxxx\
xxxxxxxxxxxxxxxxxxxx\

\vspace{15mm}
\end{center}

\Large
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx

\vspace{15mm}

\begin{center}
xxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
\end{center}
\end{singlespace}

cderv cderv 2024-03-21 19:39:46

Hi ! Would you be able to edit your comment so that it is formatted nicely in a way we can see the code and copy paste it ?

This way we can try reproduce. See https://yihui.org/issue/#please-format-your-issue-correctly

Hint from what I can see

! LaTeX Error: Environment singlespace undefined.

You are using \begin{singlespace} so you need to have the CTAN package that defines this environment. It seems tinytex can't install it automatically from the error in the logfile. So maybe you just need to load it.

From a quick google search, I think you are missing setspace (https://ctan.org/pkg/setspace). You should try install it, or just load it correctly with \usepackage{setspace}

It seems you have it already in your document, but I don't know where you put it (because not correctly formatted).

You can load them with including in header (for preamble) or using the special argument in pdf_document
See https://bookdown.org/yihui/rmarkdown-cookbook/latex-extra.html

Hope it helps

andreapierucci andreapierucci 2024-03-25 09:42:07

Hi cderv,
thanks a lot for your quick message. I tried to copy and paste the code in the right form. I'm sorry if I did some errors, I'm quite beginner in LaTeX.

I reinstalled tinytex ver. 0.50 and I loaded it \usepackage{setspace} and in the script..... \begin{singlespace}.

After some tests it worked just removed the \begin{singlespace} ...\end{singlespace}.
This is quite strange because more than 1 year ago the script worked perfectly. Maybe with some updates I do not need to specified singlespace.
Screenshot 2024-03-25 103519

Thanks again for all your kind support.

👍 1
cderv cderv 2024-03-25 12:29:16

Note sure exactly what you did in the past, but know that Pandoc has setspace loading in its template only when linestretch variable is set https://pandoc.org/MANUAL.html#variables-for-latex

So if you set it in the past, or used a tool that set it, it could have works.

Also I see the same issue in your screenshot: \usepackage{..} lines are not in the correct place in your template.

output:  
  pdf_document: default
  word_document: default
  html_document: default
   - \usepackage{ragged2e}
   - \usepackage{setspace} 

This is not correct. You can't pass LaTeX lines like this under output, see previous comment and docs to understand how to pass such lines

andreapierucci andreapierucci 2024-04-03 16:42:24

Hi cderv, I'm back for another bug in my old code.
this time I got this error . . .

! LaTeX Error: Unknown float option `H'.

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

After many checks I added this line on the top of my code


title: "Introduction"
author: "Andrea"
output:
pdf_document: default
word_document: default
html_document: default
header-includes:

  • \usepackage{ragged2e}
  • \usepackage{setspace}
  • \usepackage{multirow}
  • \usepackage{float}

But I think it is not the float package but the ```{r, fig.cap="xxx"}. At the moment I have:


I removed one by one and all works correctly except when I add fig.cap="xxx" .. with it I got the error I mentioned. Do you know how to fix it? 

best Andrea 

cderv cderv 2024-04-03 18:55:02

Please share a full reproducible example. It seems something is missing somewhere where the float package should be loaded
https://www.overleaf.com/learn/latex/Errors/LaTeX_Error%3A_Unknown_float_option_%60H%27

No sure why it is not. Thanks !

hele2069 hele2069 2024-04-25 22:11:59

I switched from an Intel Mac to an M3-pro Mac a couple of weeks ago. I migrated everything from the old laptop to this new one, including R and RStudio. Knitting worked perfectly fine on the old laptop, and, however, does not work at all on my new laptop.

I keep getting the error message as shown in the image attached. I have tried reinstalling R and RStudio but neither works.

Could somebody please help look at this? I couldn't find anything related to this error message online.

output file: Homoework-8.knit.md

! Undefined control sequence. \tl_trim_spaces:e {__keys_remove_equals:n { }} l.266 \edef \Gin@driver{\Gin@driver} Error: LaTeX failed to compile Homoework-8.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Homoework-8.log for more info. Execution halted

😕 1
cderv cderv 2024-04-26 11:10:44

I have tried reinstalling R and RStudio but neither works.

This error is not related to R or RStudio. It is related to LaTeX and the environment you are using.

Did you install latest TinyTeX ? https://yihui.org/tinytex/#for-r-users

Using a recent version of LaTeX may help

hele2069 hele2069 2024-04-28 01:13:54

Yes. I did try re-installing the packages indicated in website's troubleshooting page. The same issue still persists.

hele2069 hele2069 2024-04-28 01:28:57

Resolved! Just in case anyone has a similar issue:
I have TexLive installed on my computer and this might causes version conflicts with the TinyTex package.
Running rm -rf ~/.texlive* on my terminal did the trick.

Sign in to join the discussion

Sign in with GitHub