pythontex icon indicating copy to clipboard operation
pythontex copied to clipboard

Escape backslashes to avoid "invalid escape sequence '\s'" syntax warnings

Open vivekmyers opened this issue 1 year ago • 1 comments

vivekmyers avatar Jan 02 '25 20:01 vivekmyers

I think we can also make the docstring of _make_sympy_latex in pythontex_utils.py line 231 a raw string as well, since a similar warning is thrown for the \m escape sequence there.

--- /tmp/pythontex_utils.py	2025-02-08 10:55:10.424520558 -0500
+++ pythontex_utils.py	2025-02-08 10:53:11.096653520 -0500
@@ -228,7 +228,7 @@
             
     # Finally, create the actual interface to SymPy's LatexPrinter
     def _make_sympy_latex(self):
-        '''
+        r'''
         Create a context-aware interface to SymPy's LatexPrinter class.
         
         This is an interface to the LatexPrinter class, rather than 

vEnhance avatar Feb 08 '25 16:02 vEnhance

This is fixed in the development version on GitHub and in the upcoming v0.19 release.

gpoore avatar Nov 11 '25 17:11 gpoore