JupyterLab extensions: LaTeX.

JupyterLab extensions: LaTeX.

The LaTex extension for JupyterLab allows for live-editing of LaTeX documents.

Open and edit LaTeX documents.

Right-click on an open .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.

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 (/home/username/.jupyter/jupyter_notebook_config.py).
If you do not have that file, you need to create it.

To create a jupyter_notebook_config.py file in the .jupyter directory use the following command:

jupyter notebook --generate-config
Then, add the following line to it:
c.LatexConfig.latex_command = 'pdflatex'

Show Comments