CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Views: 51
The problem
Cocalc exports notebooks to LaTeX using a default provided by nbconvert when File > PDF via LaTeX
is clicked in the menu.
I wanted to be able to customize the default LaTeX settings (found at /ext/jupyter/nbconvert/templates/latex
), however this contains read-only files on the system. So, I created a local config, but they do not automatically override the system settings. After interpreting the docs, I found how to override the system default.
The recipe
First, copy the folder
/ext/jupyter/nbconvert/templates/latex
to/home/user/.local/share/jupyter/nbconvert/templates/latex
.
Create a config file at
.jupyter/jupyter_nbconvert_config.json
with the following contents:
The result
Now you will be able to edit the config files for LaTeX documents in /home/user/.local/share/jupyter/nbconvert/templates/latex
and the cocalc system will use those settings when you click File > PDF via LaTeX
. It also appears that defaults for other export types are not broken by this process, only the LaTeX export is changed.