Skip to content

Commit

Permalink
Added mirror representation for the latex notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Oct 23, 2019
1 parent 28a3c2d commit 4efe49b
Show file tree
Hide file tree
Showing 8 changed files with 330 additions and 0 deletions.
39 changes: 39 additions & 0 deletions tests/notebooks/mirror/ipynb_to_Rmd/Line_breaks_in_LateX_305.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
jupyter:
kernelspec:
display_name: Python 3
language: python
name: python3
---

This cell uses no particular cell marker

$$
\begin{align}
\dot{x} & = \sigma(y-x)\\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xy
\end{align}
$$


This cell uses no particular cell marker, and a single slash in the $\LaTeX$ equation

$$
\begin{align}
\dot{x} & = \sigma(y-x) \
\dot{y} & = \rho x - y - xz \
\dot{z} & = -\beta z + xy
\end{align}
$$


This cell uses the triple quote cell markers introduced at https://github.com/mwouts/jupytext/issues/305

$$
\begin{align}
\dot{x} & = \sigma(y-x)\\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xy
\end{align}
$$
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# ---
# jupyter:
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---

# %% [markdown]
# This cell uses no particular cell marker
#
# $$
# \begin{align}
# \dot{x} & = \sigma(y-x)\\
# \dot{y} & = \rho x - y - xz \\
# \dot{z} & = -\beta z + xy
# \end{align}
# $$

# %% [markdown]
# This cell uses no particular cell marker, and a single slash in the $\LaTeX$ equation
#
# $$
# \begin{align}
# \dot{x} & = \sigma(y-x) \
# \dot{y} & = \rho x - y - xz \
# \dot{z} & = -\beta z + xy
# \end{align}
# $$

# %% [markdown]
'''
This cell uses the triple quote cell markers introduced at https://github.com/mwouts/jupytext/issues/305
$$
\begin{align}
\dot{x} & = \sigma(y-x)\\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xy
\end{align}
$$
'''
39 changes: 39 additions & 0 deletions tests/notebooks/mirror/ipynb_to_md/Line_breaks_in_LateX_305.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
jupyter:
kernelspec:
display_name: Python 3
language: python
name: python3
---

This cell uses no particular cell marker

$$
\begin{align}
\dot{x} & = \sigma(y-x)\\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xy
\end{align}
$$


This cell uses no particular cell marker, and a single slash in the $\LaTeX$ equation

$$
\begin{align}
\dot{x} & = \sigma(y-x) \
\dot{y} & = \rho x - y - xz \
\dot{z} & = -\beta z + xy
\end{align}
$$


This cell uses the triple quote cell markers introduced at https://github.com/mwouts/jupytext/issues/305

$$
\begin{align}
\dot{x} & = \sigma(y-x)\\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xy
\end{align}
$$
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# ---
# jupyter:
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---

# %% [markdown]
# This cell uses no particular cell marker
#
# $$
# \begin{align}
# \dot{x} & = \sigma(y-x)\\
# \dot{y} & = \rho x - y - xz \\
# \dot{z} & = -\beta z + xy
# \end{align}
# $$

# %% [markdown]
# This cell uses no particular cell marker, and a single slash in the $\LaTeX$ equation
#
# $$
# \begin{align}
# \dot{x} & = \sigma(y-x) \
# \dot{y} & = \rho x - y - xz \
# \dot{z} & = -\beta z + xy
# \end{align}
# $$

# %% [markdown]
'''
This cell uses the triple quote cell markers introduced at https://github.com/mwouts/jupytext/issues/305
$$
\begin{align}
\dot{x} & = \sigma(y-x)\\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xy
\end{align}
$$
'''
40 changes: 40 additions & 0 deletions tests/notebooks/mirror/ipynb_to_script/Line_breaks_in_LateX_305.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# ---
# jupyter:
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---

# This cell uses no particular cell marker
#
# $$
# \begin{align}
# \dot{x} & = \sigma(y-x)\\
# \dot{y} & = \rho x - y - xz \\
# \dot{z} & = -\beta z + xy
# \end{align}
# $$

# This cell uses no particular cell marker, and a single slash in the $\LaTeX$ equation
#
# $$
# \begin{align}
# \dot{x} & = \sigma(y-x) \
# \dot{y} & = \rho x - y - xz \
# \dot{z} & = -\beta z + xy
# \end{align}
# $$

# + [markdown]
'''
This cell uses the triple quote cell markers introduced at https://github.com/mwouts/jupytext/issues/305
$$
\begin{align}
\dot{x} & = \sigma(y-x)\\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xy
\end{align}
$$
'''
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# ---
# jupyter:
# jupytext:
# cell_markers: '{{{,}}}'
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---

# This cell uses no particular cell marker
#
# $$
# \begin{align}
# \dot{x} & = \sigma(y-x)\\
# \dot{y} & = \rho x - y - xz \\
# \dot{z} & = -\beta z + xy
# \end{align}
# $$

# This cell uses no particular cell marker, and a single slash in the $\LaTeX$ equation
#
# $$
# \begin{align}
# \dot{x} & = \sigma(y-x) \
# \dot{y} & = \rho x - y - xz \
# \dot{z} & = -\beta z + xy
# \end{align}
# $$

# {{{ [markdown]
'''
This cell uses the triple quote cell markers introduced at https://github.com/mwouts/jupytext/issues/305
$$
\begin{align}
\dot{x} & = \sigma(y-x)\\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xy
\end{align}
$$
'''
# }}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# ---
# jupyter:
# jupytext:
# cell_markers: region,endregion
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---

# This cell uses no particular cell marker
#
# $$
# \begin{align}
# \dot{x} & = \sigma(y-x)\\
# \dot{y} & = \rho x - y - xz \\
# \dot{z} & = -\beta z + xy
# \end{align}
# $$

# This cell uses no particular cell marker, and a single slash in the $\LaTeX$ equation
#
# $$
# \begin{align}
# \dot{x} & = \sigma(y-x) \
# \dot{y} & = \rho x - y - xz \
# \dot{z} & = -\beta z + xy
# \end{align}
# $$

# region [markdown]
'''
This cell uses the triple quote cell markers introduced at https://github.com/mwouts/jupytext/issues/305
$$
\begin{align}
\dot{x} & = \sigma(y-x)\\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xy
\end{align}
$$
'''
# endregion
42 changes: 42 additions & 0 deletions tests/notebooks/mirror/ipynb_to_sphinx/Line_breaks_in_LateX_305.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# ---
# jupyter:
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---

"""
This cell uses no particular cell marker
$$
\begin{align}
\dot{x} & = \sigma(y-x)\\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xy
\end{align}
$$
"""

###############################################################################
# This cell uses no particular cell marker, and a single slash in the $\LaTeX$ equation
#
# $$
# \begin{align}
# \dot{x} & = \sigma(y-x) \
# \dot{y} & = \rho x - y - xz \
# \dot{z} & = -\beta z + xy
# \end{align}
# $$

'''
This cell uses the triple quote cell markers introduced at https://github.com/mwouts/jupytext/issues/305
$$
\begin{align}
\dot{x} & = \sigma(y-x)\\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xy
\end{align}
$$
'''

0 comments on commit 4efe49b

Please sign in to comment.