Skip to content

GapData/jupyterlab-latex

 
 

Repository files navigation

JupyterLab LaTeX

An extension for JupyterLab which allows for live-editing of LaTeX documents.

Usage

To use, right-click on a .tex document within JupyterLab, and select Show LaTeX Preview. This will compile the .tex file and open the rendered PDF document. Subsequent saves of the file will automatically update the PDF. If the PDF fails to compile (possibly due to a syntax error), an error panel will open detailing the LaTeX error.

Requirements

  • JupyterLab 0.29
  • An application that can compile .tex files to PDF on your notebook server (e.g., pdflatex or xelatex).

Installation

This extension includes both a notebook server extension (which interfaces with the LaTeX compiler) and a lab extension (which provides the UI for the LaTeX preview). In order to use it, you must enable both of them. From the jupyterlab-latex directory, enter the following into your terminal:

pip install .
jupyter labextension install .
jupyter serverextension enable jupyterlab_latex

Customization

The extension defaults to running xelatex on the server. This command may be customized (e.g., to use pdflatex instead) by customizing your jupyter_notebook_config.py file:

c.LatexConfig.latex_command = 'pdflatex'

About

JupyterLab extension for live editing of LaTeX documents

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 49.2%
  • TypeScript 46.3%
  • CSS 3.0%
  • TeX 1.4%
  • Shell 0.1%