In [ ]:
from ipypublish.scripts.ipynb_latex_setup import *
Some markdown text.
A list:
A numbered list
non-ascii characters TODO
This is a long section of text, which we only want in a document (not a presentation) some text some more text some more text some more text some more text some more text some more text some more text some more text
This is an abbreviated section of the document text, which we only want in a presentation
References to \cref{fig:example}, \cref{tbl:example}, =@eqn:example_sympy and \cref{code:example_mpl}.
A latex citation.\cite{zelenyak_molecular_2016}
A html citation.(Kirkeminde, 2012)
\todo[inline]{an inline todo}
Some text.\todo{a todo in the margins}
In [3]:
print("""
This is some printed text,
with a nicely formatted output.
""")
In [3]:
Image('example.jpg',height=400)
Out[3]:
A matplotlib figure, with the caption set in the markdowncell above the figure.
The plotting code for a matplotlib figure (\cref{fig:example_mpl}).
In [9]:
plt.scatter(np.random.rand(10), np.random.rand(10),
label='data label')
plt.ylabel(r'a y label with latex $\alpha$')
plt.legend();
The plotting code for a pandas Dataframe table (\cref{tbl:example}).
In [8]:
df = pd.DataFrame(np.random.rand(3,4),columns=['a','b','c','d'])
df.a = ['$\delta$','x','y']
df.b = ['l','m','n']
df.set_index(['a','b'])
df.round(3)
Out[8]:
In [9]:
Latex('$$ a = b+c $$')
Out[9]:
The plotting code for a sympy equation (=@eqn:example_sympy).
In [10]:
y = sym.Function('y')
n = sym.symbols(r'\alpha')
f = y(n)-2*y(n-1/sym.pi)-5*y(n-2)
sym.rsolve(f,y(n),[1,4])
Out[10]: