diff --git a/proto/cheby/print_latex.py b/proto/cheby/print_latex.py index a80a9af3..18296544 100644 --- a/proto/cheby/print_latex.py +++ b/proto/cheby/print_latex.py @@ -23,10 +23,13 @@ def escape_printable(text): if idx % 2 == 0: # Escape special characters - SPECIAL_CHARS = ['\\', '&', '%', '#', '_', '{', '}', '~', '^'] # '$' + SPECIAL_CHARS = ['\\', '&', '%', '#', '_', '{', '}'] for char in SPECIAL_CHARS: text_part = text_part.replace(char, '\\' + char) + text_part.replace('~', '\\textasciitilde') + text_part.replace('^', '\\textasciicircum') + # Allow line breaks after '_' and '.' in long strings ALLOW_BREAK_CHARS = ['.', '_'] for char in ALLOW_BREAK_CHARS: