chiark / gitweb /
m.math: properly reset formula counter on page breaks.
authorVladimír Vondruš <mosra@centrum.cz>
Mon, 11 Jun 2018 13:28:57 +0000 (15:28 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Mon, 11 Jun 2018 13:28:57 +0000 (15:28 +0200)
Otherwise the output was not deterministic anymore.

pelican-plugins/m/math.py

index 188d57c171f08172f353567cfcc2c736fec8211f..067b57d8536920f3369f2833f1c17189930548a3 100644 (file)
@@ -71,8 +71,7 @@ class Math(rst.Directive):
         return _nodes
 
 def new_page(content):
-    global counter
-    counter = 0
+    latex2svgextra.counter = 0
 
 def math(role, rawtext, text, lineno, inliner, options={}, content=[]):
     # Otherwise the backslashes do quite a mess there