File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 5858# We keep track of the number of \begin{asy}'s we see so that
5959# we can assocation asymptote file numbers with where they are
6060# in the document
61- asy_count = 0
61+ next_asy_number = 1
6262
6363ITALIC_RE = re .compile (r"(?s)<(?P<tag>i)>(?P<content>.*?)</(?P=tag)>" )
6464
@@ -565,10 +565,11 @@ def latex(self, doc_data: dict) -> str:
565565
566566 test_text = result ["result" ]
567567 if test_text : # is not None and result['result'].strip():
568- if test_text .find ("\\ begin{asy}" ) >= 0 :
569- global asy_count
570- asy_count += 1
571- text += f"%% mathics-{ asy_count } .asy\n "
568+ asy_count = test_text .count ("\\ begin{asy}" )
569+ if asy_count >= 0 :
570+ global next_asy_number
571+ text += f"%% mathics-{ next_asy_number } .asy\n "
572+ next_asy_number += asy_count
572573
573574 text += "\\ begin{testresult}%s\\ end{testresult}" % result ["result" ]
574575 text += "\\ end{testcase}"
You can’t perform that action at this time.
0 commit comments