# In-line LaTex in Notebooks

I am new to Jupyter and only somewhat experienced in Python, however have many years of experience with C, MATLAB, and others. At this time I know how to launch Jupyter notebook and carry out calculations.

That said, I know Jupyter notebook environment can be used to carry out scientific calculations and write science articles all in one place, but need to know how?

Please tell me the simplest approach for including LaTex in my notebook?

Just some starting pointers:
See the bottom of my post here and then Tony Hirst’s (@psychemedia) post right after that one for links to great examples. This trick might help you down the road when trying to combine with text and control how it displays in Jupyter. Also see here and here for reminder about %%latex cell magic. (In regards to the %%latex use, actually see the link to use in an example notebook in this post because it seems it has to be full-blown latex code and not just simple equations that work easily elsewhere with just dollar signs bracketing them, i.e., MathJax.)

While you can combine Python’s math abilities and Jupyter’s markdown/Latex/MathJax abilities, see here, for convenience with calculations, SymPy is a package that you’ll probably want to check out. See:

As for writing scientific articles in it, you may want to look into Curvenote. See here. Also see the JupyterLab extension for live editing of LaTeX documents.

I did some minimal sympy demos at Maths Overview — Subject Matter Authoring Using Jupyter Notebooks and there’s also so sympy examples in context of a electronics calculations package at : Electronics Worked Example — Subject Matter Authoring Using Jupyter Notebooks

1 Like