- LaTeX LaTeX is a typesetting language for producing scientific documents. We introduce a very small part of the language for writing mathematical notation. Jupyter notebook recognizes LaTeX code written in markdown cells and renders the symbols in the browser using the MathJax JavaScript library.
- Latex Example Use in a Jupyter Notebook. GitHub Gist: instantly share code, notes, and snippets.
- (some) LaTeX environments for Jupyter notebook This extension for Jupyter notebook enables the use of some LaTeX commands and environments markdown cells. LaTeX commands and environments support for some LaTeX commands within markdown cells, e.g. Textit, textbf, underline.
Apr 04, 2020 The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations, and narrative text. Colaboratory is a free Jupyter notebook environment that requires no setup and runs entirely in the cloud. Add gmail contacts to iphone.
Latest version Released:
Jupyter notebook extension which supports (some) LaTeX environments within markdown cells. Also provides support for labels and crossreferences, document wide numbering, bibliography, and more..
Project description
(some) LaTeX environments for Jupyter notebook
This extension for Jupyter notebook enables the use of some LaTeX
commands and environments markdown cells.
1. **LaTeX commands and environments**
- support for some LaTeX commands within markdown cells, *e.g.*
``textit``, ``textbf``, ``underline``.
- support for **theorems-like environments**, support for labels and
cross references
- support for **lists**: *enumerate, itemize*,
- limited support for a **figure environment**,
- support for an environment *listing*,
- additional *textboxa* environment
2. **Citations and bibliography**
- support for ``cite`` with creation of a References section
3. **Document-wide numbering of equations and environments, support for
``label`` and ``ref``**
4. **Configuration toolbar**
5. **LaTeX_envs dropdown menu for a quick insertion of environments**
6. **User's LaTeX definitions** file can be loaded and used
7. **Export to plain HTML, Slides and LaTeX with a customized exporter**
8. Environments title/numbering can be customized by users in
``user_envs.json`` config file.
9. Styles can be customized in the ``latex_env.css`` stylesheet
10. **Autocompletion** for $, (, {, [, for LaTeX commands and environments
More environments can be simply added in ``user_envs.json`` or in the
source file (``thmsInNb4.js``).
It is possible to export the notebooks to plain :math:`LaTeX` and html
while keeping all the features of the ``latex_envs`` notebook extension
in the converted version. We provide specialized exporters, pre and post
processors, templates. We also added entry-points to simplify the
conversion process. It is now as simple as
. code:: bash
jupyter nbconvert --to html_with_lenvs FILE.ipynb
or
. code:: bash
jupyter nbconvert --to latex_with_lenvs FILE.ipynb
to convert ``FILE.ipynb`` into html/latex while keeping all the features
of the ``latex_envs`` notebook extension in the converted version. Other options are
``slides_with_lenvs`` for converting to reveal-js presentations, and ``html_with_toclenvs`` to include a
table of contents. The
LaTeX converter also expose several conversion options (read the
`docs <https://rawgit.com/jfbercher/jupyter_latex_envs/master/src/latex_envs/static/doc/latex_env_doc.html>`__).
Demo/documentation
------------------
The ``doc`` subdirectory that constains an example notebook and its html
and pdf versions. This serves as the documentation. A demo notebook
``latex_env_doc.ipynb`` is provided. Its html version is
`latex_env_doc.html <https://rawgit.com/jfbercher/jupyter_latex_envs/master/src/latex_envs/static/doc/latex_env_doc.html>`__
serves as
`documentation <https://rawgit.com/jfbercher/jupyter_latex_envs/master/src/latex_envs/static/doc/latex_env_doc.html>`__.
Installation
------------
The extension consists of a pypi package that includes a javascript
notebook extension, along with python code for nbconvert support. Since
Jupyter 4.2, pypi is the recommended way to distribute nbextensions. The
extension can be installed
- from the master version on the github repo (this will be always the
most recent version)
- via pip for the version hosted on Pypi
- via conda, from the `conda-forge <https://conda-forge.github.io/>`__
`channel <https://anaconda.org/conda-forge>`__
- as part of the great
`jupyter_contrib_nbextensions <https://github.com/ipython-contrib/jupyter_contrib_nbextensions>`__
collection. Follow the instructions there for installing. Once this
is done, you can open a tab at ``http://localhost:8888/nbextensions``
to enable and configure the various extensions.
From the github repo or from Pypi,
1. install the package
- ``pip3 install https://github.com/jfbercher/jupyter_latex_envs/archive/master.zip [--user][--upgrade]``
- or ``pip3 install jupyter_latex_envs [--user][--upgrade]``
- or clone the repo and install git clone
https://github.com/jfbercher/jupyter_latex_envs.git python3
setup.py install
2. install the notebook extension
::
jupyter nbextension install --py latex_envs [--user|--sys-prefix|--system]
3. and enable it
::
jupyter nbextension enable --py latex_envs [--user|--sys-prefix|--system]
For Jupyter versions before 4.2, the situation after step 1 is more
tricky, since the ``--py`` option isn't available, so you will have to
find the location of the source files manually as follows (instructions
adapted from [@jcb91](https://github.com/jcb91)'s
`jupyter_highlight_selected_word <https://github.com/jcb91/jupyter_highlight_selected_word>`__).
Execute
::
python -c 'import os.path as p; from latex_envs import __file__ as f, _jupyter_nbextension_paths as n; print(p.normpath(p.join(p.dirname(f), n()[0]['src'])))'
Then, issue
::
jupyter nbextension install <output source directory>
jupyter nbextension enable latex_envs/latex_envs
where ``<output source directory>`` is the output of the first python
command.
Disclaimer, sources and acknowledgments
---------------------------------------
Originally, I used a piece of code from the nice online markdown editor
`stackedit <https://github.com/benweet/stackedit/issues/187>`__, where
the authors also considered the problem of incorporating LaTeX markup in
their markdown.
I also studied and used examples and code from
`ipython-contrib/jupyter_contrib_nbextensions <https://github.com/ipython-contrib/jupyter_contrib_nbextensions>`__.
- This is done in the hope it can be useful. However there are many
impovements possible, in the code and in the documentation.
**Contributions will be welcome and deeply appreciated.**
- If you have issues, please post an issue at
``https://github.com/jfbercher/jupyter_latex_envs/issues``
`here <https://github.com/jfbercher/jupyter_latex_envs/issues>`__.
**Self-Promotion** -- Like ``latex_envs``? Please star and follow the
`repository <https://github.com/jfbercher/jupyter_latex_envs>`__ on
GitHub.
This extension for Jupyter notebook enables the use of some LaTeX
commands and environments markdown cells.
1. **LaTeX commands and environments**
- support for some LaTeX commands within markdown cells, *e.g.*
``textit``, ``textbf``, ``underline``.
- support for **theorems-like environments**, support for labels and
cross references
- support for **lists**: *enumerate, itemize*,
- limited support for a **figure environment**,
- support for an environment *listing*,
- additional *textboxa* environment
2. **Citations and bibliography**
- support for ``cite`` with creation of a References section
3. **Document-wide numbering of equations and environments, support for
``label`` and ``ref``**
4. **Configuration toolbar**
5. **LaTeX_envs dropdown menu for a quick insertion of environments**
6. **User's LaTeX definitions** file can be loaded and used
7. **Export to plain HTML, Slides and LaTeX with a customized exporter**
8. Environments title/numbering can be customized by users in
``user_envs.json`` config file.
9. Styles can be customized in the ``latex_env.css`` stylesheet
10. **Autocompletion** for $, (, {, [, for LaTeX commands and environments
More environments can be simply added in ``user_envs.json`` or in the
source file (``thmsInNb4.js``).
It is possible to export the notebooks to plain :math:`LaTeX` and html
while keeping all the features of the ``latex_envs`` notebook extension
in the converted version. We provide specialized exporters, pre and post
processors, templates. We also added entry-points to simplify the
conversion process. It is now as simple as
. code:: bash
jupyter nbconvert --to html_with_lenvs FILE.ipynb
or
. code:: bash
jupyter nbconvert --to latex_with_lenvs FILE.ipynb
to convert ``FILE.ipynb`` into html/latex while keeping all the features
of the ``latex_envs`` notebook extension in the converted version. Other options are
``slides_with_lenvs`` for converting to reveal-js presentations, and ``html_with_toclenvs`` to include a
table of contents. The
LaTeX converter also expose several conversion options (read the
`docs <https://rawgit.com/jfbercher/jupyter_latex_envs/master/src/latex_envs/static/doc/latex_env_doc.html>`__).
Demo/documentation
------------------
The ``doc`` subdirectory that constains an example notebook and its html
and pdf versions. This serves as the documentation. A demo notebook
``latex_env_doc.ipynb`` is provided. Its html version is
`latex_env_doc.html <https://rawgit.com/jfbercher/jupyter_latex_envs/master/src/latex_envs/static/doc/latex_env_doc.html>`__
serves as
`documentation <https://rawgit.com/jfbercher/jupyter_latex_envs/master/src/latex_envs/static/doc/latex_env_doc.html>`__.
Installation
------------
The extension consists of a pypi package that includes a javascript
notebook extension, along with python code for nbconvert support. Since
Jupyter 4.2, pypi is the recommended way to distribute nbextensions. The
extension can be installed
- from the master version on the github repo (this will be always the
most recent version)
- via pip for the version hosted on Pypi
- via conda, from the `conda-forge <https://conda-forge.github.io/>`__
`channel <https://anaconda.org/conda-forge>`__
- as part of the great
`jupyter_contrib_nbextensions <https://github.com/ipython-contrib/jupyter_contrib_nbextensions>`__
collection. Follow the instructions there for installing. Once this
is done, you can open a tab at ``http://localhost:8888/nbextensions``
to enable and configure the various extensions.
From the github repo or from Pypi,
1. install the package
- ``pip3 install https://github.com/jfbercher/jupyter_latex_envs/archive/master.zip [--user][--upgrade]``
- or ``pip3 install jupyter_latex_envs [--user][--upgrade]``
- or clone the repo and install git clone
https://github.com/jfbercher/jupyter_latex_envs.git python3
setup.py install
2. install the notebook extension
::
jupyter nbextension install --py latex_envs [--user|--sys-prefix|--system]
3. and enable it
::
jupyter nbextension enable --py latex_envs [--user|--sys-prefix|--system]
For Jupyter versions before 4.2, the situation after step 1 is more
tricky, since the ``--py`` option isn't available, so you will have to
find the location of the source files manually as follows (instructions
adapted from [@jcb91](https://github.com/jcb91)'s
`jupyter_highlight_selected_word <https://github.com/jcb91/jupyter_highlight_selected_word>`__).
Execute
::
python -c 'import os.path as p; from latex_envs import __file__ as f, _jupyter_nbextension_paths as n; print(p.normpath(p.join(p.dirname(f), n()[0]['src'])))'
Then, issue
::
jupyter nbextension install <output source directory>
jupyter nbextension enable latex_envs/latex_envs
where ``<output source directory>`` is the output of the first python
command.
Disclaimer, sources and acknowledgments
---------------------------------------
Originally, I used a piece of code from the nice online markdown editor
`stackedit <https://github.com/benweet/stackedit/issues/187>`__, where
the authors also considered the problem of incorporating LaTeX markup in
their markdown.
I also studied and used examples and code from
`ipython-contrib/jupyter_contrib_nbextensions <https://github.com/ipython-contrib/jupyter_contrib_nbextensions>`__.
- This is done in the hope it can be useful. However there are many
impovements possible, in the code and in the documentation.
**Contributions will be welcome and deeply appreciated.**
- If you have issues, please post an issue at
``https://github.com/jfbercher/jupyter_latex_envs/issues``
`here <https://github.com/jfbercher/jupyter_latex_envs/issues>`__.
**Self-Promotion** -- Like ``latex_envs``? Please star and follow the
`repository <https://github.com/jfbercher/jupyter_latex_envs>`__ on
GitHub.
Release historyRelease notifications | RSS feed
1.4.6
1.4.5
1.4.4
1.4.3
1.4.2
1.4.1
1.4.0
1.3.8.4
1.3.8.3
1.3.8.2
1.3.8.1
1.3.8
1.3.7.2
1.3.7.1
1.3.7
1.3.6
![Stack Stack](/uploads/1/3/4/4/134493459/314096475.png)
1.3.5.11
1.3.5.10
1.3.5.9
1.3.5.8
1.3.5.7
Jupyter Notebook Markdown Cheat Sheet
1.3.5.6
1.3.5.5
1.3.5.4
1.3.5.3
1.3.5.2
1.3.5.1
1.3.5
Metasequoia gold rush tree tattoo. 1.3.4
1.3.3
1.3.2
1.3.1
1.3.0.2
1.3.0.1
1.2.95
1.2.14
1.2.13
1.2.11
1.2.10
1.2.8
1.2.7
1.2.6
1.2.5
1.2.4
1.2.3
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size jupyter_latex_envs-1.4.6.tar.gz (861.7 kB) | File type Source | Python version None | Upload date | Hashes |
Hashes for jupyter_latex_envs-1.4.6.tar.gz
Algorithm | Hash digest |
---|---|
SHA256 | 070a31eb2dc488bba983915879a7c2939247bf5c3b669b398bdb36a9b5343872 |
MD5 | 62c1471a0d771a90401b7df6b18a2ee5 |
BLAKE2-256 | 0e1555805de080d5542f76920364635e96e64d3b37f678befdfe3b16aa154205 |
I made a resource for teaching people how to use Jupyter notebooks. Really it’s about learning LaTeX anywhere, but Jupyter notebooks are very well suited to this.
The notebook is available for download here.
1. Authentic resource
The jupyter notebook is available for download here. The intention is for it to be run on your free UCalgary syzygy server. The document can be read on Github, but on Syzygy it can be interacted with.
2. Background
LaTeX (pronounced “Lay-Tech” or “Laa-Tech” ) is a computer language used by mathematicians and physicists to nicely format mathematical expressions. Every math student will eventually need to know how to write in LaTeX, since all math journals are written using LaTeX. It is also used in every online platform that supports math writting, such as D2L discussion posts, Github, WordPress blogs, and Mathoverflow.
Jupyter notebooks are a file type that blends HTML, formatted text (markdown), formatted mathematical formulas (LaTeX) and runnable code (Python). It is the standard way that data scientists communicate with each other online.
Source: https://www.datacamp.com/community/tutorials/tutorial-jupyter-notebook
3. Description
Latex Packages In Jupyter Notebook
My resource is an interactive guide to properly typing LaTeX. The format is a Jupyter notebook which is an authentic way in which LaTeX is used by data scientists. The resource could be used in any first-year course at the University of Calgary that requires written mathematics (such as MATH 265 – Calculus 1 or MATH 311 – Linear Algebra 2). The examples are geared towards students in those courses.
4. Rationale
More Videos For Latex In Jupyter Notebook »
This was designed to be used as a resource outside of class that students could use whenever they want, as often as they want. In this sense it is a “flipped or blended” resource [3]. The nature of a jupyter notebook (it’s a fancy text file) means that students necessarily must download their own version of it and edit it as they go. This encourages them to personalize the material and take ownership of it. They can even modify the examples in the text instantly see how it changes the outcome.
In the SAMR model [2] this is firmly in the “Redefinition” category, as the Jupyter notebook simultaneously acts as information, scratch pad, code compiler, notebook, and authentic outcome. In addition, completing the exercises in a Jupyter notebook is an authentic use of the skill being trained.
The main driver of solid pedagogical underpinnings is the Universal Design guidelines [1]. There I used all nine principles to make the resource more robust and drive student learning in many different, but natural, ways. In particular, the resource is low in passive learning, and high in active learning. Each section is a couple sentences, some examples, then right into activities. The activities are of use to a student in a first year math class, and many additional, alternative explanations are offered. See my activity design post for more discussion about this.
5. References
Writing Math Equations In Jupyter Notebook: A Naive ..
- CAST (2018). Universal Design for Learning Guidelines version 2.2. Retrieved from http://udlguidelines.cast.org
- Hamilton, Erica R., Joshua M. Rosenberg, and Mete Akcaoglu. “The substitution augmentation modification redefinition (SAMR) model: A critical review and suggestions for its use.” TechTrends 60.5 (2016): 433-441.
- Kelly, Patrick, and Isabelle Barette-Ng. “Small FLICS to Big Flips: A Step-by-Step Guide to Flipping Your Classroom.” (2015). https://prism.ucalgary.ca/handle/1880/50856