Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
src/sage/misc/latex.py: Move import from sage.misc.sage_eval into method
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Oct 5, 2021
1 parent 52915b6 commit 22f125b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sage/misc/latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import shutil
from subprocess import call, PIPE

from sage.misc import sage_eval
from sage.misc.cachefunc import cached_function, cached_method
from sage.misc.sage_ostools import have_program
from sage.misc.temporary_file import tmp_dir
Expand Down Expand Up @@ -1015,6 +1014,7 @@ def _latex_preparse(self, s, locals):
sage: sage.misc.latex.Latex()._latex_preparse(r'\sage{s}', locals())
'2'
"""
from sage.misc.sage_eval import sage_eval
i0 = -1
while True:
i = s.find('\\sage{')
Expand All @@ -1028,7 +1028,7 @@ def _latex_preparse(self, s, locals):

var = t[:j]
try:
k = str(latex(sage_eval.sage_eval(var, locals)))
k = str(latex(sage_eval(var, locals)))
except Exception as msg:
print(msg)
k = '\\mbox{\\rm [%s undefined]}' % var
Expand Down

0 comments on commit 22f125b

Please sign in to comment.