Skip to content

Commit

Permalink
Added LaTeX multiline equation #305
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Oct 23, 2019
1 parent ec25f7e commit 31b7b98
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 1 deletion.
73 changes: 73 additions & 0 deletions tests/notebooks/ipynb_py/Line_breaks_in_LateX_305.ipynb
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 1 addition & 1 deletion tests/test_mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit 31b7b98

Please sign in to comment.