https://mybinder.org/v2/gist/bollwyvl/d7bf71ea6884b047cc95db95bf5a7e2d/HEAD
Last active
March 18, 2022 18:15
-
-
Save bollwyvl/d7bf71ea6884b047cc95db95bf5a7e2d to your computer and use it in GitHub Desktop.
a jupyter/latex demo environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
channels: | |
- conda-forge | |
- nodefaults | |
dependencies: | |
- antlr-python-runtime | |
- jupyterlab >=3.3.2 | |
- jupyter-lsp-python-plugins | |
- jupyter-lsp-latex | |
- jupyterlab-link-share | |
- jupyterlab-lsp | |
- matplotlib-base | |
- scipy | |
- seaborn | |
- sympy >=1.10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"LabApp": { | |
"collaborative": true | |
}, | |
"LatexConfig": { | |
"latex_command": "tectonic" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@krassowski/jupyterlab-lsp:plugin": { | |
"language_servers": { | |
"texlab": { | |
"serverSettings": { | |
"latex.lint.onChange": true | |
} | |
} | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ "$NB_USER" = "jovyan" ]; then | |
mkdir -p $NB_PYTHON_PREFIX/share/jupyter/lab/settings/ | |
cp overrides.json $NB_PYTHON_PREFIX/share/jupyter/lab/settings/ | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\usepackage{graphicx} | |
\begin{document} | |
\title{JupyterLab \LaTeX} | |
\date{} | |
\maketitle | |
\section{Introduction} | |
This is a sample document demonstrating the ability to live-edit | |
\LaTeX documents in JupyterLab. | |
\\ | |
\\ | |
Right-click on this document, and select "Show LaTeX Preview". | |
A new panel should open up on the right with the PDF that is generated | |
by this document. If there are any errors in the document, an | |
error panel should open below. | |
\\ | |
\\ | |
We can write equations: | |
\begin{equation} | |
\rho \left( \frac{\partial \mathbf{u}}{\partial t} + \mathbf{u} \cdot \nabla \mathbf{u} \right) = | |
-\nabla P + \eta \nabla^2 \mathbf{u} + \rho \mathbf{g}. | |
\end{equation} | |
\\ | |
\\ | |
And we can write tables: | |
\begin{center} | |
\begin{tabular}{ | l | c | r| } | |
\hline | |
1 & 2 & 3 \\ | |
4 & 5 & 6 \\ | |
7 & 8 & 9 \\ | |
\hline | |
\end{tabular} | |
\end{center} | |
\subsection{We can add new subsections} | |
And we can include images, such as the Jupyter logo: | |
\begin{center} | |
\includegraphics[width=0.65\textwidth]{images/jupyter_logo.png} | |
\end{center} | |
\pagebreak | |
You can also use SyncTeX by typing ⌘(CMD)/CTRL+⇧(SHIFT)+X. | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment