25 Replies
Guest *FBEV* @ 2019-11-07 10:02:25 originally posted:
1.trying generating Rmarkdown
2.log file says "pgf" missing
tlmgr search --file --global "/tikzlibrarytopaths.code.tex"
Trying to automatically install missing LaTeX packages...
tlmgr install pgf
tlmgr.pl install: package already present: pgf
any idea ? thx
Guest *luca birigazzi* @ 2020-02-11 09:41:51 originally posted:
my working laptop is behind a firewall. I was able to install tinytex downloading the TinyTex.zip and using tinytex:::install_prebuilt(). But the firewall prevents me from installing any additional packages. Providing that I do not want to use a proxy, could I just download the packages manually ? and How? All my attempts have been frustrated, so far!
thanksssssssss
If you have too many packages to install, I guess the best way is to install them on another computer that's not behind the firewall, and copy TinyTeX to your working laptop: https://yihui.org/en/2018/08/tinytex-flash-drive/
If you only need to install one or two packages, you can download them from CTAN, and unzip the packages to the TinyTeX installation dir. The most common dir to put these packages is file.path(tinytex::tinytex_root(), 'texmf-dist', 'tex', 'latex').
Originally posted on 2020-02-11 15:13:42
Guest *luca birigazzi* @ 2020-02-11 15:34:41 originally posted:
thank you!
Guest *yiwei wu* @ 2020-04-15 07:10:37 originally posted:
Hello, I am a Windows user, and not a R user. So how do I update TinyTeX in Windows? I want to keep my packages. Thanks a lot.
First, run this command in your terminal (or command window) to get the names of installed LaTeX packages:
tlmgr info --list --only-installed --data name
Then reinstall TinyTeX, and use
tlmgr install
followed by the package names (separated by spaces) to install the packages.
Originally posted on 2020-04-15 21:41:50
Guest *Rubayat Jinnah* @ 2020-05-13 14:12:09 originally posted:
Hello,
I am failing to compile a pdf in rmarkdown. It says
! Running the command C:UsersrjinnahAppDataRoamingTinyTeXbinwin32fmtutil-user.exe
! kpathsea: Running mktexfmt pdflatex.fmt
! The command name is C:UsersrjinnahAppDataRoamingTinyTeXbinwin32mktexfmt
Error: LaTeX failed to compile IoannisTPavlidisCV.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See CV.log for more info.
Execution halted
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:09
Guest *Pablo Montero* @ 2020-07-04 16:13:53 originally posted:
Hi, I have a problem with tinytex installation in my laptop. I use the script tinytex::install tinytex() and takes very long time to install it.
I did the same in other laptop and the installation was fast.
What could it be the problem with my laptop? I left running all night long and still the installation is not finished.
Please your help
I don't what the problem could be, but if tinytex::install_tinytex() doesn't work, you may try tinytex:::install_prebuilt().
Originally posted on 2020-07-04 18:18:57
Guest *david* @ 2021-02-23 18:48:57 originally posted:
Hi there, the error message always shows: downloading did not succeed (download_file failed) for http://mirrors.ibiblio.org/pub/mirrors/CTAN/systems/texlive/tlnet/archive/2up.tar.xz, but I could download through this address directly. May I know if I could download them, is there any way for me to manually put them into some dictionaries? thanks!
Guest *Anna* @ 2021-08-19 00:26:08 originally posted:
Hi, I am trying to install tinytex on a remote desktop but can't download the zip package from your site due to an insecure connection. Is there a way around this? I keep getting an error message in R that says a connection with the server could not be established.
Thanks!
It will be great if you could post the full original error message. Anyway, if you have difficulty in downloading TinyTeX.zip, you may download it using your web browser, and pass the path of the zip file to tinytex:::install_prebuilt() to install it.
Originally posted on 2021-08-19 02:44:22
Guest *Giovanni Romano* @ 2021-10-19 21:27:57 originally posted:
Hi, I have installed the package tinytex with this command in my Mac Book Air: install.packages('tinytex')
tinytex::install_tinytex()
But R gives me the error I paste down here. What I have to do?
output file: Tutor-3.knit.md
! sh: pdflatex: command not found
Errore: LaTeX failed to compile Tutor-3.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Tutor-3.log for more info.
In aggiunta: Messaggio di avvertimento:
In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
errore durante l'esecuzione del comando
Esecuzione interrotta
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
What happens when you tinytex::install_tinytex()?
Originally posted on 2021-10-20 00:10:46
Guest *Giovanni Romano* @ 2021-10-20 10:05:15 originally posted:
R gives me this error:
tinytex::install_tinytex()
The directory /usr/local/bin is not writable. I recommend that you make it writable. See rstudio/tinytex#24 for more info.
apertura URL 'https://yihui.org/tinytex/TinyTeX-1.tgz'
apertura URL 'https://yihui.org/tinytex/TinyTeX-1.tgz'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (60) SSL certificate problem: certificate has expired
More details here: https://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
HTTPS-proxy has similar options --proxy-cacert and --proxy-insecure.
Errore in download.file(url, output, ..., method = method) :
'curl' call had nonzero exit status
In aggiunta: Messaggi di avvertimento:
1: In download.file(url, output, ..., method = method) :
URL 'https://yihui.org/tinytex/TinyTeX-1.tgz': lo status era 'Peer certificate cannot be authenticated with given CA certificates'
2: In download.file(url, output, ..., method = method) :
URL 'https://yihui.org/tinytex/TinyTeX-1.tgz': lo status era 'Peer certificate cannot be authenticated with given CA certificates'
You can try tinytex::install_tinytex(version = 'latest') instead.
Originally posted on 2021-10-20 13:20:11
Guest *Giovanni Romano* @ 2021-10-20 13:25:36 originally posted:
Thank you very much now everything is working, but now can I knit every document in pdf every time or before I have to call this line of code: tinytex::install_tinytex(version = 'latest') ?
No, this line of code only needs to run once. After you install TinyTeX, you are done. You don't need to reinstall it over and over again.
Originally posted on 2021-10-20 13:42:17
Guest *Giovanni Romano* @ 2021-10-27 13:00:16 originally posted:
Hi, sorry but now I'm working on an assignment, but I don't know which command R doesn't knit to pdf. Can you help me?
output file: Homework-assignment.knit.md
! 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. See https://bookdown.org/yihui/rmarkdown-cookbook/latex-unicode.html
Errore: LaTeX failed to compile Homework-assignment.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Homework-assignment.log for more info.
Esecuzione interrotta
Guest *tomhanna* @ 2021-11-09 18:48:55 originally posted:
Malwarebytes is flagging the file gswxlua.exe as malware, as of today's scan. I have quarantined the file. How important is this file to the overall operation? Any plans to update it to eliminate whatever causes the malware concern?
Sorry, but I can't do anything about it. This file is from TeX Live, and you may contact them via the mailing list: https://www.tug.org/texlive/contribute.html
Originally posted on 2021-11-09 22:41:31
访客 *Xingyu Chen* @ 2021-12-08 17:43:26 写道:
hi, when I want to knit rmd to pdf, i meet this error, i have searched from Google, but didn't find useful solutions. Could you please help me ?
! LaTeX Error: Unicode character 绋?(U+7A0B)
not set up for use with LaTeX.
错误: LaTeX failed to compile econometrics-hw3.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See econometrics-hw3.log for more info.
此外: Warning message:
In grepl("==> Fatal error occurred", x[i], fixed = TRUE) :
输入的字符串1不适用于此语言环境
停止执行
Guest *Federico Stragliotto* @ 2021-12-21 16:11:05 originally posted:
Hi, i have this problem when i try to knit a document in pdf
Messaggio di avvertimento:
In system(paste0("rmarkdown::render "", input, """)) :
'rmarkdown::render' not found
Please install the latest version of RStudio: rstudio/rmarkdown#1990
Originally posted on 2021-12-22 15:58:29
访客 *Cin Chi* @ 2022-01-13 22:40:11 写道:
Hi, I have a problem when i try to knit a rmd. file in pdf.
But it says: ! sh: pdflatex: command not found.
And when I try second time, it says ! LaTeX Error: Unicode character 一 (U+4E00)
not set up for use with LaTeX.
访客 *郭玫均* @ 2022-02-20 16:42:41 写道:
Hello~ I have this problem when i try to knit a document in pdf.
! LaTeX Error: Unicode character éƒ (U+90ED)
not set up for use with LaTeX.
Guest *Dawn Nekorchuk* @ 2022-04-13 21:24:50 originally posted:
Is there anyway in R code / within my rmd to check if I have a too-old version of TeX Live so I can on the fly reinstall tinytex? Anyone know? Thanks!
Unfortunately I don't think there is a robust solution to this problem. The complication comes from the large number of CTAN mirrors. Every year in early April when a new version of TeX Live is released, this problem will arise because it takes time (one or a few more days) for mirrors to be synced up. The mirror that you are currently using may or may not have gotten the latest version of TeX Live yet.
Back to your question, tinytex::tlmgr_update() should automatically detect if you have a too old version of TeX Live and emit a message if you do: https://github.com/yihui/tinytex/blob/c3a71c7/R/tlmgr.R#L223-L231 The message also tells you that you may have to wait for some time before you can tinytex::reinstall_tinytex().
Originally posted on 2022-04-14 03:54:02
Guest *Dawn Nekorchuk* @ 2022-04-18 16:42:07 originally posted:
Okay, thank you! Knowing it is in April was a big help. I've written a one-line tinytex reinstall script in R that I'll instruct my users to run every year as part of their set-up for the next season (which is after April). Close enough to automatic.
Guest *mukesh choudhary* @ 2022-07-08 16:46:56 originally posted:
Hi
I am able to knit the PDF for half of my analysis. It does not proceed after half part of the script and throws the error as
"! Text line contains an invalid character.
l.1390 ## ^^[
[0;34mWald tests for fixed effects.^^[[0m
Error: LaTeX failed to compile Mukesh_GBLUP_Results.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Mukesh_GBLUP_Results.log for more info."
Can someone help me how to resolve this issue?
Thanks
Guest *Eric Mai* @ 2022-09-10 22:10:15 originally posted:
I keep trying to render a quarto html and pdf but rstudio tells me: No TeX installation was detected.
But when I enter quarto install tool tinytex then it says it is already installed. When I try to produce a pdf of a different project - I can produce a PDF with no issue. Help!
https://github.com/hdadvisors/chesterfield-market-analysis/tree/quarto-transition
You can report this issue to https://github.com/quarto-dev/quarto-cli/discussions or https://github.com/rstudio/rstudio/issues. I'm not the right person to help with the RStudio IDE issue, since I don't develop the IDE. Thanks!
Originally posted on 2022-09-12 04:21:25
Guest *Eric Mai* @ 2022-09-12 12:47:55 originally posted:
Thanks Yihui! Will do.
When I want to knit pdf file in Rstudio,it always error that:! LaTeX Error: Unicode character 长 (U+957F)
not set up for use with LaTeX.
But all my files are in English, I tried many ways to still have this problem, even after downloading someone else's new rmd file, it's still the same, I also uninstalled and reinstalled R many times. Even reset the computer still has this problem
Hello,
I need to set up an R infrastructure on Windows clients in an internal company network where there is no connection to the Internet. Basically this is not a problem. I have pulled all the R packages to an internal ftp server and changed the config of R so that all packages can only be pulled from this server.
The whole thing should now be extended with the TinyTex tool. Unfortunately I haven't found any info yet how to implement this.
Maybe I have to say that I can't run "normal" installation packages, but everything that is needed is installed on a "naked" machine and the IT department then determines what everything was installed where and then builds a separate MSI package from it, which is made available in the company's internal software center.
The question that arises now is, how can I best map this? As I said, I have the possibility to store reloadable packages on an ftp server.
For the company environment, I'd recommend that you install the full TinyTeX unless you lack the 4Gb disk space: https://yihui.org/en/2022/05/tinytex-full/
With the version, the TinyTex-1 version would probably be enough for me. The question was rather how exactly do I install this on the reference machine so that all packages are then captured and included in the later msi installation?
I don't know how the MSI package is made, but TinyTeX is entirely portable. No matter where you put it on the reference machine, you can use it. You may see https://yihui.org/en/2018/08/tinytex-flash-drive/ for more info.
Greetings, Yihui. I am encountering several issues but I think they are part of the same problem. I am running Ubuntu 22.04 and I originally installed texlive-full through the command line for use with TexStudio as I do all of my article writing there. However, I'd like to use RMarkdown for managing my CV so I installed tinytex using install.packages('tinytex'). The main issue I am dealing with now, which I believe started with the update to R 4.3.2, is that my awesome-cv is causing an error when I try to include a bibtex file. All the rest of my CV entries (education, certifications, experience) compile with no issues but when I add a block with bibliography_entries("input-docs/My-Pubs.bib") I get a rather generic error message saying ! LaTeX Error: Something's wrong--perhaps a missing \item. In the awesome-cv.cls I cannot find the specific code that deals with the bibliography and there is only one section (\newenvironment{cvitems}, line 697) that uses begin{itemize} where I would expect \item to be used.
Going through your debugging steps, I think the issue is where RStudio is looking for tinytex. When I run tinytex::tinytex_root() I get an error message Error in root_dir(normalizePath(path), "..", "..", "..") : /usr/share/texlive does not seem to be the root directory of TeX Live (no "bin/" dir under it). Prior to the R update when my CV was compiling perfectly, I had tinytex in ~/R/x86_64-pc-linux-gnu-library/4.3 along with ~/.TinyTeX (this second file is empty). This error also comes up when I use tinytex::uninstall_tinytex() so I am not able to reinstall it. Do you have any solutions to this problem?
Thanks,
Jeremy
Hi Jeremy, I don't know the cause of the LaTeX error, but it seems you don't really have TinyTeX installed. You said ~/.TinyTeX was empty, so uninstall_tinytex() won't work (there is nothing to uninstall). If you want to use TinyTeX, you need to install it first: tinytex::install_tinytex().
Thanks, but that hasn't quite solved my problem. I ran tinytex::install_tinytex(dir = "~/TinyTex") (which was not an existing folder) and before running it gave me a message that there was already a tlmgr folder found because I had installed texlive through the terminal before using it in RStudio. However, RStudio is still not recognising the correct path to TinyTex since when I run tinytex::uninstall_tinytex() I get the same error as before, that the root_dir is wrong. How can I set the tinytex path to ~/TinyTex or ~/bin, which was created with the tinytex installation and contains the tlmgr link?
I also get a similar error when trying to run tinytex::tlmgr_update(). It says that directory /var/lib/texmf/web2c is not writable (I assume this is where my TeXStudio is linked) even after I ran tinytex::tlmgr_install()
On Linux, TinyTeX should make symlinks from its installation directory (no matter where it is) to ~/bin. As long as ~/bin is in your PATH variable, both the tinytex R package and RStudio should find it. You can check Sys.getenv('PATH') in R or echo $PATH in your terminal.
If ~/bin is not in your PATH (normally it should be), you could symlink TinyTeX's executables to a directory in PATH, such as /usr/local/bin (this one is almost guaranteed to be present in PATH), but I don't quite recommend this approach unless you apt remove texlive-full from your system, otherwise you may have conflicts between TinyTeX and TeX Live.
cd ~/TinyTeX/bin/* # assuming you installed TinyTeX to ~/TinyTeX; the default is ~/.TinyTeX
./tlmgr path remove # in case symlinks have been made
./tlmgr option sys_bin /usr/local/bin
sudo ./tlmgr path addWell then I'm not sure what the issue is. As you can see from the output below, ~/bin is the second directory in Sys.getenv('PATH') but when I run tinytex::uninstall_tinytex() right after, I get the root_dir error again.
> Sys.getenv('PATH')
[1] "/usr/bin:/home/jeremy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/usr/lib/rstudio/resources/app/bin/quarto/bin:/usr/lib/rstudio/resources/app/bin/postback"
> tinytex::uninstall_tinytex()
Error in root_dir(normalizePath(path), "..", "..", "..") :
/usr/share/texlive does not seem to be the root directory of TeX Live (no "bin/" dir under it)
Not sure if you have any suggestions other than removing both texlive-full and any tinytex-related folders and then reinstalling. If I do go that route, do you have a suggested order of installing? Should I do tinytex first and then try to link my TeXStudio?
Thanks for your help
Sorry, that code block didn't come out properly
Do you actually have any symlinks under ~/bin? If you installed TinyTeX successfully, there should be several symlinks under ~/bin.
You can install texlive-full and TinyTeX simultaneously, although it shouldn't be necessary. ~/bin has quite high precedence in PATH, so TinyTeX should be chosen when texlive-full is also installed.
Yep. It seems that folder is fully populated, there are a total of 58 files in there, including the links for latex, lualatex, pdflatex, and tlmgr. I tried to link my TexStudio to those symlinks (they were linked to symlinks in the /usr/bin/ folder) but it failed to compile a document since it was not able to find all the packages installed with texlive-full (I originally installed this with sudo apt install texlive-full). Is there a way that I can force TinyTex to link to the /usr/bin/ folder instead to see if that solves my problem?
The strange thing about the error message I'm getting is that the directory /usr/share/texlive that it is trying to find the bin/ folder in doesn't even show up in the list of Sys.getenv('PATH')
Is there a way that I can force TinyTex to link to the
/usr/bin/folder instead to see if that solves my problem?
Yes, I have told you how to do it in a previous reply: https://github.com/yihui/yihui.org/discussions/1358#discussioncomment-7777546
Yes, you did provide a solution but you recommended against it unless I uninstalled texlive. However, if I uninstall texlive, then wouldn't the symlinks in the /usr/bin/ folder be removed? So there wouldn't be any reason to try to link tinytex to that folder?
I appreciate the help and suggestions but there seems to be a major conflict on my machine between texlive and tinytex and since I do all of my writing in TexStudio, I will probably abandon the tinytex for now. I was really only interested in the programmatic CV aspect but I'm not even able to Knit the awesome-cv template right now.
After looking at your PATH variable agin, I think I understand the situation now:
/usr/bin:/home/jeremy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:...
I don't know why /usr/bin appeared twice in your PATH (it's probably a problem of RStudio IDE). I don't have Ubuntu on my computer to test with, but I think texlive-full's symlinks are made to /usr/bin, which has higher precedence over ~/bin. Therefore tinytex cannot find TinyTeX (it detects texlive-full first).
For now, you can adjust your PATH via:
Sys.setenv(PATH = gsub('^/usr/bin:', '', Sys.getenv('PATH')))In the mean time, I'll see if I can improve the detection of TinyTeX in the tinytex package.
Another solution is to uninstall texlive-full. I'm reasonably sure TinyTeX alone can work well for you. You don't need both, and Ubuntu's texlive package is often too old and hard to update (which is one of the reasons why we created TinyTeX).
Update: Actually if you don't change the default installation path of TinyTeX (~/.TinyTeX), it should be correctly detected, too. No need to tweak PATH or uninstall texlive.
I use TinyTeX now but have used BasicTeX in the past, installing it with brew and adding packages with tlmgr. Just out of curiosity, do the caveats you mention in https://yihui.org/tinytex/faq/#faq-15 also apply to BasicTeX brew setups?
The first caveat may not apply. I think BasicTex manages its own PATH: https://github.com/Homebrew/homebrew-cask/blob/30c5b09cf49e884848c65ce96dcdcda288c28fa1/Casks/b/basictex.rb#L30 It probably doesn't write symlinks to /usr/local/bin. I have never tested it so I'm not entirely sure.
The second caveat depends on where tlmgr install installs packages for BasicTeX., which I don't know. If packages are installed to a place that Homebrew doesn't clean up, they may survive the update.
Thanks! I'm going to take a look to see what it actually does.
I'm having trouble with tinytex/tlmgr under Windows 10. Working from RStudio, your code
tinytex::tlmgr_update()
tlmgr update --all --self
runs without comment but
tinytex:::install_yihui_pkgs()
will list a bunch of LaTex packages but then quits with
tlmgr.pl: The TeX Live versions supported by the repository
https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/2021/tlnet-final
(2016--2021)
do not include the version of the local installation
(2023).
I'm not sure where to go next but the upshot is that I'm unable to use tlmgr to add any packages. My particular case now is trying to add a new presentation theme for beamer that is not in the 'included' list. Any advice would be welcome.
That problem might be transient. If you retry and it still doesn't work, you can try to set a different CTAN repository via tinytex::tlmgr_repo().
Thanks. This is an ongoing issue for me. Til now I've just worked around it. I'll try a different repository and report back.
I switch to U of Utah's repository, and things seem to work now. Thanks for the suggestion!
could i use it with pandoc as a pdf_engine
Yes. Anything that works with TeX Live should work with TinyTeX, too.
Sign in to join the discussion
Sign in with GitHub