Skip to content

yihui/latex-pass

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

About

Help you pass the LaTeX compilation by telling you which LaTeX packages are missing to compile your documents

Topics

Resources

License

Stars

Watchers

Forks

Languages