72 Comments
公司服务器没有互联网链接,最近两天鼓捣了会TexLive,想看看怎么才能弄一个离线的Repo。然后,我发现真是太乱了…真看不懂…
这个你可以早一点问我,就不必浪费这个时间了。其实我已经把 TeX Live 全集都打包好了,只不过我还没昭告天下而已(因为我还没确定最终把这些超级大包存在哪里,是放我个人 Github 账号里还是转移到公司账号下)。全集是 TinyTeX-2:https://github.com/yihui/tinytex-releases/releases/tag/daily
通过 R 安装:
tinytex:::install_prebuilt('TinyTeX-2')或者通过脚本安装皆可:https://yihui.org/tinytex/#installation 设置环境变量 TINYTEX_INSTALLER=TinyTeX-2。
当然,你也可以直接下载文件,解压缩到合适的位置。
这个精简版的全集体积比官方应该是能小一半的。装它之后就不必再担心缺包了。
本以为这个需求能很快找到答案,我还是低估了LaTeX的复杂程度!太赞了,我马上试试,谢谢!
嗯,架设一个可以离线使用的仓库估计是会有点复杂,但打包所有的 LaTeX 包就简单多了。既然架设库的主要目的是为了装缺失的包,那还不如就整锅端下来后一劳永逸了。
是的。其实我本来就是想全装,但tlmgr install scheme-full 在最后一步老是报错,原因不详,已放弃。现在直接一步到位,非常开心,正合我意。
嗯,是的,这个命令确实是有出错的可能,我也一样读不懂错误消息、不明白原因。比如在 AppVeyor 平台上的 macOS 系统就会出错,我直接加个 || true 给暴力忽略了错误:https://github.com/yihui/tinytex-releases/blob/4149573c79eae0d0d722218e0420d799f2c76cc1/appveyor.yml#L96 我试过在 Github Actions 的三大操作系统上运行也会出错,同样原因不详,所以现在我依然在用 AppVeyor 打包。
您好,我现在正在做一个仿真软件(mmCEsim)可以自动导出并编译 LaTeX 报告,仅在软件安装包里给用户提供 minimal 的 packages。我想是不是可以直接利用您在 tools 里的代码配合上 GitHub Actions 直接进行 build 呢?不确定是不是修改 tools/pkgs-custom.txt 还是 tools/pkgs-yihui.txt,再调整对应的 build.yml 内容即可实现 :-)
@Teddy-van-Jerry 是的,不过更简单的办法是你先安装 TinyTeX-0,在此基础上再用 tlmgr install 添加你需要的其它包,最后将 TinyTeX 文件夹打包发行。当然,用你说的办法从头编译也是可以的,只是稍微啰嗦一点。
哦哦明白啦,非常感谢!
Guest *Owe Jessen* @ 2017-12-16 13:43:29 originally posted:
Thanks for the works. I got it to install on a windows machine without problems. Where I ran into problems was installing it in Linux on Windows (WSL).
it reports back with warning:
In tinytex::install_tinytex() :
TinyTeX was not successfully installed or configured.
Tried it as a user or with sudo ... to install system-wide.
See footnote 2 above. It seems ~/bin is not on your PATH variable.
You should not use sudo unless you are a system admin and install TinyTeX for other users in the system.
Originally posted on 2017-12-16 15:13:09
Guest *Roberto Salas* @ 2017-12-27 02:13:45 originally posted:
thank you so much Yihui, the package works flawlessly.
Guest *Rihuan Huang* @ 2018-01-07 00:36:23 originally posted:
Thanks so much for your work!! I installed it and everything worked fine until I needed a package called "pifont". It reported as:
tlmgr install pifont
tlmgr install: package pifont not present in repository.
tlmgr: action install returned an error; continuing.
tlmgr: package repository http://ctan.math.washington.edu/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable)
tlmgr: An error has occurred. See above messages. Exiting.
I am not really a TeX expert, so I wonder if there is an other way to install this package.
How did you use TinyTeX? Are you compiling a LaTeX document or an R Markdown document? If the latter, all you need is
devtools::install_github(c('yihui/tinytex', 'rstudio/rmarkdown'))
If the former, you need to figure out the actual LaTeX package name:
$ tlmgr search --global --file pifont
tlmgr: package repository http://mirror.utexas.edu/ctan/systems/texlive/tlnet (verified)
psnfss:
texmf-dist/tex/latex/psnfss/pifont.sty
tex4ht:
texmf-dist/tex/generic/tex4ht/pifont.4ht
ucs:
texmf-dist/doc/latex/ucs/config/pifont.ucf
And psnfss seems to be what you actually need.
Originally posted on 2018-01-07 02:49:39
Guest *Enrico Spinielli* @ 2018-01-24 16:08:22 originally posted:
The installation script did not work for me due to authenticated proxies not being automatically considered/found.
What I did was to manually download all the relevant files, move them in the %TEMP% directory, comment out all the download lines in the installation script before running it.
Guest *U UlvHare* @ 2018-02-28 17:28:29 originally posted:
Dear Yihui, thank you very much for your work!
It's a great idea, but when I tried to install TinyTex to /usr/local/tinytex from R:
install_tinytex(dir="/usr/local/tinytex")
everything installs succesfully to... $HOME/.Tinytex and $HOME/bin
But prints "TinyTeX installed to /usr/local/tinytex", then:
In file.rename(target, user_dir) :
cannot rename '/home/alver/.TinyTeX' to '/usr/local/tinytex' because of 'Invalid cross-device link'
Thanks for the feedback! I can surely fix this issue. May I ask why you wanted to install it to /usr/local/? Unless you were trying to install it for multiple users on the same Linux server, there is no benefit of installing TinyTeX to /usr/local/ as far as I can see.
Originally posted on 2018-03-02 14:58:55
Guest *U UlvHare* @ 2018-03-02 15:45:37 originally posted:
Hi, Yihui, thanks for answer!
The reason to install TinyTex to /usr/local/ is simple: it's on SSD, while /home is on big but slow HDD. I've tested vanilla TexLive on both and from SSD it works sensibly faster.
I see. That makes perfect sense! I'll fix it in the R package tinytex. In the meantime, I think you can use the mv command to move the directory, e.g.,
mv ~/.TinyTeX /usr/local/tinytex
Or wrap it in R: system('mv ~/.TinyTeX /usr/local/tinytex')
Then you need to run
/usr/local/tinytex/bin/*/tlmgr path add
Originally posted on 2018-03-02 16:14:02
Guest *U UlvHare* @ 2018-03-02 17:27:24 originally posted:
Ok, thank you!
Guest *Judy Lewis* @ 2018-03-05 18:54:03 originally posted:
Yihui, can you help? I am stumped. I installed tinytex and am now unable to generate pdf reports from Shiny/Rmarkdown. The error I consistently see is pasted below. Any ideas? Thank you so much! Judy Lewis
"C:/Users/lewisjt4/AppData/Local/Pandoc/pandoc" +RTS -K512m -RTS reportPDF.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pandoc14c46ff645e9.tex --template "C:Userslewisjt4DocumentsRwin-library3.4rmarkdownrmdlatexdefault-1.17.0.2.tex" --highlight-style tango --latex-engine pdflatex --variable graphics=yes --variable "geometry:margin=1in"
Warning: running command '"pdflatex" -halt-on-error -interaction=batchmode "file14c49df4426.tex"' had status 1
Warning: Error in : Failed to compile file14c49df4426.tex.
Stack trace (innermost first):
58: show_latex_error
57: on_error
56: system2_quiet
55: run_engine
54: latexmk_emu
53: tinytex::latexmk
52: latexmk
51: rmarkdown::render
50: download$func [downloadReports.R#158]
1: runApp
Error : Failed to compile file14c49df4426.tex.
Did you restart RStudio after installing tinytex? If you did, could you follow the instructions at rstudio/bookdown#536 (comment) and report the detailed error message? Thanks!
Originally posted on 2018-03-05 19:16:16
Guest *Danny Swan* @ 2018-03-13 21:11:31 originally posted:
Hi Yihui,
As far as I can tell the auto-installation of new LaTeX packages doesn't work properly when knitting an .Rnw from RStudio. So, for instance, I had several computers that I needed to configure tinytex on, and I have a paper that is complete that I was trying to knit in RStudio to make sure that I had all of my packages installed. On the first computer, I ended up doing the tinytex::tlmgr_search() and tinytex::tlmgr_update() routine iteratively in a process that took up ~30 mins, in part because it seems like tinytex by default doesn't install packages that are dependencies for packages you are installing. On the second computer, I ran pdflatex() on the .tex file produced by the RStudio knitting process and it much more quickly found and installed the required packages. This is kind of implied by the paragraph where you say "To compile a LaTeX document to PDF, call one of these functions (depending on the LaTeX engine you want to use) in tinytex: pdflatex(), xelatex(), and lualatex(). " but is a little confusing because of the previous sentence that says "To compile an R Markdown document to PDF, there is nothing else you have to know."
I'm writing all of this not because I am looking for you to fix this, but I would like to effectively share my experiences with other users of the package trying to switch from MikTeX + RStudio (at least in Windows) that habitually use a lot of LaTeX packages not automatically installed by tinytex::install_tinytex(). I know that I can offer edits as a fork on Github via the provided "Edit this page" link, but I am not sure if it would be better to offer an edit to the "for R users" section as a small addendum or as an edit to the FAQ. Thoughts?
The automatic installation of missing LaTeX packages currently only works for R Markdown documents. Rnw is not R Markdown. If you need that feature to work for Rnw documents, you have to call knitr::knit2pdf() manually to compile the Rnw document. Or wait for RStudio to support it: rstudio/tinytex#10
Originally posted on 2018-03-14 14:27:36
Guest *Danny Swan* @ 2018-03-14 14:39:12 originally posted:
Aha! Thanks for the clarification. As per usual, the mistake was my own confusion. Hopefully anyone who comes after me with the same confusion will read this thread!
EDIT: Or just bother to read the 4 posted issues on the repo. Whoops!
Thanks! Your feedback was definitely very helpful!
Originally posted on 2018-03-14 14:56:42
Guest *vt8235* @ 2018-03-19 16:30:32 originally posted:
I do not know what I am doing wrong. I hit the .bat file and it start to execute the steps but it pulls the whole TeXLive from what I see in the prompt. it killed me watching how thousands of packages were pulled just with letter "a". Any idea? Requires the custom edit of some file?
No, the batch file should be fully automated and does not require any edits. It should not pull the whole TeX Live, though. It should only install less than 70 LaTeX packages by default. If you are an R user, I recommend you to use the R function to install TinyTeX.
Originally posted on 2018-03-19 19:35:33
Guest *vt8235* @ 2018-03-22 17:38:52 originally posted:
It does not work. It stopped by cutwin [310K], checksums differ, downloading did not succeed, installation failed , plus downloading from a mirror "not verified" were the highlights. Is there no other way around installing and trimming the huge TexLive post-install to a bare minimum?
You mean the R function tinytex::install_tinytex() didn't work?
There might be something wrong with your internet connection. I'm not sure. You can read the source code and go through these steps manually if the automated script doesn't work for you: https://github.com/yihui/tinytex/blob/master/tools/install-windows.bat
Originally posted on 2018-03-22 18:43:37
Guest *Vin* @ 2018-03-24 17:56:51 originally posted:
Hello Yihui,
First I really want to thank you for your hard work! Unfortunately it doesn't work for me :(
Am I doing anything wrong ?
Windows 10 / RStudio
I uninstalled MiKTeX first then installed the package successfully with:
install.packages(c('tinytex', 'rmarkdown'))
tinytex::install_tinytex()
But then when I try to knit a .Rmd document to pdf in Rstudio, I get this error message:
output file: report.knit.md
Error: Failed to compile report.tex.
In addition: Warning message:
running command '"pdflatex" -halt-on-error -interaction=batchmode "report.tex"' had status 127
Execution halted
No TeX installation detected (TeX is required to create PDF output). You should install a recommended TeX distribution for your platform:
Thanks a lot !
Did you restart RStudio? What does Sys.which('pdflatex') return in R? You can ignore the message "No TeX installation detected" if it does not return an empty string.
Originally posted on 2018-03-26 20:40:07
Guest *Vin* @ 2018-03-30 16:16:01 originally posted:
Thank you for your answer.
Yes I already tried to restart RStudio and I still have the same messages.
Sys.which('pdflatex') return this :
Sys.which('pdflatex')
pdflatex
""
Is having no path here the problem ?
Thanks for your help :)
Right. pdflatex is not on PATH. What does Sys.getenv("PATH") return? And tinytex:::texlive_root()? Does the directory tinytex:::win_app_dir('TinyTeX') exist?
Originally posted on 2018-03-30 18:36:48
Guest *Vin* @ 2018-04-05 22:02:12 originally posted:
Thanks for the answer and sorry to answer only now :)
Sys.getenv("PATH") return this:
[1] "C:ProgsRR-3.4.4binx64;C:ProgramDataOracleJavajavapath;C:Program Files (x86)NVIDIA CorporationPhysXCommon;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program Files (x86)ATI TechnologiesATI.ACECore-Static;C:Program Files (x86)NVIDIA CorporationPhysXCommon;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program Files (x86)ATI TechnologiesATI.ACECore-Static;C:ProgsSkypePhone;C:UsersvinceAppDataLocalMicrosoftWindowsApps;C:UsersvinceAppDataLocalMicrosoftWindowsApps"
tinytex:::texlive_root() return this:
[1] ""
tinytex:::win_app_dir('TinyTeX') return this:
[1] "C:UsersvinceAppDataRoaming/TinyTeX"
Do you have any idea on what the problem could be ?
Can you check if the directory exists?
dir.exists("C:UsersvinceAppDataRoamingTinyTeX")
And can you run
system2("C:UsersvinceAppDataRoamingTinyTeXbinwin32tlmgr", c("path", "add"))
?
Originally posted on 2018-04-05 22:15:33
Guest *Vin* @ 2018-04-06 13:46:09 originally posted:
Hello,
Here are the results:
dir.exists("C:UsersvinceAppDataRoamingTinyTeX")
[1] FALSE
system2("C:UsersvinceAppDataRoamingTinyTeXbinwin32tlmgr", c("path", "add"))
Warning message:
running command '"C:UsersvinceAppDataRoamingTinyTeXbinwin32tlmgr" path add' had status 127
That means installing TinyTeX failed. Could you retry tinytex::install_tinytex() and let me know the full output in the console?
Originally posted on 2018-04-06 13:57:44
Guest *Vin* @ 2018-05-05 13:27:22 originally posted:
Sorry for the delay,
You were right and reinstalling TinyTex worked and it's not working perfectly fine! I don't have the full output because I had to restart Rstudio at some point and lost it, I hope that's okay. I don't believe there were any error message during the installation.
Thank you so much for your help!
Guest *Hengni Cai* @ 2018-03-28 18:48:17 originally posted:
Hi Yihui,
We build internal debian packages which depend on knitr. In the latest version of knitr.1.20, knitr::knit2pdf uses tinytex::latexmk to replace tools::texi2pdf. However, r-cran-tinytex is not available, so it causes problems in our debian packages. Do you think it is possible to release r-cran-tinytex soon? Thanks a lot.
Correct me if I'm wrong, but I guess you don't have to wait for the Debain package r-cran-tinytex, since tinytex is a pure R package, and easy to install with install.packages('tinytex') in R.
Originally posted on 2018-03-28 22:09:38
Guest *Hengni Cai* @ 2018-03-29 12:46:13 originally posted:
Thanks for your quick reply.
We have this additional build step on top which generates a fat debian (not too dissimilar to packrat but using debians), and this particular application which uses knit2pdf uses TinyTex. We can make sure texLive is a dependency, but we can't see any way to make sure that tinytex is a dependency.
We could build the debian package but it doesn't actually help us, because it seems like it would have to install the actual tex files (TinyTeX) which is not part of the r-package (tinytex). It seems to me that the r-package only installs files which you can then use to install the tex application from the command line. So it's not self-contained.
What we could do is to package up the TinyTex applications in a debian too, but then we'd be chasing this for every update...
The use case which is not clear to me is a situation where you automatically build servers and automatically install r-applications on them, how would tinytex work in that situation.
Thank you very much for your help.
The R package tinytex does not require TinyTeX (the TeX Live distribution I made): https://yihui.name/tinytex/r/ knitr::knit2pdf() works with any LaTeX distributions.
I imagine you would have to do apt-get install r-cran-knitr somewhere. If you do that, I don't see a reason why you cannot do Rscript -e "install.packages('tinytex')".
I don't know who builds the r-cran-knitr package on Debian, but you could request them to build r-cran-tinytex too. Actually the next version of rmarkdown will depend on tinytex, so hopefully you will be able to install r-cran-tinytex in a couple of months (at the moment, I don't have a plan to release the next version of rmarkdown to CRAN yet). Actually r-cran-tinytex seems to be available on Debian: https://packages.debian.org/source/sid/r-cran-tinytex
Originally posted on 2018-03-29 14:55:50
Guest *Jose De Jesus Filho* @ 2018-04-20 15:32:19 originally posted:
I am using RStudio. I am getting the following error:
! Package babel Error: Unknown option `portuguese'. Either you misspelled it
(babel) or the language definition file portuguese.ldf was not f
ound.
I tried to install portuguese.ldf with no success.
Guest *Peter Meissner* @ 2018-10-24 18:40:52 originally posted:
This is some months old but maybe it helps others coming her looking for a solution:
Typeing the following into your console will list all babel packages:
tlmgr info --data name | grep 'babel-'
Than for portugese type the following into your console:
tlmgr install babel-german
Guest *Liam Huang* @ 2018-05-03 12:48:08 originally posted:
Oh, you naughty boy.
Guest *Stefan Lindow* @ 2018-05-10 07:02:55 originally posted:
Install on MacOS High Sierra with RStudio 1.1383 is cancelled with the following message:
add_link_dir_dir: destination /usr/local/bin not writable, no links from /Users/administrator/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.
Fehler: Failed to install TinyTeX
help! =)
Originally posted on 2018-05-10 13:44:04
Guest *Huabin Wu* @ 2018-05-20 03:47:38 originally posted:
Hi. Thanks for this great package.
I am using LyX. It seems the package 'fourier' simply does not work. LyX gives the error message:
The external program
xelatex
finished with an error. It is recommended you fix the cause of the external program's error (check the logs).
And the log file says:
xdvipdfmx:fatal: Could not find encoding file "8r.enc".
Google tells me 8r.enc should come with psnfss. I've tried to reinstall psnfss, fourier, utopia. Still not working.
Help please! Thanks a lot.
Guest *Huabin Wu* @ 2018-05-22 02:31:32 originally posted:
Hi. Tried 'tlmgr install dvips' and problem solved! Anyway, thanks.
Guest *Douglas Jones* @ 2018-05-29 20:51:13 originally posted:
Thanks so much for all your great contributions!
I've restarted RStudio, etc, but I keep getting the error:
! Package inputenc Error: Unicode character œ (U+9C)
(inputenc) not set up for use with LaTeX.
Any ideas?
Without a minimal reproducible example, a blind guess is you need to use xelatex instead of pdflatex (perhaps with proper font settings). This is not an issue that TinyTeX can automatically solve.
Originally posted on 2018-05-29 23:00:31
Guest *Brenton* @ 2018-06-01 10:48:19 originally posted:
To add a little more information, try adding:
output:
pdf_document:
latex_engine: xelatex
to your RMarkdown document's YAML header. That tells RMarkdown (and therefore TinyTeX) which engine to use. The default, pdflatex, doesn't support Unicode.
Guest *Peter Smith* @ 2018-06-13 23:04:07 originally posted:
Well that was journey. Here are some notes for anyone else trying to get this excellent looking package to work under FreeBSD 11.1
First, deinstalling texlive-full (the FreeBSD package) leaves traces all over the system. It's messy to find the bits. In the end I had to search the .TinyTex tree and delete anything on the rest of the system that matched names (crude but effective).
Secondly, during installation I got a number of errors, e.g.,
fmtutil: running `xetex -ini -jobname=xetex -progname=xetex -etex xetex.ini' ...
Shared object "libfreetype.so.9" not found, required by "xetex"
On this particular installation, l have:
/usr/local/lib/libfreetype.so
/usr/local/lib/libfreetype.so.6
So I cheated and linked libfreetype.so to libfreetype.so.9. That allowed the package to install cleanly.
Finally, to bookdown to compile to a PDF (the whole point of the exercise)
It took forever for me to figure out I need to do:
tlmgr install biblatex-apa
and then it was easy to do
tlmgr install babal-english
Eventually, I came to believe that tlmgr was my friend.
Thanks for a great package.
Guest *Yongduek Seo* @ 2018-06-30 07:32:59 originally posted:
Is there a way of using Korean letters and produce unbroken PDF through Rmd and tinytex? Bookdown with tinytex works just perfect and I could produce some results in english; Thanks a lot! Now I want to include some korean characters partly in my Rmd files, but the PDF produced does not presents them. Of course, git_book is OK.
Many thanks in advance.
I don't think this problem is specific to any particular LaTeX distribution. It is a general LaTeX problem. I don't know anything about Korean in LaTeX, but I guess you may have to use xelatex as the engine.
Originally posted on 2018-07-01 20:50:54
Guest *Yongduek Seo* @ 2018-07-02 03:12:28 originally posted:
It seems that an additional file needs to be included in a generated tex file from bookdown as well as installation of extra font and style files through tinytex. I will try this and that, and share it later.
Guest *Yongduek Seo* @ 2018-07-02 08:59:54 originally posted:
- I edited manually
_book/bookdown-demo.tex, which was generated via RStudio interface, and included the following:
usepackage{xetexko}
-
$ tlmgr install cjk-ko -
$ xelatex bookdonw-demo
which produced pdf with Korean. -
Following command (with some more sty files) and usepackage{ctex} enabled Chinese too
$ tlmgr install ctex
Q1. Then the question is how to setup bookdown so that the command usepackage{xetexko} may be inserted automatically. It should be somewhere in the bookdown document.
- Just to remark. Using multiple languages (Korean, Chinese, Japanese), which I will eventually have to use all together, seems still not clear in making pdf file. But the bookdown output from RStudio was just OK. Thanks a lot for bookdown again.
Guest *Yongduek Seo* @ 2018-07-02 14:18:59 originally posted:
Short Answer.
Put usepackage{xetexko} in preample.tex in the bookdown project folder.
Necessary packages are installed by tinytex in RStudio automatically.
Interestingly, this one package enabled Chinese and Japanese at the same time with UTF-8 encoding.
Guest *cmd* @ 2018-08-09 17:50:45 originally posted:
Hi there! This looks very cool. I was attempting to fixup some of the missing styles but it was failing on times.sty even when it seemed to work on cmap.sty
On times.sty, it remains not found after installing
(/home/cdiesh/.TinyTeX/texmf-dist/tex/generic/babel/txtbabel.def))))
! LaTeX Error: File `times.sty' not found.
Type X to quit or <return> to proceed,
or enter new name. (Default extension: sty)
Enter file name: x
outdir $ tlmgr search --global --file "/times.sty"
tlmgr: package repository <http://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet> (verified)
psnfss:
texmf-dist/tex/latex/psnfss/times.sty
outdir $ tlmgr install times
tlmgr: package repository <http://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet> (verified)
[1/1, ??:??/??:??] install: times [281k]
running mktexlsr ...
done running mktexlsr.
running updmap-sys ...
done running updmap-sys.
tlmgr: package log updated: /home/cdiesh/.TinyTeX/texmf-var/web2c/tlmgr.log
outdir $ pdflatex file.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex)
restricted write18 enabled.
entering extended mode
(./file.tex
LaTeX2e <2018-04-01> patch level 5
(./sphinxmanual.cls
Document Class: sphinxmanual 2017/03/26 v1.6 Document class (Sphinx manual)
(/home/cdiesh/.TinyTeX/texmf-dist/tex/latex/base/report.cls
Document Class: report 2014/09/29 v1.4h Standard LaTeX document class
(/home/cdiesh/.TinyTeX/texmf-dist/tex/latex/base/size10.clo)))
(/home/cdiesh/.TinyTeX/texmf-dist/tex/latex/base/inputenc.sty)
(/home/cdiesh/.TinyTeX/texmf-dist/tex/latex/cmap/cmap.sty)
(/home/cdiesh/.TinyTeX/texmf-dist/tex/latex/base/fontenc.sty
(/home/cdiesh/.TinyTeX/texmf-dist/tex/latex/base/t1enc.def)<<t1.cmap>>)
(/home/cdiesh/.TinyTeX/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/home/cdiesh/.TinyTeX/texmf-dist/tex/latex/amsmath/amstext.sty
(/home/cdiesh/.TinyTeX/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/home/cdiesh/.TinyTeX/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/home/cdiesh/.TinyTeX/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/home/cdiesh/.TinyTeX/texmf-dist/tex/latex/amsfonts/amssymb.sty
(/home/cdiesh/.TinyTeX/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/home/cdiesh/.TinyTeX/texmf-dist/tex/generic/babel/babel.sty
(/home/cdiesh/.TinyTeX/texmf-dist/tex/generic/babel/switch.def)
(/home/cdiesh/.TinyTeX/texmf-dist/tex/generic/babel/nil.ldf
(/home/cdiesh/.TinyTeX/texmf-dist/tex/generic/babel/babel.def
(/home/cdiesh/.TinyTeX/texmf-dist/tex/generic/babel/txtbabel.def))))
! LaTeX Error: File `times.sty' not found.
Type X to quit or <return> to proceed,
or enter new name. (Default extension: sty)
Enter file name:
This is output from sphinx -b latex being run through pdflatex of TinyTeX
The package name is psnfss.
Originally posted on 2018-08-09 18:01:24
Guest *cmd* @ 2018-08-09 18:18:47 originally posted:
Oh wow! I see now. Thanks so much :)
Guest *Vee* @ 2018-08-14 13:47:41 originally posted:
I have been trying to install TinyTex from the R package tinytex, but I get a lot of warnings and errors, also I cannot compile to PDF. I have checked online for solutions but none are similar to my problems,
trying URL 'https://github.com/yihui/tinytex/raw/master/tools/texlive.profile'
Content length 142 bytes
downloaded 295 bytes
Error in setwd(dir) : character argument expected
In addition: Warning messages:
1: In download.file(url, output, ..., method = method) :
downloaded length 1000370 != reported length 19775481
2: In download.file(url, output, ..., method = method) :
URL 'http://ftp.sun.ac.za/ftp/CTAN/systems/texlive/tlnet/install-tl.zip': status was 'Transferred a partial file'
3: In download.file(url, output, ..., method = method) :
downloaded length 323584 != reported length 19775481
4: In unzip("install-tl.zip") : error 1 in extracting from zip file
There seems to be something wrong with your internet connection. You may retry for a couple of times. If it still fails, please restart your R session and try this:
devtools::install_github('yihui/tinytex')
tinytex:::install_prebuilt()
Originally posted on 2018-08-14 16:46:39
Guest *Vee* @ 2018-08-16 19:41:40 originally posted:
Thank you, it woorked!!!.
Guest *Sharla Gelfand* @ 2018-08-17 15:54:37 originally posted:
I just wanted to share that I have also been having issues with installing tinytex (lots of "cannot contact mirror.ctan.org, returning a backbone server!") and found this comment via rstudio/tinytex#63 and it solved my problem -- thank you so much! i am very happy to have tinytex now :)
Guest *Augusto Ortega* @ 2018-08-17 22:23:11 originally posted:
Hi Yihui,
Thanks for your effort, I love the things I can do with in RStudio thanks to tinytex. I apologize if I didn't look hard enough for an answer to this problem. I'm dealing with knitting pdf documents with long tables using R Markdown and I noticed only when I ask kable to do "full_width = T" I get an error that says "! LaTeX Error: Environment tabu undefined.". If I go with "longtable=T" I get "! LaTeX Error: Environment longtabu undefined." I thought it was a problem of me not having the packages I need but after installing them either on the terminal or with RStudio things don't change. Funny thing when I do "full_width = F" I can knit with no problem looking great (but I have to specify "column_spec()" if I want the table to span the whole width of the page). I'm enjoying working with your code and I was able to workaround this problem so I'm sharing this in case you may have an idea of what's going on. I'm running RStudio on a linux server that has CentOS 7.
Thank you,
Augusto
Guest *Liang Yang* @ 2018-10-25 22:58:38 originally posted:
This is a great package and we are using it to deliver some application to the local government. Unfortunately we got the following error message on shinyapps.io:
Warning: Error in loadNamespace: there is no package called ‘tinytex’
Do we have any alternative for this?
Thanks,
Liang
It is hard to tell what's going on without the full log (which you can obtain on shinyapps.io) or the source of your app.
Originally posted on 2018-10-26 01:22:03
Guest *Liang Yang* @ 2018-10-26 01:38:01 originally posted:
I have pasted the log here. It is a little messy. BTW, everything works fine on my local RStudio Server (on Ubuntu).
2018-10-26T01:34:15.666366+00:00 shinyapps[535307]:
|
|......................................... | 63%
2018-10-26T01:34:15.666900+00:00 shinyapps[535307]: label: nd-chart-1 (with options)
2018-10-26T01:34:15.667098+00:00 shinyapps[535307]: List of 6
2018-10-26T01:34:15.667675+00:00 shinyapps[535307]: $ fig : logi TRUE
2018-10-26T01:34:15.668161+00:00 shinyapps[535307]: $ echo : logi FALSE
2018-10-26T01:34:15.668657+00:00 shinyapps[535307]: $ warning : logi FALSE
2018-10-26T01:34:15.669139+00:00 shinyapps[535307]: $ message : logi FALSE
2018-10-26T01:34:15.669555+00:00 shinyapps[535307]: $ out.width: chr "1.33textwidth"
2018-10-26T01:34:15.669951+00:00 shinyapps[535307]: $ fig.align: chr "left"
2018-10-26T01:34:15.669962+00:00 shinyapps[535307]:
2018-10-26T01:34:15.672703+00:00 shinyapps[535307]:
|
|............................................ | 68%
2018-10-26T01:34:15.672736+00:00 shinyapps[535307]: ordinary text without R code
2018-10-26T01:34:15.672737+00:00 shinyapps[535307]:
2018-10-26T01:34:15.682886+00:00 shinyapps[535307]:
|
|................................................ | 74%
2018-10-26T01:34:15.682890+00:00 shinyapps[535307]: label: dt-prevalence-1 (with options)
2018-10-26T01:34:15.682893+00:00 shinyapps[535307]: List of 4
2018-10-26T01:34:15.682896+00:00 shinyapps[535307]: $ echo : logi FALSE
2018-10-26T01:34:15.682902+00:00 shinyapps[535307]: $ message : logi FALSE
2018-10-26T01:34:15.682904+00:00 shinyapps[535307]: $ out.width: chr "1.2textwidth"
2018-10-26T01:34:15.682899+00:00 shinyapps[535307]: $ warning : logi FALSE
2018-10-26T01:34:15.686481+00:00 shinyapps[535307]: $ echo : logi FALSE
2018-10-26T01:34:15.682907+00:00 shinyapps[535307]:
2018-10-26T01:34:15.685070+00:00 shinyapps[535307]:
|
|................................................... | 79%
2018-10-26T01:34:15.685085+00:00 shinyapps[535307]:
2018-10-26T01:34:15.685081+00:00 shinyapps[535307]: ordinary text without R code
2018-10-26T01:34:15.685247+00:00 shinyapps[535307]:
|
|....................................................... | 84%
2018-10-26T01:34:15.685720+00:00 shinyapps[535307]: label: dt-comparison-1 (with options)
2018-10-26T01:34:15.685917+00:00 shinyapps[535307]: List of 4
2018-10-26T01:34:15.686986+00:00 shinyapps[535307]: $ warning : logi FALSE
2018-10-26T01:34:15.687469+00:00 shinyapps[535307]: $ message : logi FALSE
2018-10-26T01:34:15.687880+00:00 shinyapps[535307]: $ out.width: chr "1.2textwidth"
2018-10-26T01:34:15.687890+00:00 shinyapps[535307]:
2018-10-26T01:34:15.693008+00:00 shinyapps[535307]: ordinary text without R code
2018-10-26T01:34:15.692980+00:00 shinyapps[535307]:
|
|.......................................................... | 89%
2018-10-26T01:34:15.693009+00:00 shinyapps[535307]:
2018-10-26T01:34:15.693156+00:00 shinyapps[535307]:
|
|.............................................................. | 95%
2018-10-26T01:34:15.693629+00:00 shinyapps[535307]: label: dt-timeseries-1 (with options)
2018-10-26T01:34:15.693826+00:00 shinyapps[535307]: List of 4
2018-10-26T01:34:15.694398+00:00 shinyapps[535307]: $ echo : logi FALSE
2018-10-26T01:34:15.694917+00:00 shinyapps[535307]: $ warning : logi FALSE
2018-10-26T01:34:15.695403+00:00 shinyapps[535307]: $ message : logi FALSE
2018-10-26T01:34:15.695824+00:00 shinyapps[535307]: $ out.width: chr "1.2textwidth"
2018-10-26T01:34:15.695835+00:00 shinyapps[535307]:
2018-10-26T01:34:15.700864+00:00 shinyapps[535307]:
|
|.................................................................| 100%
2018-10-26T01:34:15.700875+00:00 shinyapps[535307]: ordinary text without R code
2018-10-26T01:34:15.700880+00:00 shinyapps[535307]:
2018-10-26T01:34:15.701380+00:00 shinyapps[535307]:
2018-10-26T01:34:15.702042+00:00 shinyapps[535307]: output file: report.tex
2018-10-26T01:34:15.702043+00:00 shinyapps[535307]:
2018-10-26T01:34:15.703970+00:00 shinyapps[535307]: Warning: Error in loadNamespace: there is no package called ‘tinytex’
2018-10-26T01:34:15.707568+00:00 shinyapps[535307]: [No stack trace available]
Guest *Liang Yang* @ 2018-10-26 02:00:21 originally posted:
Hi, Yihui
I also verified the sample application on Github and observed the same issue. I also posted the message on your Github (https://gist.github.com/yihui/6091942).
Thanks,
Liang
Okay. I replied at yihui/knitr#1521 (comment)
Originally posted on 2018-10-26 02:42:08
Guest *Mu Yang* @ 2018-11-02 14:00:53 originally posted:
Hi Yihui, I installed the tinytex on my desktop in the office. Due to firewall, tinytex can't download the necessary latex package automatically. Can you please let me know how to add/change proxy for tinytex? Below are the messages
Many thanks,
No connection to the internet.
Unable to download the checksum of the remote TeX Live database,
but found a local copy so using that.
You may want to try specifying an explicit or different CTAN mirror;
see the information and examples for the -repository option at
http://tug.org/texlive/doc/install-tl.html
(or in the output of install-tl --help).
tlmgr.pl: package repository http://ftp.math.purdue.edu/mirrors/ctan.org/systems/texlive/tlnet (not verified: unknown)
[1/4, ??:??/??:??] install: beamer [161k]
TLPDB::_install_package: downloading did not succeed
[2/4, 00:46/03:47] install: ms [6k]
TLPDB::_install_package: downloading did not succeed
[3/4, 01:32/07:19] install: pgf [614k]
TLPDB::_install_package: downloading did not succeed
[4/4, 02:18/02:20] install: xcolor [17k]
TLPDB::_install_package: downloading did not succeed
tlmgr.pl: package log updated: C:/Users/muyang/AppData/Roaming/TinyTeX/texmf-var/web2c/tlmgr.log
Warning: running command '"pdflatex" -halt-on-error -interaction=batchmode "C:UsersmuyangAppDataLocalTempRtmpKErS5Kfile281c7c65524.tex"' had status 1
tlmgr search --file --global "/beamer.cls"
! LaTeX Error: File `beamer.cls' not found.
How do you set the proxy for R?
For TeX Live, you can set the proxy info in ~/.wgetrc: https://www.gnu.org/software/wget/manual/html_node/Proxies.html
Originally posted on 2018-11-05 15:36:45
Guest *Mu Yang* @ 2019-03-15 18:30:06 originally posted:
Hi YiHui,
Thanks for the reply. After 4 months, somehow this problem is solved today after poking a few things around but without knowing exactly why and how. (I was using Miktex during the last 4 months for producing PDF).
Basically I did 2 things: 1. reinstalled basic miktex, and use Miktex console to install the missing latex packages (Miktex has a very easy way of set up proxy in its console). 2.install, uninstall, then reinstall tinytex again,,, 3, run the r-markdown file again... and suddenly TinyTex has the missing packages installed successfully....
I am not a computer science person at all, and with very limited knowledge about system and programming... but I do appreciate that you created Rmarkdown as I managed to create an automated report tool for the team and it's been a standard report that we give to our clients. And due to that, I got promoted last year...
Thanks man,
Very glad to know that, and also congrats on your promotion!
Originally posted on 2019-03-15 19:56:28
Guest *GeoRgi* @ 2018-11-26 07:29:19 originally posted:
Hi Yihui, I install TinyTex and now when trying to knit it returns :
! LaTeX Error: Option clash for package xcolor.
Error: Failed to compile MOOC.tex. See MOOC.log for more info.
Execution halted
I have in r chunk library(kableExtra)- it seems to be the culprit.
I got also another problem, it seems to ignore the custom CSS file, the same report that I executed before with MikTex worked just fine with customisation, now I get it with a default font.
Guest *GeoRgi* @ 2018-11-27 19:28:20 originally posted:
The problem I mentioned above drove me crazy for few days after I finaly found the answer here haozhu233/kableExtra#274
the option echo=FALSE in every r chunk seems to be the solution for that error.
Guest *Aliakbar Akbaritabar* @ 2019-01-19 12:43:31 originally posted:
Dear Yihui,
thank you for all the amazing things you are doing for the R community with *down ecosystem.
I was trying to get rid of an older version of TexLive on Mac and instead install your "tinytex" as described above. Midway I forgot something and when I returned I pushed "knit" to PDF while forgetting I still don't have tinytex installed.
The warning message was like this:
"No TeX installation detected (TeX is required to create PDF output). You should install a recommended TeX distribution for your platform:
Windows: MiKTeX (Complete) - http://miktex.org/2.9/setup
(NOTE: Be sure to download the Complete rather than Basic installation)
Mac OS X: TexLive 2013 (Full) - http://tug.org/mactex/
(NOTE: Download with Safari rather than Chrome strongly recommended)
Linux: Use system package manager"
Since, thanks to you, I have successfully used tinytex on Windows and Mac (on Linux I don't remember if I had this or the package manger latex version), so I would suggest to change the above warning to be based on "tinytex", no?
The warning message has been changed in the newer version of RStudio: rstudio/rstudio#3979 You may try the RStudio Preview version at the moment: https://www.rstudio.com/products/rstudio/download/preview/
Originally posted on 2019-01-19 16:34:59
Guest *Abhijit Sanyal* @ 2019-01-21 23:24:02 originally posted:
Hi Yihui,
Thanks to you for all your hard work. I attended your bookdown talk at the recent RStudio conference and was inspired to learn about bookdown. However I have not been able to execute the minimal example (index.Rmd) in the book. Here are the error messages and other diagnostics: (On a Windows machine). I noticed that xelatex is not in the TinyTex folder but it can be called and installed if required. I have read most of the threads online and have installed and re-installed bookdown and tinytex multiple times using your recommended approach.
I do not have MiKtex installed as per your advice.
Any help would be appreciated. Thanks
Error: Failed to compile bookdown-demo.tex.
In addition: Warning message:
In system2(..., stdout = FALSE, stderr = FALSE) : '"xelatex"' not found
Execution halted
Exited with status 1.
My session Info is as follows:
R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] rmarkdown_1.11.3 tinytex_0.10 bookdown_0.9
loaded via a namespace (and not attached):
[1] compiler_3.5.2 htmltools_0.3.6 tools_3.5.2 yaml_2.2.0 Rcpp_1.0.0 knitr_1.21 xfun_0.4
[8] digest_0.6.18 evaluate_0.12
>tinytex:::is_tinytex()
[1] TRUE
It seems that xelatex cannot be found
Sys.which('xelatex')
xelatex
""
> Sys.getenv("PATH")
[1] "C:Program FilesRR-3.5.2binx64;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program Files (x86)Micro FocusRUMBA;C:Program Files (x86)Micro FocusRUMBASystem;C:Usersjj8aysAppDataLocalMicrosoftWindowsApps;C:Usersjj8aysAppDataLocalProgramsPythonPython37-32;C:Usersjj8aysAppDataLocalProgramsPythonPython37-32Scripts;"
> tinytex:::texlive_root()
Error in get(name, envir = asNamespace(pkg), inherits = FALSE) :
object 'texlive_root' not found
> tinytex:::win_app_dir('TinyTeX')
[1] "C:Usersjj8aysAppDataRoaming/TinyTeX"
dir.exists("C:Usersjj8aysAppDataRoamingTinyTeX")
[1] TRUE
> system2("C:Usersjj8aysAppDataRoamingTinyTeXbinwin32tlmgr", c("path", "add"))
Use of uninitialized value in bitwise or (|) at C:Usersjj8aysAppDataRoamingTinyTeXtexmf-distscriptstexlivetlmgr.pl line 1482.
Did you restart RStudio?
Originally posted on 2019-01-22 00:02:48
Guest *Abhijit Sanyal* @ 2019-01-22 00:11:00 originally posted:
Yes - I did - Ctrl - Shift - F10
That is not enough. I mean you should close RStudio and open it again.
Originally posted on 2019-01-22 03:55:02
Guest *boyoungzheng* @ 2019-02-06 21:20:11 originally posted:
Can anyone transfer this good package to homebrew?
Search for "Homebrew" in the FAQ: https://yihui.name/tinytex/faq/
Originally posted on 2019-02-06 23:11:29
Guest *Andrew* @ 2019-02-14 10:27:27 originally posted:
Hello Yihui, i have an issue when i generate a pdf document. using R markdown having a name with special character e.g schön.pdf. A pdf file is generated with 0 kb but when i change the name to "schlon" it is easily generated.
Don't use the default pdflatex engine. Try xelatex instead: https://bookdown.org/yihui/rmarkdown/pdf-document.html#advanced-customization-1
Originally posted on 2019-02-14 14:39:31
Guest *ANDREW FERNANDES* @ 2019-02-18 05:48:55 originally posted:
Sorry for the late reply, i used the latex_engine : xelatex , but now i get an error -> file name conversion problem -- name too long. I tried reinstalling the rmarkdown package several times but it didnt work.
Guest *ANDREW FERNANDES* @ 2019-02-18 12:33:10 originally posted:
I fixed the error by using latex_engine : lualatex , but now in my pdf document , when I attempt to plot a Light blue bar plot , a purple one is generated instead. When i run the code in the rmd file chunk by chunk the color is light blue. can you shed some light on this ?
Please consider asking such questions on Stack Overflow with a reproducible example.
Originally posted on 2019-02-18 14:51:45
Guest *Na Ye* @ 2019-02-24 05:37:34 originally posted:
@@yihui:disqus , I'm trying to install tinytex, but got the following error message.
tinytex::install_tinytex()
trying URL 'http://mirror.ctan.org/systems/texlive/tlnet/install-tl.zip'
length 24073463 bytes (23.0 MB)
downloaded 23.0 MB
downloaded 0 bytes
Error in download.file(url, output, ..., method = method) :
no function to return from, jumping to top level
In addition: Warning message:
In download.file(url, output, ..., method = method) :
URL 'https://github.com/yihui/tinytex/raw/master/tools/pkgs-custom.txt': status was 'SSL connect error'
Please restart your R session and IDE (if you are using one, such as RStudio or Emacs) and check if tinytex:::is_tinytex() is TRUE.
Is something down or I made some mistakes? Thanks a lot in advance.
If your R version is not the latest, please upgrade to the latest.
Originally posted on 2019-02-25 04:50:42
Guest *joachimr* @ 2019-03-03 14:11:47 originally posted:
Thanks so much for providing this incredibly useful tool! I get the following error message now whenever tinytex is trying to install something:
TeX Live 2018 is frozen forever and will no
longer be updated. This happens in preparation for a new release.
How can I redirect it to the new TeX Live 2019 server?
Thanks for your support!
At the moment, you can just ignore this message. When TeX Live 2019 becomes ready, run tinytex::reinstall_tinytex() to install it.
Originally posted on 2019-03-04 04:31:17
Guest *joachimr* @ 2019-03-04 08:36:40 originally posted:
Thanks - you’re a hero. My work would be so much harder without your contributions.
My pleasure! Thanks for the kind words! :)
Originally posted on 2019-03-04 19:11:57
Guest *joachimr* @ 2019-04-30 17:01:05 originally posted:
Dear Yihui Xie - thanks again for this great service. TeX Live 2019 is now up and running. However, when I try to reinstall tinytex, it still attempts to installt TeX Live 2018
install_tinytex()
tlmgr revision 49885 (2019-01-31 20:27:00 +0100)
tlmgr using installation: /Users/XXXX/Library/TinyTeX
TeX Live (http://tug.org/texlive) version 2018
Automated TeX Live installation using profile: ../tinytex.profile
Loading http://ctan.mirrors.hoobly.com/systems/texlive/tlnet/tlpkg/texlive.tlpdb
Installing TeX Live 2018 from: http://ctan.mirrors.hoobly.com/systems/texlive/tlnet (not verified)
I also deleted my installation and tried a new one, same result.
TeX Live 2019 was just released about 12 hours ago. I guess you have to wait for a couple of days before it is fully propagated to most CTAN mirrors: https://tug.org/pipermail/tex-live/2019-April/043607.html
Originally posted on 2019-04-30 17:28:21
Guest *Rander Ciph* @ 2019-03-08 19:35:47 originally posted:
Hello Yihui, hope your doing fine. I am facing a problem with special characters like "&" and "_" to be passed in a latex environment in order to generate a pdf document using R markdown. I have 2 files , a R file and a Rmd file. i have my data in an excel sheet. The R script and Rmd are as follows
Data
Id company var1 var2 var3
1 Al & Sons 1 65 189
2 John_Doe 3 66 56
3 Al & Sons 1 65 544
4 Al & Sons 2 66 1121
5 John_Doe 2 65 55
6 Jane Doe 2 66 222
7 Jane Doe 3 66 112
8 Jane Doe 3 65 448
9 Jane Doe 2 63 115
R script
comp = "Al & Sons"
pth = "E:/Myexpopath"
render("D:/Myrmdpath/test.rmd", params = list(company = comp , path = pth ), output_file = sprintf('%s/test_rpt__%s.pdf', pth , comp ), encoding = "UTF-8")
Rmd file
classoption: landscape
fontsize: 4pt
output:
pdf_document:
latex_engine: lualatex
fig_height: 2
fig_width: 8
df_print: paged
params:
company: ""
path : ""
tables: yes
company <- params$company
path <- params$path
#load data
dat <- read_excel("comp.xlsx")
header-includes:
- usepackage{url}
- usepackage{fancyhdr}
- usepackage{lipsum}
- pagestyle{fancy}
- fancyhead[C]{
r company} - fancyfoot[R]{
r format(Sys.time(), '%d.%m.%Y')page|thepage} - renewcommand{headrulewidth}{1pt}
- renewcommand{footrulewidth}{1pt}
- usepackage[labelformat=empty]{caption}
- usepackage{courier}
- renewcommand*familydefault{ttdefault}
- usepackage[T1]{fontenc}
knitr::opts_chunk$set(echo = FALSE, comment = "", warning = F)
options(width = 102)
suppressPackageStartupMessages(library(DT))
suppressPackageStartupMessages(library(dplyr))
suppressPackageStartupMessages(library(tidyr))
suppressPackageStartupMessages(library(ggplot2))
suppressPackageStartupMessages(library(gridExtra))
suppressPackageStartupMessages(library(grid))
suppressPackageStartupMessages(library(rmarkdown))
n_count <- filter(dat, company == comp) %>%
summarise(
'Total' = n(),
) %>%
gather(What, count) %>% data.frame
g_var1 <- dat %>%
ggplot(aes(x = var1, y = ..prop.., group = 1)) +
geom_bar(width = 0.4) + xlim(0.5, 4.5)
g_var2 <- dat %>%
ggplot(aes(x = var2, y = ..prop.., group = 1)) +
geom_bar(width = 0.4) + xlim(59, 66)
pagebreak
newpage
fancyhead[R]{Nonsense}
setlength{headsep}{1cm}
knitr:::kable(list(n_count), booktabs = TRUE, linesep =""
,caption = 'Table')
grid.arrange(g_var1, g_var2, ncol = 2,
top = textGrob('plot', gp = gpar(fontsize=16)))
from the above if i pass c = "Al & Sons" and run the R script
it gives me an error
! Missing $ inserted.
$
l.106 newpage
Error: Failed to compile E:/Myexpopath/test_rpt__Al & Sons.tex
Guest *Satyendra Tomar* @ 2019-06-20 22:15:01 originally posted:
Hi Yihui,
First of all, thank you very much for putting your work in making his package, and sharing it with other users.
Trying to save some precious space on my litte SSD, I removed my TexLive installation (~4 GB). Moreover, the 2019 version was expected to take ~6.5 GB. Therefore, I looked for alternatives, and installed this sleek app.
After some easy installations of few packages, I could easily compile my latest beamer presentation. Here are some issues I'd like to share with you, and seek remedy.
(1) As I removed all the traces of TexLive (including TexLive Utility, TexShop, and LatexIt), I can't get tlmgr -gui working. It says perl-tk not found. Is it an issue of really perl, or missing TexLive utility?
(2) Texmaker didn't compile with using "times" package, however, while trying to install "times", TinyTex reports that it is installed, but TexMaker didn't find it! Do you've any idea? This was perfectly compiling with my previous TexLive installation.
(3) tlmgr install didn't find some packages, like "slashbox" and "algorithm". Moreover, it installed "media9" package successfully, but while compiling the tex document, this package searched for another package "ocgbase", which it didn't find.
Could you please help in resolving these issues?
Many thanks in advance.
Bests,
Satyen
Hi Satyen,
-
I believe it is a Perl issue. I don't know anything about Perl or Perl modules, so I don't know how to install the Perl/Tk module.
-
I don't use Texmaker, and I don't know why it cannot find the "times" package. This package is indeed included in the default installation of TinyTeX, so I doubt if Texmaker has correctly found and used TinyTeX. Could it be using a certain leftover TeX Live installation?
-
Please read this web page again. In particular, the section "Maintenance": https://yihui.name/tinytex/#maintenance It seems you didn't understand the relationship between package file names and package names. For example, ocgbase is not a package name, but a filename in the ocgx2 package.
Originally posted on 2019-06-21 03:55:00
Guest *Satyendra Tomar* @ 2019-07-13 08:32:29 originally posted:
Hi Yihui,
Thank you for your prompt reply, and my apologies for a severely delayed response. I was continuously travelling, and occupied in high-priority tasks.
I just wanted to share my workaround with you.
(1) I forgo the GUI option, and continued working using CLI. I could successfully install few needed packages.
(2) There is no leftover from TexLive, but since I couldn't get it to work, and it wasn't necessary either, I removed the usages of this package from my tex file. It's compiling, with only extra width/height for the slides.
(3) Yes, you are right. Afterwards, I installed the parent packages (if I may call that), and successfully used the child files.
Thanks again for this wonderful project.
Bests,
Satyen
Guest *Chris Sutherland* @ 2019-08-13 19:53:41 originally posted:
Its been a year since I compiled some lectures and am about to hand them off to someone. To my surprise, none of the rmarkdown files compiled, and they give this error:
! LaTeX Error: Missing begin{document}.
Error: Failed to compile Doing-Science.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See Doing-Science.log for more info.
Execution halted
Whats wierd is that I get this message even if delete all but the first title of the first slide (i.e., a blank beamer pdf basically). If i try a fresh file, everything works as intended.
I actually done want to use tinytex at all and didn't think i was until i got this tinytex specific error message. Any ideas what is going on?
Sorry, I cannot tell anything without a minimal reproducible example...
Originally posted on 2019-08-13 22:48:29
Guest *Chris Sutherland* @ 2019-08-13 23:27:33 originally posted:
Hi Yihui,
Apologies. The problem appears to be connected to declaring a graphics path. So, I know think this is a general problem rather than a tinytex-specific issue.
For example, the is works:
---
title: "A plea for help"
author: |
| Minimum reproducible example
output: beamer_presentation
---
## A plea for help
Much appreciated
Whereas this does not:
---
title: "A plea for help"
author: |
| Minimum reproducible example
header-includes:
- graphicspath{{"G:/Dropbox/C/Courses class/NRC290b/NRC_290b_2018/Images/Doing/"}, {"C:/Users/csutherland/Dropbox/C/Courses class/NRC290b/NRC_290b_2018/Images/Doing/"}}
output: beamer_presentation
---
## A plea for help
Much appreciated
Okay. Could you do me a favor to ask the question on Stack Overflow? I guess I know the answer but I don't have time to verify it, and I hope someone else could help. This issue has nothing to do with tinytex but Pandoc instead.
Originally posted on 2019-08-14 02:59:19
Guest *Chris Sutherland* @ 2019-08-14 03:09:07 originally posted:
Okay, I will do that, thanks.
Perhaps you could tell me why the error message is related to tinytex even though I use mixtex, and have nothing related to tintex on my computer?
Pandoc generated an invalid .tex document, and tinytex failed to compile it.
Originally posted on 2019-08-14 03:18:30
Guest *JUSTIN OLSON* @ 2019-08-25 15:13:05 originally posted:
thank you so much for this solution. I spend hours trying to install MiKTeX 2.9 on Windows 10 with no success. This solution took 5 minutes and everything is working flawlessly. It should be listed as an install options in the output notes when you try to run knit without the proper pre-reqs.
访客 *Zichang Xu* @ 2019-08-31 06:13:22 写道:
Hi I am using Rstudio and get this error when knitting to PDF.
processing file: R-Module-1-Practice-Problem-Solution.Rmd
|............. | 20%
ordinary text without R code
|.......................... | 40%
label: setup (with options)
List of 1
$ include: logi FALSE
|....................................... | 60%
ordinary text without R code
|.................................................... | 80%
label: unnamed-chunk-1
|.................................................................| 100%
ordinary text without R code
output file: http://R-Module-1-Practice-Problem-Solution.knit.md
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS http://R-Module-1-Practice-Problem-Solution.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output R-Module-1-Practice-Problem-Solution.tex --template "c:RR-3.6.1libraryrmarkdownrmdlatexdefault-1.17.0.2.tex" --highlight-style tango --pdf-engine pdflatex --variable graphics=yes --lua-filter "c:/R/R-3.6.1/library/rmarkdown/rmd/lua/pagebreak.lua" --variable "geometry:margin=1in" --variable "compact-title:yes"
错误: Failed to compile R-Module-1-Practice-Problem-Solution.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips.
此外: Warning messages:
1: In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
'"pdflatex"' not found
2: In system2(...) : '"pdflatex"' not found
停止执行
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
Guest *Zichang Xu* @ 2019-08-31 14:06:09 originally posted:
It works now! Thanks for your effort on this package
Guest *Viveka Kumar* @ 2019-08-31 11:32:25 originally posted:
maketexslr.exe has a virus named IDP.ALEXA.51
It happened when I tried running the batch file install-windows.bat for windows.
Guest *Bruno* @ 2019-09-04 03:15:17 originally posted:
hi, i am new R user and i am having problem when i try to build a .pdf file.
i have this msg:
Sorry, but C: Users Bruno AppData Local Programs MIKTEX ~ 1.9 miktex bin x64 pdflatex.exe did not succeed.
The hopefully log file contains the information to get MiKTeX going again:
C: Users Bruno AppData Local MiKTeX 2.9 miktex log pdflatex.log
Error: Failed to compile answers.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips.
Also: Warning message:
In readLines (log): Incomplete end line found in 'replies.log'
Execution stopped
i have no idea what i have to do. I've already tried to reinstall de R.
Thanks for your help
Try to uninstall MiKTeX and install TinyTeX instead: https://bookdown.org/yihui/rmarkdown/installation.html
Originally posted on 2019-09-04 04:17:53
Guest *ontheball_offthewall* @ 2019-09-08 01:37:20 originally posted:
Hi YiHui,
Great package but I am having the strangest error. All my markdown presentations work fine on rstudio.cloud. When I work local with TinyTex, inserttotalframenumber is not calculated correctly and stuck at 1. So page numbers come out as 1/1,2/1 and so forth. I installed the lastpage package as well as all other packages. Any idea what this could be? Thanks.
Guest *ontheball_offthewall* @ 2019-09-08 02:12:50 originally posted:
Very interesting question here
https://community.rstudio.com/t/slider-number-issues-with-beamer-presentations/38418
Guest *James Kilfiger* @ 2019-10-07 15:58:47 originally posted:
I have an error message on installation:
C:UsersjkAppDataLocalTemp>cd install-tl-*
Can't load 'C:/Users/jk/AppData/Local/Temp/install-tl-20191007/tlpkg/tlperl/site/lib/auto/Win32/API/API.dll' for module Win32::API: load_file:A dynamic link library (DLL) initialization routine failed at C:UsersjkAppDataLocalTempinstall-tl-20191007tlpkgtlperllib/XSLoader.pm line 93.
at C:/Users/jk/AppData/Local/Temp/install-tl-20191007/tlpkg/tlperl/site/lib/Win32/API.pm line 86.
BEGIN failed--compilation aborted at C:/Users/jk/AppData/Local/Temp/install-tl-20191007/tlpkg/tlperl/site/lib/Win32/API.pm line 87.
Compilation failed in require at C:/Users/jk/AppData/Local/Temp/install-tl-20191007/tlpkg/TeXLive/TLWinGoo.pm line 133.
BEGIN failed--compilation aborted at C:/Users/jk/AppData/Local/Temp/install-tl-20191007/tlpkg/TeXLive/TLWinGoo.pm line 148.
Compilation failed in require at C:/Users/jk/AppData/Local/Temp/install-tl-20191007/tlpkg/TeXLive/TLPDB.pm line 102.
BEGIN failed--compilation aborted at C:/Users/jk/AppData/Local/Temp/install-tl-20191007/tlpkg/TeXLive/TLPDB.pm line 102.
Compilation failed in require at C:UsersjkAppDataLocalTempinstall-tl-20191007install-tl line 145.
BEGIN failed--compilation aborted at C:UsersjkAppDataLocalTempinstall-tl-20191007install-tl line 145.
This seems to be deep in the perl, or dll-hell depths of tex-live. I'm hoping that someone can recognise the symptoms here and suggest a quick solution, or identify this as the sort of problem that doesn't disappear quickly or without administrator support.
Guest *Mohammed Atari* @ 2019-10-10 14:01:09 originally posted:
Dear Yihui Xie,
Thank you for developing and maintaining tinytex, it is indeed a very useful package.
I installed tinytex the usual way using the following command:
- install.packages("tinytex")
I then called the library using the following command:
- library(tinytex)
And finally I typed:
- tinytex::install_tinytex()
However, I got the following error message:
trying URL 'http://mirror.ctan.org/systems/texlive/tlnet/install-tl.zip'
length 22534078 bytes (21.5 MB)
downloaded 21.5 MB
downloaded 0 bytes
Error in download.file(url, output, ..., method = method) :
no function to return from, jumping to top level
I would be grateful if you could advise on how to resolve the issue.
Best wishes,Mohammed.
Guest *Roger Koenker* @ 2019-12-11 18:32:01 originally posted:
Bravo Yihui! for yet another wonderful contribution to R and the greater world beyond. Having just for fun installed R on my new Raspberry pi 4, I thought to myself now it would be nice to have latex, but really, all of texlive, probably not, so this was exactly what was needed. It installed for me immediately and "just worked."
That's great to know! Thanks for the kind words, Roger! (this name always reminds me of quantile regression... :)
Originally posted on 2019-12-11 20:37:13
Guest *Daniel Rodríguez* @ 2020-01-14 09:58:39 originally posted:
Hello,
I have been truing to install TinyTex for a lot of hours, but I always get these warning messages:
Warning messages:
1: In download.file(url, output, ..., method = method) :
URL 'http://mirror.ctan.org/systems/texlive/tlnet/install-tl.zip': status was 'Couldn't connect to server'
2: In download.file(url, output, ..., method = method) :
URL 'https://yihui.org/gh/tinytex/tools/pkgs-custom.txt': status was 'Couldn't connect to server'
3: In download.file(url, output, ..., method = method) :
URL 'https://yihui.org/gh/tinytex/tools/tinytex.profile': status was 'Couldn't connect to server'
4: In file.remove("TinyTeX/install-tl.log") :
cannot remove file 'TinyTeX/install-tl.log', reason 'No such file or directory'
Can you give me some advices to complete the install properly?
Thanks in advanced.
Guest *Lucy* @ 2020-03-02 00:01:56 originally posted:
Hi Yihui,
I encountered some problems when I was trying to uninstall the "TinyTex". I installed it by chance--writing this command in my Rmd file: "tinytex::tlmgr_update() # update LaTeX packages", when I was debugging, however, in order to recover the compiled file into the original look, I wanna uninstall it. But when I wrote the commands you recommended for on MacOS, there were three errors popped out:
destination /usr/local/bin not writable, no removal of links done!
destination /usr/local/share/info not writable, no removal of links done!
man symlink destination (/usr/local/share/man) not writable, cannot remove symlinks.
remove of symlinks had 3 error(s), see messages above.
tlmgr: An error has occurred. See above messages. Exiting
By the way, there are TexLive 2019 and TexStudio on my Mac...I had no idea how to fix it. Do you have any suggestion on it? Thanks so much!
Best regards,
Lucy
You can safely ignore the messages like "/usr/local/... not writable". They are harmless. If tinytex:::is_tinytex() doesn't return TRUE, it must have been uninstalled successfully.
Originally posted on 2020-03-03 15:04:38
Guest *armando islas martinez* @ 2020-03-02 02:26:07 originally posted:
please i need help.
I have tried to install tiny tex with tinytex::install_tinytex(),
and this appears:
Cannot open ./TinyTeX/texmf-dist/ls-R to write.
mktexlsr: Done.
running updmap-sys --nohash ...C:UsersNOBLES~1AppDataLocalTempRtmpIhRE4Yinstall-tl-20200301install-tl: updmap-sys --nohash failed (status 53):
failed
re-running mktexlsr ./TinyTeX/texmf-var ./TinyTeX/texmf-config ...
mktexlsr: Updating ./TinyTeX/texmf-var/ls-R...
mktexlsr: Updated ./TinyTeX/texmf-var/ls-R.
Cannot open ./TinyTeX/texmf-config/ls-R to write.
mktexlsr: Done.
pre-generating all format files, be patient...
running fmtutil-sys --no-error-if-no-engine=luahbtex,luajittex,mfluajit --no-strict --all ...C:UsersNOBLES~1AppDataLocalTempRtmpIhRE4Yinstall-tl-20200301install-tl: fmtutil-sys --no-error-if-no-engine=luahbtex,luajittex,mfluajit --no-strict --all failed (status 53):
C:UsersNOBLES~1AppDataLocalTempRtmpIhRE4Yinstall-tl-20200301install-tl: errors in installation reported above
Summary of warnings:
C:UsersNOBLES~1AppDataLocalTempRtmpIhRE4Yinstall-tl-20200301install-tl: updmap-sys --nohash failed (status 53):
C:UsersNOBLES~1AppDataLocalTempRtmpIhRE4Yinstall-tl-20200301install-tl: fmtutil-sys --no-error-if-no-engine=luahbtex,luajittex,mfluajit --no-strict --all failed (status 53):
failed
I have already uninstalled and installed R, and nothing works I hope you help me. Thanks thanks to everyone.
I don't understand these error/warning messages, either, but you may try tinytex:::install_prebuilt().
Originally posted on 2020-03-03 15:05:35
Guest *Vega* @ 2020-04-12 13:31:19 originally posted:
I guess your error is : failed to build: 1 (luahbtex/lualatex).
Guest *Matthew Thomas* @ 2020-04-24 20:28:50 originally posted:
Hi, at the university I work for, we're starting to get some reports of the two hard-coded TinyTeX download links (GitHub hosted) being blocked in China for some reason.
I made a very quick and dirty fix over here for the students reporting issues:
github.com/MattWThomas/tinytex
I'm just letting people know in case others are having issues and need a quick fix.
I have changed the Github URLs. With the latest CRAN version of tinytex, you should be able to install TinyTeX in China. Thanks!
Originally posted on 2020-06-04 02:14:34
Guest *vt8235* @ 2020-06-03 20:39:09 originally posted:
220 MB is not tiny. I am really looking for something that can do it in 20-50. :) That would be tiny. If 220MB is tiny how much is a full Latex distro? damn
See FAQ 3: https://yihui.org/tinytex/faq/
Originally posted on 2020-06-04 02:13:09
Guest *kobayashi maru* @ 2020-06-09 12:50:03 originally posted:
Hi Yihui, I have gone through numerous blogs and installation methods, however I still get error when installing tinytex. error is as follows:
Error in download.file(url, output, ..., method = method) :
cannot open URL 'https://github.com/yihui/tinytex/raw/master/tools/texlive.profile'
I am using windows 10. i also tried the code
devtools::install_github('yihui/tinytex')
tinytex:::install_prebuilt()
any guidance on how to deal with this error?
thanks
hiren
Sounds like you were using a very old version of the R package tinytex. After you install the Github version, did you restart your R session?
Originally posted on 2020-06-09 14:27:57
Guest *kobayashi maru* @ 2020-06-10 04:49:30 originally posted:
Hi Yihui,
Yes i did restart numerous times. Is there anyother way i can install the package?
You only need to restart once. Installing from CRAN should suffice (no need to install from Github, although it's harmless). What's your xfun::session_info('tinytex')?
Originally posted on 2020-06-10 19:44:45
Guest *Eric* @ 2020-06-28 17:46:53 originally posted:
Thank you so much Yihui. I really appreciate your work on this package.
Guest *Stammering Mathematician* @ 2020-07-14 10:11:28 originally posted:
Hello. How do I actually use it after installing. I am on Linux OS. What command should I write in Terminal.
Guest *Alex* @ 2020-07-24 18:45:06 originally posted:
How to update TinyTeX ? specifically on Mac OS X? if I get a new installation, things are deleted from the tlmgr settings and it's rather annoying.
It depends on what you mean by "update". It could be either tinytex::tlmgr_update() or tinytex::reinstall_tinytex(). For the latter, the installed packages will be reinstalled, but none of your settings will be kept (I'm not sure what kind of settings you meant).
Originally posted on 2020-07-25 14:13:29
Guest *Guilherme Parreira* @ 2020-07-29 20:45:18 originally posted:
Hi There! I installed the package tinytex via terminal on my Ubuntu 20.04
When I compiled my file to PDF, it appears **"! LaTeX Error: File memoir.cls' not found."** So, I tried tlmgr search --global --file "/memoir.cls"`
And I got:
(running on Debian, switching to user mode!)
/usr/bin/tlmgr: unexpected return value from verify_checksum: -5
when I tried tlmgr update --self --all`` I also got the same error.
What should I do?
First, you are not using TinyTeX but Ubuntu's TeX Live. Second, I don't think your R packages are up-to-date: https://yihui.org/tinytex/r/#debugging
Originally posted on 2020-07-30 00:32:37
Guest *Guilherme Parreira* @ 2020-07-30 18:20:11 originally posted:
Thanks! It worked
Guest *Guilherme Parreira* @ 2020-07-30 19:07:47 originally posted:
tks! you are a genius!
I did tinytex::tlmgr_update() and tinytex::install_prebuilt()
Guest *Guilherme Parreira* @ 2020-12-14 18:31:04 originally posted:
Hi! After compiling my .Rmd file to PDF Beamer via tinytex, I get:
LaTeX Warning: There were undefined references.
Package biblatex Warning: Please (re)run Biber on the file:
(biblatex) teste_pres
(biblatex) and rerun LaTeX afterwards.
So, how can I (re)run Biber on the file teste_pres?
I saw on internet that they had to install another lib. But I am sure that there is a easier way from tinytex
Guest *Alyssa* @ 2020-12-30 02:54:10 originally posted:
Hi - I am trying to install TinyTex for a class. I get an install error on the console that I see is well documented online, but when I go to use the sudo chown command in the terminal tab and enter my correct system password I am getting an error that says:
chown: whomami: illegal user name
I have not seen this covered on any other forum, any idea how to get around this? I've tried creating a new user on my Mac OS and get the same error regardless.
What is the exact command that you ran? Chances are you missed the backticks around whoami: rstudio/tinytex#24 (comment)
Originally posted on 2020-12-30 05:46:10
Guest *Alyssa* @ 2020-12-30 15:59:28 originally posted:
The exact command I ran mirrors the suggestion:
sudo chown -R 'whoami':admin /usr/local/bin (disqus is not allowing me to upload the screenshot, but here is the exact text):
sudo chown -R 'whoami':admin /usr/local/bin
Password:
chown: whoami: illegal user name
You should not have typed the command manually. Please copy and paste it from the link I mentioned above. In your case, you typed single quotes instead of backticks, which completely changed the meaning of the command.
Originally posted on 2020-12-30 20:33:14
Guest *Rafael Peixoto* @ 2021-02-11 22:16:07 originally posted:
Hi,
I've installed tinyTex and everything looks fine. I'm able to generate a PDF file with tinytex::pdflatex().
But when I try to "Compile PDF" in a .Rnw document, Rstudio tries to compile with MikTex, which is also installed in my computer.
How can I set Rstudio to use tinytex instead of MikTex. I don't wanna unistall Miktex because I use it with TexStudio.
Thanks.
This RStudio issue has been resolved recently. Please see rstudio/tinytex#10 (comment) and try the daily build of RStudio.
Originally posted on 2021-02-11 23:23:29
访客 *Kimki Pang* @ 2021-03-22 03:26:28 写道:
学长,我安装了tinytex, 但是还是没法生成pdf. 请问这是什么原因啊?
Sorry, but C:UsersKKAppDataLocalProgramsMiKTeXmiktexbinx64pdflatex.exe did not succeed.
! The log file hopefully contains the information to get MiKTeX going again:
! C:UsersKKAppDataLocalMiKTeXmiktexlogpdflatex.log
Error: LaTeX failed to compile STAT-Project1-KK.tex. See
抱歉 MiKTeX 的问题我无法解答,你可以试试 TinyTeX;安装方法请往上翻到顶。
——原帖发布于 2021-03-22 05:24:35
Guest *adaq* @ 2021-03-28 20:52:42 originally posted:
I installed tinytex with the following command
wget -qO- "<https://yihui.org/tinytex/install-bin-unix.sh>" | sh
and now I see .TinyTex in my home directory. How do I actually install into R? Right now my R has an old TinyTex package (0.12) and I need to update it to 0.16
To update R packages, you can run update.packages(): https://yihui.org/tinytex/r/#debugging
Originally posted on 2021-03-30 15:45:59
Guest *Ivan* @ 2021-09-05 10:32:00 originally posted:
Hi Yihui
If we have full latex installation before we install R/Rstudio/bookdown, do we still need to install tinytex in R?
Let say that on mac I have already TeX Live installation that I use frequently; do I still have to install tinytex for R/RStudio/bookdown?
No, you don't.
Originally posted on 2021-09-05 13:07:34
Guest *Hanqi Luo* @ 2021-09-09 18:50:08 originally posted:
Hi I got an error message trying to use "escape = F"
! Misplaced noalign.
midrule ->noalign
{ifnum 0=`}fi @aboverulesep =aboverulesep global @...
l.196 end{tabular}}
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
Could you please help me debug?
Thank you
Sorry, but I can't help before you read and follow the debugging tips in the error message. The information you provided was too little.
Originally posted on 2021-09-09 20:39:23
Guest *Abbas* @ 2022-01-31 20:25:53 originally posted:
after including library(kableExtra) to the rmarkdown, i recive the following message which crashes the markdown:
! LaTeX Error: File `multirow.sty' not found.
even after running the following code still the problem persists:
tinytex::tlmgr_install("multirow")
I use Rstudio on my both Mac and Windows (files on the cloud).
While I am able to render my Quarto file (a journal article draft) into a pdf on my Mac, it does not render on Windows. The error message is as follows:
"running xelatex - 1
This is XeTeX, Version 3.141592653-2.6-0.999993 (TeX Live 2021/W32TeX) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
updating tlmgr
updating existing packages
finding package for setspace.sty
compilation failed- no matching packages
LaTeX Error: File `setspace.sty' not found.
Type X to quit or to proceed,
or enter new name. (Default extension: sty)
Enter file name:
! Emergency stop.
<read *>
l.14 \usepackage
{iftex}^^M
"
The following and other related advice did not work:
tinytex::parse_install(here::here("myfile.log")).
$ tlmgr search --global --file "/setspace.sty"
psnfss:
texmf-dist/tex/latex/psnfss/setspace.sty
How can I work around this?
Hi, in the error message, it seems to be complaining about \usepackage{iftex}. Have you checked whether you have that installed?
@kjayhan It seems you are using an old version of TinyTeX (2021). I recommend that you upgrade or reinstall TinyTeX first.
I updated ALL packages including TinyTex, but it didn't help. I will try installing iftex tomorrow (when I have access to my Windows computer).
I reinstalled "tinytex", but couldn't install "iftex" since the latter was not available for my R version (4.2.1).
For tinytext, I got this message:
There is a binary version available but the source version is later:
binary source needs_compilation
tinytex 0.43 0.44 FALSE
I meant TinyTeX, not tinytex: https://yihui.org/tinytex/#for-r-users
To reinstall TinyTeX, see: https://yihui.org/tinytex/r/#debugging
BTW, iftex is a LaTeX package, not an R package. You can't use install.packages() to install it. And I'm not sure if @Teddy-van-Jerry's guess was correct. In theory, you shouldn't need to deal with any missing LaTeX packages when you are using TinyTeX: https://yihui.org/tinytex/r/#compile-latex-documents
Thank you for the suggestions. I will try running them on my Windows next time I have access to it.
For the time being I have a similar problem both on my Mac and Windows.
I am using this template for writing a manuscript: https://github.com/ajnafa/project-template
It always tells me
compilation failed- package installation error
Package fontspec Error: The font "FontAwesome" cannot be found.
I did everything on the links you sent (installing TinyTex, updating packages, tinytex::tlmgr_update() etc.), tinytex::parse_install, as well as getting the extension for FontAwesome (in addition to the R package).
Nothing solves the problem (except removing fontawesome lines from Manuscript_Template.tex file (which leaves me without the author names etc.).
I am a novice to working with Latex files as you can tell, so the learning curve is steep to change even a font (especially when it involves -orcid, github etc.- logos).
Reinstalling TinyTex did solve the "setspace.sty" problem on my Windows, thank you.
But Macbook still cannot find FontAwesome which may be because the author of that template actually uses MikTex.
Hi Yihui,
我是tinytex的mac用户,最近我想为公司的一台电脑安装tinytex,但是公司非常注重数据的安全问题,目前电脑并没有也不允许连接网络,我已经通过password protected的USB成功安装了R和Rstudio,和里面需要的必要package, 但是tinytex是一个LaTex的distribution,你提供的下载和安装方式要么是通过R studio或者通过bash或者powershell联网实现,想问一下我能否在自己的mac上下载windows版本的TinyTex,然后通过USB转移进去后离线安装么?可以提供一下我这种情况的详细教程吗?公司电脑是windows版本
提前感谢你的解答!
TinyTeX 是可移植的,所以自然可以用 USB 拷贝。参见常见问题 9:https://yihui.org/tinytex/faq/#faq-9
你好,我不确定这个问题是否应该问您,但找不到地方问。
我在Rstudio上使用Rmarkdown,想输出pdf文档于是选用了tinytex。但是目前的状况是:
(1)我在日本工作,文档里有日语,网上查了下,得知通过“tinytex::tlmgr_install("ipaex")”安装IPAex字体即可(实际上我自己的私人电脑也试过可行)
(2)然而我公司因为安全问题无法连外网,自然也无法通过上面方法安装
于是想知道有没有什么方法(就像您提供的本地安装tinytex的方法那样)可以本地安装这个字体吗?
如果您不了解的话我就干干脆脆放弃了,也问题不大。
谢谢!
可以。不能连外网没有问题,只要能拷贝文件进公司电脑即可;要是不能拷贝,那么只要允许用 U 盘即可:https://yihui.org/en/2018/08/tinytex-flash-drive/
Sign in to join the discussion
Sign in with GitHub