You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using pythontex with sagefamily like in the example below, I get the following warning:
This is PythonTeX 0.18
---- Messages for sage:default:default ----
/usr/local/texlive/2021/texmf-dist/scripts/pythontex/pythontex_utils.py:231: DeprecationWarning: invalid escape sequence \m
'''
--------------------------------------------------
PythonTeX: Sage_Warning - 0 error(s), 0 warning(s)
What does this warning mean and how can I get rid of it?
If I can't get rid of it is there at least a way to prevent emacs from showing this message each time I compile it (after changing the sage code) from emacs?
Minimal Example:
\documentclass{article}
\usepackage[gobble=auto,usefamily=sage]{pythontex}
\begin{document}
\begin{sagecode}
a = 2
b = 3
\end{sagecode}
\(\sage{a}\)
\end{document}
Run pdflatex myfilename.tex and then pythontex myfilename.tex to reproduce the warning (to reproduce it a second time you either have to change the sagecode block or remove the directory pythontex-files-myfilename and then execute pythontex myfilename.tex again).
pdflatex --version
pdfTeX 3.141592653-2.6-1.40.23 (TeX Live 2021)
kpathsea version 6.3.3
Copyright 2021 Han The Thanh (pdfTeX) et al.
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.37; using libpng 1.6.37
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 4.03
sage --version
SageMath version 9.2, Release Date: 2020-10-24
The problem occurs in pythontex_utils.py on line 231. In that line a docstring starts that contains multiple unescaped backslashes leading to accidental escape sequences (not just \m, by the way). In order to fix this, one could either escape each backslash or make the docstring "raw" by prepending an r to the opening quotes.
The text was updated successfully, but these errors were encountered:
When using
pythontex
withsagefamily
like in the example below, I get the following warning:What does this warning mean and how can I get rid of it?
If I can't get rid of it is there at least a way to prevent emacs from showing this message each time I compile it (after changing the sage code) from emacs?
Minimal Example:
Run
pdflatex myfilename.tex
and thenpythontex myfilename.tex
to reproduce the warning (to reproduce it a second time you either have to change the sagecode block or remove the directorypythontex-files-myfilename
and then executepythontex myfilename.tex
again).As discussed here
The problem occurs in pythontex_utils.py on line 231. In that line a docstring starts that contains multiple unescaped backslashes leading to accidental escape sequences (not just \m, by the way). In order to fix this, one could either escape each backslash or make the docstring "raw" by prepending an r to the opening quotes.
The text was updated successfully, but these errors were encountered: