Anonymous committed 6cc763c

trac 12267: fix check for labels we've already seen. Fixes 3840ae05d2a7.

In the "fancy" AMS math envs (align, multline, etc), things get
evaluated twice; in 3840ae05d2a7 I tried to fix that by checking to see
if the label given to inline() is == the maximum already-seen label --
but if you do \sage{} *twice* in a single line, you'll advance it twice,
so we need to check if the given label is <= the max seen.

Comments (0)

Files changed (1)

 % That's a lot of explanation for a very short function:
 %    \begin{macrocode}
   def inline(self, counter, s, labelname=None):
-      if counter == self.max_inline_counter_seen:
+      if counter <= self.max_inline_counter_seen:
           self.max_inline_counter_seen += 1