From 31b7b984398c253cab238cf817676602c62d2cdb Mon Sep 17 00:00:00 2001 From: Marc Wouts Date: Wed, 23 Oct 2019 22:02:40 +0200 Subject: [PATCH] Added LaTeX multiline equation #305 --- .../ipynb_py/Line_breaks_in_LateX_305.ipynb | 73 +++++++++++++++++++ tests/test_mirror.py | 2 +- 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 tests/notebooks/ipynb_py/Line_breaks_in_LateX_305.ipynb diff --git a/tests/notebooks/ipynb_py/Line_breaks_in_LateX_305.ipynb b/tests/notebooks/ipynb_py/Line_breaks_in_LateX_305.ipynb new file mode 100644 index 000000000..be72322c0 --- /dev/null +++ b/tests/notebooks/ipynb_py/Line_breaks_in_LateX_305.ipynb @@ -0,0 +1,73 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This cell uses no particular cell marker\n", + "\n", + "$$\n", + "\\begin{align}\n", + "\\dot{x} & = \\sigma(y-x)\\\\\n", + "\\dot{y} & = \\rho x - y - xz \\\\\n", + "\\dot{z} & = -\\beta z + xy\n", + "\\end{align}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This cell uses no particular cell marker, and a single slash in the $\\LaTeX$ equation\n", + "\n", + "$$\n", + "\\begin{align}\n", + "\\dot{x} & = \\sigma(y-x) \\\n", + "\\dot{y} & = \\rho x - y - xz \\\n", + "\\dot{z} & = -\\beta z + xy\n", + "\\end{align}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "cell_marker": "'''" + }, + "source": [ + "This cell uses the triple quote cell markers introduced at https://github.com/mwouts/jupytext/issues/305\n", + "\n", + "$$\n", + "\\begin{align}\n", + "\\dot{x} & = \\sigma(y-x)\\\\\n", + "\\dot{y} & = \\rho x - y - xz \\\\\n", + "\\dot{z} & = -\\beta z + xy\n", + "\\end{align}\n", + "$$" + ] + } + ], + "metadata": { + "celltoolbar": "Edit Metadata", + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/tests/test_mirror.py b/tests/test_mirror.py index f25aa213d..d9e34d345 100644 --- a/tests/test_mirror.py +++ b/tests/test_mirror.py @@ -118,7 +118,7 @@ def test_ipynb_to_Rmd(nb_file, no_jupytext_version_number): @requires_pandoc @pytest.mark.parametrize('nb_file', - list_notebooks('ipynb', skip='(functional|Notebook with|flavors|invalid)')) + list_notebooks('ipynb', skip='(functional|Notebook with|flavors|invalid|305)')) def test_ipynb_to_pandoc(nb_file, no_jupytext_version_number): assert_conversion_same_as_mirror(nb_file, 'md:pandoc', 'ipynb_to_pandoc')