Skip to content

Commit 29d8089

Browse files
committed
Strip metadata when extracting equation PNG-s.
Ensure reproducible PNG files by not including the date of creation. Detect the EquationMark macro even with trailing spaces.
1 parent ad3a47e commit 29d8089

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

doc/manual/extractEquations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def loadEquations():
4848
attex = False
4949
eqlines = []
5050
for line in lines:
51-
bareline = line.strip()
51+
bareline = line.strip().rstrip('{}')
5252
if bareline == eqmark:
5353
atmark = True
5454
continue
@@ -102,8 +102,8 @@ def convertToPNG(texfile):
102102
hpx = pt2px * (bb[3] - bb[1])
103103
geometry = "%ix%i+%i+%i" % (wpx, hpx, xpx, ypx)
104104
pngfilename = texbasename + ".png"
105-
cmd = "convert -density %i %r -crop %s +repage %r" % \
106-
(rc['resolution'], psfilename, geometry, pngfilename)
105+
cmd = "convert -strip -density %i %r -crop %s +repage %r" % \
106+
(rc['resolution'], psfilename, geometry, pngfilename)
107107
os.system(cmd) != 0 and sys.exit(1)
108108
return
109109

0 commit comments

Comments
 (0)