• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

yihui/latex-pass: Help you pass the LaTeX compilation by telling you which LaTeX ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

yihui/latex-pass

开源软件地址(OpenSource Url):

https://github.com/yihui/latex-pass

开源编程语言(OpenSource Language):

R 100.0%

开源软件介绍(OpenSource Introduction):

LaTeX Pass

Build status

Upload a LaTeX error log file, or a LaTeX document, or an R Markdown document to this repository, and I will tell you which LaTeX packages you need to install in your local LaTeX distribution so you can compile your documents to PDF. You will no longer be confused by LaTeX error messages like this:

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

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

! Emergency stop.
<read *>

l.276 ^^M

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

Note that if you use both the R package tinytex and the LaTeX distribution TinyTeX, you should not need to use this repository, because tinytex will automatically install missing LaTeX packages by default. This repository may only be useful to those who do not use R or TinyTeX.

How does it work?

Depending on if you have a LaTeX error .log file, or a .tex document, or an .Rmd document, you may click one of the links below to edit the file in this repo, and follow the Github instructions to send a pull request.

After you send the pull request, wait for about 2 minutes for AppVeyor to finish. Then it should tell you the list of LaTeX packages required to compile your document in a comment (you may also get an email notification from Github if you have subscribed to notifications), e.g.,

The missing packages identified from the LaTeX log are:

  inconsolata

If you are an R user using TinyTeX, you may install these packages via:

  tinytex::tlmgr_install(c("inconsolata"))

If you use TinyTeX but are not an R user, you may install these packages via command line:

  tlmgr install inconsolata

If you are familiar with GIT and Github, you can add or edit more than one file (e.g., multiple .tex and/or .Rmd files) to the repo and send a pull request.

By default, the LaTeX engine to compile .tex documents is pdflatex. If the document requires a different engine to compile, you may name your file with the engine name, e.g., xelatex.tex or lualatex.tex, or add a comment of the form % !TeX program = ENGINE to your document, e.g., % !TeX program = xelatex. The bibliography may be processed by either bibtex (default) or biber. You may add the bibliography engine name to the filename if you want to use one specifically, e.g., test-biber.tex.

If you are compiling an Rmd document, please see Section 3.3.7.1 of the R Markdown Definitive Guide for how to specify the LaTeX engine in the Rmd document.

How to reproduce what this repo does locally

If you do not want to wait for 2 minutes, you can find out the missing LaTeX packages by yourself locally via the R function tinytex::parse_packages(), which requires you to install TeX Live or TinyTeX. See more information at https://bookdown.org/yihui/rmarkdown-cookbook/install-latex-pkgs.html.

BTW, Colin Fay was correct that this service was created because of him. That "fresh hell" could be easily avoided with TinyTeX.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap