From 14c7e573020cfef960e748119e1dd1d0f22b4795 2013-09-23 17:34:21 From: Jonathan Frederic Date: 2013-09-23 17:34:21 Subject: [PATCH] Latex book & article implementations --- diff --git a/IPython/nbconvert/templates/latex/latex_article.tplx b/IPython/nbconvert/templates/latex/latex_article.tplx index 702e4fc..622a799 100644 --- a/IPython/nbconvert/templates/latex/latex_article.tplx +++ b/IPython/nbconvert/templates/latex/latex_article.tplx @@ -1,7 +1,21 @@ -((= Complex input/output style =)) -((*- if not cell_style is defined -*)) - ((*- set cell_style = 'simple_style.tplx' -*)) -((*- endif -*)) +%=============================================================================== +% Cell style +%=============================================================================== -((*- extends cell_style -*)) +% Default to the simple output style +((* if not cell_style is defined *)) + ((* set cell_style = 'notebook_style.tplx' *)) +((* endif *)) + +% Inherit from the specified cell style. +((* extends cell_style *)) + + +%=============================================================================== +% Latex Article +%=============================================================================== + +((* block docclass *)) +\documentclass{article} +((* endblock docclass *)) \ No newline at end of file diff --git a/IPython/nbconvert/templates/latex/latex_book.tplx b/IPython/nbconvert/templates/latex/latex_book.tplx new file mode 100644 index 0000000..423c8f4 --- /dev/null +++ b/IPython/nbconvert/templates/latex/latex_book.tplx @@ -0,0 +1,28 @@ + +%=============================================================================== +% Cell style +%=============================================================================== + +% Default to the simple output style +((* if not cell_style is defined *)) + ((* set cell_style = 'simple_style.tplx' *)) +((* endif *)) + +% Inherit from the specified cell style. +((* extends cell_style *)) + + +%=============================================================================== +% Latex Article +%=============================================================================== + +((* block docclass *)) +\documentclass{book} +((* endblock docclass *)) + +((* block h1 -*))\part((* endblock h1 -*)) +((* block h2 -*))\chapter((* endblock h2 -*)) +((* block h3 -*))\section((* endblock h3 -*)) +((* block h4 -*))\subsection((* endblock h4 -*)) +((* block h5 -*))\subsubsection((* endblock h5 -*)) +((* block h6 -*))\paragraph((* endblock h6 -*)) \ No newline at end of file