KWARC / LaTeXML

LaTeXML is a TeX and LaTeX to XML translator.
Other
4 stars 0 forks source link

omdoc produced by latexml is (still) not deterministic #6

Open cmaeder opened 9 years ago

cmaeder commented 9 years ago

I've merged the patch from https://github.com/brucemiller/LaTeXML/pull/598 into the current version. Running latexmlc (with --expire=10) over the .tex files from (current) gl.mathhub.info:smglom/mv multiple times resulted in different values of the for-attribute in omdoc:definition elements. Example defeq.de.omdoc:

12c12
<     <omdoc:definition for="defeq?definitional-equation defeq?definiendum appro
xeq?approximately-equal defeq?definiens" xml:id="defeq.de.definition3" about="#d
efeq.de.definition3" stex:srcref="smglom/mv/source/defeq.de.tex#textrange(from=2
;1,to=7;18)">

---
>     <omdoc:definition for="defeq?definiens approxeq?approximately-equal defeq?
definitional-equation defeq?definiendum" xml:id="defeq.de.definition3" about="#d
efeq.de.definition3" stex:srcref="smglom/mv/source/defeq.de.tex#textrange(from=2
;1,to=7;18)">
dginev commented 9 years ago

Identical missing "sort" for the attribute keys. Though note that these 2 snippets are identical XML, even if they aren't identical strings.

Also, since we have 2 open issues for this type of problem now, opening a third isn't necessary. Please comment in the master LaTeXML issue you referenced. Or the sTeX one. It is likely this is something that needs to be added to the sTeX bindings.

cmaeder commented 9 years ago

the attribute keys ("for", "xml:id", "about") are in a deterministic order. The names within the value (for key "for") are mixed up! (This is IMHO not identical XML )

cmaeder commented 9 years ago

the names lists can even be different:

<     <omdoc:definition for="defeq?definitional-equation defeq?definiens defeq?definiendum" xml:id="defeq.de.definition3" about="#defeq.de.definition3" stex:srcref="smglom/mv/source/defeq.de.tex#textrange(from=2;1,to=7;18)">
---
>     <omdoc:definition for="defeq?definiens approxeq?approximately-equal defeq?definitional-equation defeq?definiendum" xml:id="defeq.de.definition3" about="#defeq.de.definition3" stex:srcref="smglom/mv/source/defeq.de.tex#textrange(from=2;1,to=7;18)">
cmaeder commented 9 years ago

I suggest to close this issue if it resolved for this repository as it is my basis for mathhub/MMT latexml.