diff --git a/nb_pdf_template/templates/style_jupyter.tplx b/nb_pdf_template/templates/style_jupyter.tplx index 7626a90..6639826 100644 --- a/nb_pdf_template/templates/style_jupyter.tplx +++ b/nb_pdf_template/templates/style_jupyter.tplx @@ -23,6 +23,13 @@ \expandafter\def\csname PY@tok@o\endcsname{\def\PY@tc##1{\textcolor[HTML]{AA22FF}{\codetrue##1\codefalse}}} %operator \makeatother + \makeatletter + \newcommand*\@iflatexlater{\@ifl@t@r\fmtversion} + \@iflatexlater{2016/03/01}{ + \newcommand{\wordboundary}{4095}}{ + \newcommand{\wordboundary}{255}} + \makeatother + \newif\ifcode \codefalse \definecolor{Grey}{rgb}{0.40,0.40,0.40} @@ -33,10 +40,10 @@ \XeTeXcharclass `. \mycharclassGrey \XeTeXinterchartoks 0 \mycharclassGrey = {\bgroup\ifcode\color{Grey}\else\fi} - \XeTeXinterchartoks 4095 \mycharclassGrey = {\bgroup\ifcode\color{Grey}\else\fi} + \XeTeXinterchartoks \wordboundary \mycharclassGrey = {\bgroup\ifcode\color{Grey}\else\fi} \XeTeXinterchartoks \mycharclassGrey 0 = {\egroup} - \XeTeXinterchartoks \mycharclassGrey 4095 = {\egroup} + \XeTeXinterchartoks \mycharclassGrey \wordboundary = {\egroup} \fi %end magical operator highlighting %End Reconfigured Pygments ((* endblock repygments *)) diff --git a/nb_pdf_template/templates/style_jupyter_minted.tplx b/nb_pdf_template/templates/style_jupyter_minted.tplx index 802fb0d..900016d 100644 --- a/nb_pdf_template/templates/style_jupyter_minted.tplx +++ b/nb_pdf_template/templates/style_jupyter_minted.tplx @@ -14,6 +14,13 @@ ((( super() ))) % Pygments definitions ((* block repygments *)) + \makeatletter + \newcommand*\@iflatexlater{\@ifl@t@r\fmtversion} + \@iflatexlater{2016/03/01}{ + \newcommand{\wordboundary}{4095}}{ + \newcommand{\wordboundary}{255}} + \makeatother + \newif\ifcode \codefalse \definecolor{Grey}{rgb}{0.40,0.40,0.40} @@ -24,10 +31,10 @@ \XeTeXcharclass `. \mycharclassGrey \XeTeXinterchartoks 0 \mycharclassGrey = {\bgroup\ifcode\color{Grey}\else\fi} - \XeTeXinterchartoks 4095 \mycharclassGrey = {\bgroup\ifcode\color{Grey}\else\fi} + \XeTeXinterchartoks \wordboundary \mycharclassGrey = {\bgroup\ifcode\color{Grey}\else\fi} \XeTeXinterchartoks \mycharclassGrey 0 = {\egroup} - \XeTeXinterchartoks \mycharclassGrey 4095 = {\egroup} + \XeTeXinterchartoks \mycharclassGrey \wordboundary = {\egroup} \fi %end magical operator highlighting %End Reconfigured Pygments ((* endblock repygments *)) diff --git a/setup.py b/setup.py index c813b88..ecd315b 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ long_description = f.read() setup(name='nb_pdf_template', - version='2.1.dev1', + version='2.0.1', description='LaTeX templates for jupyter notebook conversion to pdf', long_description=long_description, long_description_content_type='text/markdown',