Giter Club home page Giter Club logo

latex-pass's 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.

latex-pass's People

Contributors

yihui avatar naveen521kk avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.