rstudio / tinytex

A lightweight, cross-platform, portable, and easy-to-maintain LaTeX distribution based on TeX Live
https://yihui.org/tinytex/
Other
956 stars 114 forks source link

Issue with compiling .tex & reinstallation of tinytex #411

Closed xinkaidupsy closed 7 months ago

xinkaidupsy commented 1 year ago

By filing an issue to this repo, I promise that

I understand that my issue may be closed if I don't fulfill my promises.

Docx compiling was good but when I tried to use markdown to compile PDF, I always got an error: LaTeX failed to compile xxx.tex; Therefore I followed the debugging instruction https://yihui.org/tinytex/r/#debugging and tried running tinytex::reinstall_tinytex(), but the installation got lots of errors. I was wondering if it's the reason why the .tex couldn't be compiled.

Thanks in advance for the help!

tlmgr install apa6 apa7 babel-english biblatex caption csquotes dehyph-exptl draftwatermark endfloat environ fancyhdr fp grfext grffile lineno logreq ms multirow pgf placeins scalerel setspace threeparttable threeparttablex titling tlgpg trimspaces was xpatch tlmgr install: package tlgpg not present in repository. tlmgr: package repository https://ftp.fagskolen.gjovik.no/pub/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable) [1/28, ??:??/??:??] install: apa6 [14k] [2/28, 00:01/01:38] install: apa7 [14k] [3/28, 00:01/00:48] install: babel-english [3k] [4/28, 00:01/00:43] install: biblatex [249k] [5/28, 00:01/00:04] install: caption [60k] [6/28, 00:01/00:03] install: csquotes [18k] [7/28, 00:01/00:03] install: dehyph-exptl [132k] [8/28, 00:02/00:05] install: draftwatermark [3k] [9/28, 00:02/00:05] install: endfloat [5k] [10/28, 00:02/00:05] install: environ [2k] [11/28, 00:02/00:05] install: fancyhdr [6k] [12/28, 00:02/00:05] install: fp [19k] [13/28, 00:03/00:07] install: grfext [3k] [14/28, 00:03/00:07] install: grffile [4k] [15/28, 00:03/00:07] install: lineno [61k] [16/28, 00:03/00:06] install: logreq [4k] [17/28, 00:03/00:06] install: ms [3k] [18/28, 00:03/00:06] install: multirow [3k] [19/28, 00:03/00:06] install: pgf [701k] [20/28, 00:04/00:04] install: placeins [3k] [21/28, 00:04/00:04] install: scalerel [3k] [22/28, 00:04/00:04] install: setspace [8k] [23/28, 00:04/00:04] install: threeparttable [6k] [24/28, 00:05/00:05] install: threeparttablex [3k] [25/28, 00:05/00:05] install: titling [3k] [26/28, 00:05/00:05] install: trimspaces [1k] [27/28, 00:05/00:05] install: was [2k] [28/28, 00:05/00:05] install: xpatch [2k] tlmgr: action install returned an error; continuing. running mktexlsr ... done running mktexlsr. regenerating language.dat regenerating language.def regenerating language.dat.lua running fmtutil-sys --byhyphen "/Users/xinkaidu/Library/TinyTeX/texmf-var/tex/generic/config/language.dat" --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=/var/folders/q_/psb4gb_90gzgp6hjdxvw7rr0000gn/T/t5OvpPV7PV/HBTBMgV60g ... OK: latex.fmt/pdftex xelatex.fmt/xetex lualatex.fmt/luahbtex dvilualatex.fmt/luatex pdflatex.fmt/pdftex running fmtutil-sys --byhyphen "/Users/xinkaidu/Library/TinyTeX/texmf-var/tex/generic/config/language.def" --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=/var/folders/q/psb4gb_90gzgp6hjdxvw7rr0000gn/T/t5OvpPV7PV/HBTBMgV60g ... OK: luahbtex.fmt/luahbtex luatex.fmt/luatex pdftex.fmt/pdftex xetex.fmt/xetex etex.fmt/pdftex pdfetex.fmt/pdftex dviluatex.fmt/luatex running fmtutil-sys --byhyphen "/Users/xinkaidu/Library/TinyTeX/texmf-var/tex/generic/config/language.dat.lua" --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=/var/folders/q/psb4gb_90gzgp6h_jdxvw7rr0000gn/T/t5OvpPV7PV/HBTBMgV60g ... tlmgr: An error has occurred. See above messages. Exiting. tlmgr: package log updated: /Users/xinkaidu/Library/TinyTeX/texmf-var/web2c/tlmgr.log tlmgr: command log updated: /Users/xinkaidu/Library/TinyTeX/texmf-var/web2c/tlmgr-commands.log tlmgr update --self tlmgr install apa6 apa7 babel-english biblatex caption csquotes dehyph-exptl draftwatermark endfloat environ fancyhdr fp grfext grffile lineno logreq ms multirow pgf placeins scalerel setspace threeparttable threeparttablex titling tlgpg trimspaces was xpatch tlmgr install: package tlgpg not present in repository. tlmgr: action install returned an error; continuing. tlmgr: package repository https://ftp.fagskolen.gjovik.no/pub/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable) tlmgr install: package already present: apa6 tlmgr install: package already present: apa7 tlmgr install: package already present: babel-english tlmgr install: package already present: biblatex tlmgr install: package already present: caption tlmgr install: package already present: csquotes tlmgr install: package already present: dehyph-exptl tlmgr install: package already present: draftwatermark tlmgr install: package already present: endfloat tlmgr install: package already present: environ tlmgr install: package already present: fancyhdr tlmgr install: package already present: fp tlmgr install: package already present: grfext tlmgr install: package already present: grffile tlmgr install: package already present: lineno tlmgr install: package already present: logreq tlmgr install: package already present: ms tlmgr install: package already present: multirow tlmgr install: package already present: pgf tlmgr install: package already present: placeins tlmgr install: package already present: scalerel tlmgr install: package already present: setspace tlmgr install: package already present: threeparttable tlmgr install: package already present: threeparttablex tlmgr install: package already present: titling tlmgr install: package already present: trimspaces tlmgr install: package already present: was tlmgr install: package already present: xpatch tlmgr: An error has occurred. See above messages. Exiting. tlmgr --repository http://www.preining.info/tlgpg/ install tlgpg tlmgr: package repository http://www.preining.info/tlgpg/ (not verified: gpg unavailable) [1/2, ??:??/??:??] install: tlgpg.universal-darwin [752k] [2/2, 00:00/00:00] install: tlgpg [1k] running mktexlsr ... done running mktexlsr. tlmgr: package log updated: /Users/xinkaidu/Library/TinyTeX/texmf-var/web2c/tlmgr.log tlmgr: command log updated: /Users/xinkaidu/Library/TinyTeX/texmf-var/web2c/tlmgr-commands.log tlmgr option repository 'https://ftp.fagskolen.gjovik.no/pub/tex-archive/systems/texlive/tlnet' tlmgr: setting default package repository to https://ftp.fagskolen.gjovik.no/pub/tex-archive/systems/texlive/tlnet tlmgr: updating /Users/xinkaidu/Library/TinyTeX/tlpkg/texlive.tlpdb tlmgr update --list tlmgr: package repository https://ftp.fagskolen.gjovik.no/pub/tex-archive/systems/texlive/tlnet (verified) tlmgr: no updates available

cderv commented 1 year ago

When resinstalling, it will try to reinstall also all your package.

tlmgr install: package tlgpg not present in repository.

It seems you had tlgpg from previous install. And it was achived so not found

tlmgr --repository http://www.preining.info/tlgpg/ install tlgpg tlmgr: package repository http://www.preining.info/tlgpg/ (not verified: gpg unavailable) [1/2, ??:??/??:??] install: tlgpg.universal-darwin [752k] [2/2, 00:00/00:00] install: tlgpg [1k]

But you managed to install from another repo.

What is the issue left now ? What is the error when you render ?

xinkaidupsy commented 1 year ago

When resinstalling, it will try to reinstall also all your package.

tlmgr install: package tlgpg not present in repository.

It seems you had tlgpg from previous install. And it was achived so not found

tlmgr --repository http://www.preining.info/tlgpg/ install tlgpg tlmgr: package repository http://www.preining.info/tlgpg/ (not verified: gpg unavailable) [1/2, ??:??/??:??] install: tlgpg.universal-darwin [752k] [2/2, 00:00/00:00] install: tlgpg [1k]

But you managed to install from another repo.

What is the issue left now ? What is the error when you render ?

Thanks for the reply! I got the following error when rendering. I also set options(tinytex.verbose = TRUE) in rmd.

This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode I was unable to find any missing LaTeX packages from the error xxx.log. ! Extra alignment tab has been changed to \cr.

\endtemplate Error: LaTeX failed to compile xxx.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See xxx.log for more info. Execution halted
cderv commented 1 year ago

! Extra alignment tab has been changed to \cr.

It seems this is an issue related to LaTeX, and to the content of your file. Something with table maybe.

https://www.overleaf.com/learn/latex/Errors/Extra_alignment_tab_has_been_changed_to_%5Ccr

Error log may help your find where. Please do check you content. You did not share it, so we can't help further