From 0bb960c2f2e49e445a83390d316bec68641c06c2 Mon Sep 17 00:00:00 2001 From: Josh Barnes Date: Sun, 27 Nov 2016 18:28:24 +0000 Subject: [PATCH] more removal of latex_envs: - templates - fix conda env import tests --- conda.recipe/meta.yaml | 1 - .../templates/latex_envs.tpl | 91 ---------- .../templates/thmsInNb_article.tplx | 170 ----------------- .../templates/thmsInNb_book.tplx | 171 ------------------ 4 files changed, 433 deletions(-) delete mode 100644 src/jupyter_contrib_nbextensions/templates/latex_envs.tpl delete mode 100644 src/jupyter_contrib_nbextensions/templates/thmsInNb_article.tplx delete mode 100644 src/jupyter_contrib_nbextensions/templates/thmsInNb_book.tplx diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index e33d577..32cfb73 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -42,7 +42,6 @@ test: - jupyter_contrib_nbextensions.migrate - jupyter_contrib_nbextensions.nbconvert_support - jupyter_contrib_nbextensions.nbconvert_support.embedhtml - - jupyter_contrib_nbextensions.nbconvert_support.latex_envs - jupyter_contrib_nbextensions.nbconvert_support.pp_highlighter - jupyter_contrib_nbextensions.nbconvert_support.pre_codefolding - jupyter_contrib_nbextensions.nbconvert_support.pre_collapsible_headings diff --git a/src/jupyter_contrib_nbextensions/templates/latex_envs.tpl b/src/jupyter_contrib_nbextensions/templates/latex_envs.tpl deleted file mode 100644 index fd77ac8..0000000 --- a/src/jupyter_contrib_nbextensions/templates/latex_envs.tpl +++ /dev/null @@ -1,91 +0,0 @@ -{%- extends 'full.tpl' -%} - - -{%- block html_head -%} - - - - - - - - -{% if nb['metadata']['latex_envs']['eqLabelWithNumbers'] == True %} - -{% else %} - -{% endif %} - - -{{ super() }} - - - - - - - - - - - - - - - - - - - -{%- endblock html_head -%} - -{% block body %} - - -{{ super() }} - - - -{%- endblock body %} - -{% block footer %} - -{% endblock footer %} diff --git a/src/jupyter_contrib_nbextensions/templates/thmsInNb_article.tplx b/src/jupyter_contrib_nbextensions/templates/thmsInNb_article.tplx deleted file mode 100644 index e6a8993..0000000 --- a/src/jupyter_contrib_nbextensions/templates/thmsInNb_article.tplx +++ /dev/null @@ -1,170 +0,0 @@ -((*- extends 'article.tplx' -*)) - -((* block h1 -*))\section((* endblock h1 -*)) -((* block h2 -*))\subsection((* endblock h2 -*)) -((* block h3 -*))\subsubsection((* endblock h3 -*)) -((* block h4 -*))\paragraph((* endblock h4 -*)) -((* block h5 -*))\subparagraph((* endblock h5 -*)) - - -((* block abstract *)) -\tableofcontents -%~\par -%\newpage -((* endblock abstract *)) - -%or? -%((* block toc *))\tableofcontents((* endblock toc *)) - - -%=============================================================================== -% My custom output style -%=============================================================================== -% A custom cell style that places code in a simple verbatim and prints "Input #" -% and "Output #" cell prompts. - -((*- block in_prompt -*)) -% No prompt! -%\textbf{Input \#{}(((cell.prompt_number)))} - -((*- endblock in_prompt -*)) - -((*- block input -*)) -% -\begin{lstlisting} -((( cell.source ))) -\end{lstlisting} -((*- endblock input -*)) - -% ok - -%but may be this? - -%((*- block output_prompt -*)) -% No prompt! -%\textbf{Output \#{}(((cell.prompt_number)))} -%((*- endblock output_prompt -*)) - - -((* block author *)) -\author{J.-F. Bercher} -((* endblock author *)) - -((* block title *)) -\title{ } -((* endblock title *)) - -((* block packages *)) -((( super() ))) -\usepackage{listings} -((* endblock packages *)) - -%or -- both work -((* block header *)) -((( super() ))) -%\usepackage{foo} -((* endblock *)) - - -((* block commands *)) - % Prevent overflowing lines due to hard-to-break entities - \sloppy - % Setup hyperref package - \hypersetup{ - breaklinks=true, % so long urls are correctly broken across lines - pdftitle={\@title}, - pdfauthor={\@author}, - colorlinks=true, %colorise les liens - breaklinks=true, %permet le retour à la ligne dans les liens trop longs - urlcolor= blue, %couleur des hyperliens - linkcolor= blue, %couleur des liens internes - citecolor=blue, %couleur des liens de citations - bookmarksopen=false, - pdftoolbar=false, - pdfmenubar=false, -% hidelinks - } - % Slightly bigger margins than the latex defaults - \geometry{verbose,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in} - %listings configuration - -\definecolor{mygreen}{rgb}{0,0.6,0} -\definecolor{mygray}{rgb}{0.5,0.5,0.5} -\definecolor{mymauve}{rgb}{0.58,0,0.82} - \lstset{ -language=Python, -commentstyle=\color{mygreen}, -keywordstyle=\color{blue}, -stringstyle=\color{mymauve}, -xleftmargin= 1cm, -xrightmargin= 1cm, -showstringspaces=false, - breaklines=true, - texcl=false, -% basicstyle=\ttfamily, -frame=single, -frameround=tttt, -framesep=10pt, -%framexleftmargin=10pt, -%framexrightmargin =10pt, -%frameshape={RYRYNYYYY}{yny}{yny}{RYRYNYYYY} - inputencoding=utf8, - extendedchars=true, - literate=% - {é}{{\'{e}}}1 - {è}{{\`{e}}}1 - {ê}{{\^{e}}}1 - {ë}{{\¨{e}}}1 - {É}{{\'{E}}}1 - {Ê}{{\^{E}}}1 - {û}{{\^{u}}}1 - {ù}{{\`{u}}}1 - {à}{{\`{a}}}1 - {ç}{{\c{c}}}1 - {Ç}{{\c{C}}}1 - {î}{{\^{i}}}1 - {Î}{{\^{I}}}1 -} -((* endblock commands *)) - - -% Display latex - -((* block data_latex -*)) - ((*- if output.latex.startswith('$'): -*)) - ((= Replace $ symbols with more explicit, equation block. =)) - \begin{equation} - ((( output.latex | strip_dollars ))) - \end{equation} - ((*- else -*)) - ((( output.latex ))) - ((*- endif *)) -((* endblock data_latex *)) - - - -((* block bibliography *)) -%\bibliographystyle{ieetran} -%\bibliography{Thesis} -((* endblock bibliography *)) - -% Draw a figure using the graphicx package. -((* macro draw_figure(filename) -*)) -((* set filename = filename | posix_path *)) -((*- block figure scoped -*)) - \begin{center} - \adjustimage{max size={0.6\linewidth}{0.6\paperheight}}{((( filename )))} - \end{center} -% { \hspace*{\fill} \\} -((*- endblock figure -*)) -((*- endmacro *)) - - -%============================================================ -((= This line selects the cell style. =)) -%((* set cell_style = 'style_bw_python.tplx' *)) -((* set cell_style = 'style_python.tplx' *)) - - - - diff --git a/src/jupyter_contrib_nbextensions/templates/thmsInNb_book.tplx b/src/jupyter_contrib_nbextensions/templates/thmsInNb_book.tplx deleted file mode 100644 index 10f29f7..0000000 --- a/src/jupyter_contrib_nbextensions/templates/thmsInNb_book.tplx +++ /dev/null @@ -1,171 +0,0 @@ -((*- extends 'report.tplx' -*)) - -((* block h1 -*))\chapter((* endblock h1 -*)) -((* block h2 -*))\section((* endblock h2 -*)) -((* block h3 -*))\subsection((* endblock h3 -*)) -((* block h4 -*))\subsubsection((* endblock h4 -*)) -((* block h5 -*))\paragraph((* endblock h5 -*)) - - -((* block abstract *)) -\tableofcontents -%~\par -%\newpage -((* endblock abstract *)) - -%or? -%((* block toc *))\tableofcontents((* endblock toc *)) - - -%=============================================================================== -% My custom output style -%=============================================================================== -% A custom cell style that places code in a simple verbatim and prints "Input #" -% and "Output #" cell prompts. - -((*- block in_prompt -*)) -% No prompt! -%\textbf{Input \#{}(((cell.prompt_number)))} - -((*- endblock in_prompt -*)) - -((*- block input -*)) -% -\begin{lstlisting} -((( cell.source ))) -\end{lstlisting} -((*- endblock input -*)) - -% ok - -%but may be this? - -%((*- block output_prompt -*)) -% No prompt! -%\textbf{Output \#{}(((cell.prompt_number)))} -%((*- endblock output_prompt -*)) - - -((* block author *)) -\author{J.-F. Bercher} -((* endblock author *)) - -((* block title *)) -\title{ } -((* endblock title *)) - -((* block packages *)) -((( super() ))) -\usepackage{listings} -\usepackage{float} -((* endblock packages *)) - -%or -- both work -((* block header *)) -((( super() ))) -%\usepackage{foo} -((* endblock *)) - - -((* block commands *)) - % Prevent overflowing lines due to hard-to-break entities - \sloppy - % Setup hyperref package - \hypersetup{ - breaklinks=true, % so long urls are correctly broken across lines - pdftitle={\@title}, - pdfauthor={\@author}, - colorlinks=true, %colorise les liens - breaklinks=true, %permet le retour à la ligne dans les liens trop longs - urlcolor= blue, %couleur des hyperliens - linkcolor= blue, %couleur des liens internes - citecolor=blue, %couleur des liens de citations - bookmarksopen=false, - pdftoolbar=false, - pdfmenubar=false, -% hidelinks - } - % Slightly bigger margins than the latex defaults - \geometry{verbose,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in} - %listings configuration - -\definecolor{mygreen}{rgb}{0,0.6,0} -\definecolor{mygray}{rgb}{0.5,0.5,0.5} -\definecolor{mymauve}{rgb}{0.58,0,0.82} - \lstset{ -language=Python, -commentstyle=\color{mygreen}, -keywordstyle=\color{blue}, -stringstyle=\color{mymauve}, -xleftmargin= 1cm, -xrightmargin= 1cm, -showstringspaces=false, - breaklines=true, - texcl=false, -% basicstyle=\ttfamily, -frame=single, -frameround=tttt, -framesep=10pt, -%framexleftmargin=10pt, -%framexrightmargin =10pt, -%frameshape={RYRYNYYYY}{yny}{yny}{RYRYNYYYY} - inputencoding=utf8, - extendedchars=true, - literate=% - {é}{{\'{e}}}1 - {è}{{\`{e}}}1 - {ê}{{\^{e}}}1 - {ë}{{\¨{e}}}1 - {É}{{\'{E}}}1 - {Ê}{{\^{E}}}1 - {û}{{\^{u}}}1 - {ù}{{\`{u}}}1 - {à}{{\`{a}}}1 - {ç}{{\c{c}}}1 - {Ç}{{\c{C}}}1 - {î}{{\^{i}}}1 - {Î}{{\^{I}}}1 -} -((* endblock commands *)) - - -% Display latex - -((* block data_latex -*)) - ((*- if output.latex.startswith('$'): -*)) - ((= Replace $ symbols with more explicit, equation block. =)) - \begin{equation} - ((( output.latex | strip_dollars ))) - \end{equation} - ((*- else -*)) - ((( output.latex ))) - ((*- endif *)) -((* endblock data_latex *)) - - - -((* block bibliography *)) -%\bibliographystyle{ieetran} -%\bibliography{Thesis} -((* endblock bibliography *)) - -% Draw a figure using the graphicx package. -((* macro draw_figure(filename) -*)) -((* set filename = filename | posix_path *)) -((*- block figure scoped -*)) - \begin{center} - \adjustimage{max size={0.6\linewidth}{0.6\paperheight}}{((( filename )))} - \end{center} -% { \hspace*{\fill} \\} -((*- endblock figure -*)) -((*- endmacro *)) - - -%============================================================ -((= This line selects the cell style. =)) -%((* set cell_style = 'style_bw_python.tplx' *)) -((* set cell_style = 'style_python.tplx' *)) - - - -