From d045c0ad850f1af884d8342ddc9761d8ee9f90cb 2014-06-10 16:15:38 From: Jonathan Frederic Date: 2014-06-10 16:15:38 Subject: [PATCH] Merge pull request #5948 from joergdietrich/patch-1 Enclose \ldots with {} --- diff --git a/IPython/nbconvert/filters/latex.py b/IPython/nbconvert/filters/latex.py index e03a945..e24dbb6 100755 --- a/IPython/nbconvert/filters/latex.py +++ b/IPython/nbconvert/filters/latex.py @@ -20,7 +20,7 @@ import re #----------------------------------------------------------------------------- LATEX_RE_SUBS = ( - (re.compile(r'\.\.\.+'), r'\\ldots'), + (re.compile(r'\.\.\.+'), r'{\\ldots}'), ) # Latex substitutions for escaping latex. diff --git a/IPython/nbconvert/filters/tests/test_latex.py b/IPython/nbconvert/filters/tests/test_latex.py index cc324b1..3438f07 100644 --- a/IPython/nbconvert/filters/tests/test_latex.py +++ b/IPython/nbconvert/filters/tests/test_latex.py @@ -31,7 +31,7 @@ class TestLatex(TestsBase): (r'How are \you doing today?', r'How are \textbackslash{}you doing today?'), (r'\escapechar=`\A\catcode`\|=0 |string|foo', r'\textbackslash{}escapechar=`\textbackslash{}A\textbackslash{}catcode`\textbackslash{}|=0 |string|foo'), (r'# $ % & ~ _ ^ \ { }', r'\# \$ \% \& \textasciitilde{} \_ \^{} \textbackslash{} \{ \}'), - ('...', r'\ldots'), + ('...', r'{\ldots}'), ('','')] for test in tests: