kwarc / latexml Goto Github PK
View Code? Open in Web Editor NEWThis project forked from brucemiller/latexml
LaTeXML is a TeX and LaTeX to XML translator.
License: Other
This project forked from brucemiller/latexml
LaTeXML is a TeX and LaTeX to XML translator.
License: Other
I get
t/921_stex.t ........... 1/?
Error:undefined:\baseURI The token T_CS[\baseURI] is not defined.
/Users/kohlhase/localmh/ext/LaTeXML/t/daemon/profiles/stex/stex.tex#textrange(from=0;23,to=1;8)
In Core::Stomach[@0x7ff4d92a4a88] /Users/kohlhase/localmh/ext/LaTeXML/t/daemon/profiles/stex/stex.tex#textrange(from=0;23,to=1;8)
Error:undefined:{omgroup} The environment {omgroup} is not defined.
/Users/kohlhase/localmh/ext/LaTeXML/t/daemon/profiles/stex/stex.tex#textrange(from=1;28,to=2;15)
Next token is T_OTHER[[]
In \begin {} from LaTeX.pool.ltxml line 148
<= Core::Gullet[@0x7ff4d908fe38] <= Core::Stomach[@0x7ff4d92a4a88] <= ...
Error:undefined:{module} The environment {module} is not defined.
/Users/kohlhase/localmh/ext/LaTeXML/t/daemon/profiles/stex/stex.tex#textrange(from=2;10,to=3;14)
Next token is T_OTHER[[]
In \begin {} from LaTeX.pool.ltxml line 148
<= Core::Gullet[@0x7ff4d908fe38] <= Core::Stomach[@0x7ff4d92a4a88] <= ...
Error:undefined:\symdef The token T_CS[\symdef] is not defined.
/Users/kohlhase/localmh/ext/LaTeXML/t/daemon/profiles/stex/stex.tex#textrange(from=3;25,to=4;7)
In Core::Stomach[@0x7ff4d92a4a88] /Users/kohlhase/localmh/ext/LaTeXML/t/daemon/profiles/stex/stex.tex#textrange(from=3;25,to=4;7)
Error:undefined:\mathbb The token T_CS[\mathbb] is not defined.
/Users/kohlhase/localmh/ext/LaTeXML/t/daemon/profiles/stex/stex.tex#textrange(from=3;4,to=4;28)
In Core::Stomach[@0x7ff4d92a4a88] /Users/kohlhase/localmh/ext/LaTeXML/t/daemon/profiles/stex/stex.tex#textrange(from=3;4,to=4;28)
<= { <= Core::Stomach[@0x7ff4d92a4a88] <= ...
Error:undefined:\mixfixi The token T_CS[\mixfixi] is not defined.
/Users/kohlhase/localmh/ext/LaTeXML/t/daemon/profiles/stex/stex.tex#textrange(from=4;15,to=5;27)
In Core::Stomach[@0x7ff4d92a4a88] /Users/kohlhase/localmh/ext/LaTeXML/t/daemon/profiles/stex/stex.tex#textrange(from=4;15,to=5;27)
<= { <= Core::Stomach[@0x7ff4d92a4a88] <= ...
# Failed test 't/daemon/profiles/stex/stex'
# at /Users/kohlhase/localmh/ext/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Couldn't convert t/daemon/profiles/stex/stex.tex: 0
t/921_stex.t ........... 3/?
# Failed test 't/daemon/profiles/stex/stex'
# at /Users/kohlhase/localmh/ext/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/profiles/stex/stex
# got : ''
# expected : '<?xml version="1.0"?>'
# Failed test 't/daemon/profiles/stex/stex'
# at /Users/kohlhase/localmh/ext/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 73.
# Difference at line 1 for t/daemon/profiles/stex/stex
# got : '2 warnings; 4 errors; 1 fatal error; 4 undefined macros[\symdef, {omgroup}, {module}, \baseURI]'
# expected : 'No obvious problems'
# Looks like you failed 3 tests of 5.
t/921_stex.t ........... Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/5 subtests
t/92_profiles.t ........ 2/? sh: line 1: 30034 Segmentation fault: 11 /Users/kohlhase/localmh/ext/LaTeXML/t/../blib/script/latexmlc --profile="fragment" --source="../fragment.tex" --destination="fragment.test.xml" --log="/dev/null" --timeout="5" --autoflush="1" --timestamp="0" --nodefaultresources --xsltparameter="LATEXML_VERSION:TEST" --nocomments 2> fragment.test.status
t/92_profiles.t ........ 5/?
# Failed test 'latexmlc invocation for test fragment'
# at /Users/kohlhase/localmh/ext/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
# got: '35584'
# expected: '0'
sh: line 1: 30043 Segmentation fault: 11 /Users/kohlhase/localmh/ext/LaTeXML/t/../blib/script/latexmlc --profile="math" --source="literal:1+2=3" --destination="math.test.xml" --log="/dev/null" --timeout="5" --autoflush="1" --timestamp="0" --nodefaultresources --xsltparameter="LATEXML_VERSION:TEST" --nocomments 2> math.test.status
t/92_profiles.t ........ 8/?
# Failed test 'latexmlc invocation for test math'
# at /Users/kohlhase/localmh/ext/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
# got: '35584'
# expected: '0'
t/92_profiles.t ........ 11/? sh: line 1: 30054 Segmentation fault: 11 /Users/kohlhase/localmh/ext/LaTeXML/t/../blib/script/latexmlc --profile="zbl" --source="../zbl.tex" --destination="zbl.test.xml" --log="/dev/null" --timeout="5" --autoflush="1" --timestamp="0" --nodefaultresources --xsltparameter="LATEXML_VERSION:TEST" --nocomments 2> zbl.test.status
t/92_profiles.t ........ 14/?
# Failed test 'latexmlc invocation for test zbl'
# at /Users/kohlhase/localmh/ext/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
# got: '35584'
# expected: '0'
# Looks like you failed 3 tests of 16.
t/92_profiles.t ........ Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/16 subtests
t/93_formats.t ......... 1/? sh: line 1: 30061 Segmentation fault: 11 /Users/kohlhase/localmh/ext/LaTeXML/t/../blib/script/latexmlc --source="../citations.tex" --whatsin="fragment" --whatsout="standard" --format="xhtml" --pmml --bibliography="makebib.xml" --destination="citation.test.xml" --log="/dev/null" --timeout="5" --autoflush="1" --timestamp="0" --nodefaultresources --xsltparameter="LATEXML_VERSION:TEST" --nocomments 2> citation.test.status
t/93_formats.t ......... 2/?
# Failed test 'latexmlc invocation for test citation'
# at /Users/kohlhase/localmh/ext/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
# got: '35584'
# expected: '0'
sh: line 1: 30067 Segmentation fault: 11 /Users/kohlhase/localmh/ext/LaTeXML/t/../blib/script/latexmlc --source="../citations.tex" --whatsin="fragment" --whatsout="standard" --format="xhtml" --pmml --destination="citationraw.test.xml" --log="/dev/null" --timeout="5" --autoflush="1" --timestamp="0" --nodefaultresources --xsltparameter="LATEXML_VERSION:TEST" --nocomments 2> citationraw.test.status
t/93_formats.t ......... 5/?
# Failed test 'latexmlc invocation for test citationraw'
# at /Users/kohlhase/localmh/ext/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
# got: '35584'
# expected: '0'
t/93_formats.t ......... 11/? sh: line 1: 30079 Segmentation fault: 11 /Users/kohlhase/localmh/ext/LaTeXML/t/../blib/script/latexmlc --whatsin="fragment" --whatsout="math" --source="../fragment.tex" --cmml --om --pmml --xmath --format="xhtml" --destination="parallel-math-cmml.test.xml" --log="/dev/null" --timeout="5" --autoflush="1" --timestamp="0" --nodefaultresources --xsltparameter="LATEXML_VERSION:TEST" --nocomments 2> parallel-math-cmml.test.status
t/93_formats.t ......... 14/?
# Failed test 'latexmlc invocation for test parallel-math-cmml'
# at /Users/kohlhase/localmh/ext/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
# got: '35584'
# expected: '0'
t/93_formats.t ......... 17/? sh: line 1: 30088 Segmentation fault: 11 /Users/kohlhase/localmh/ext/LaTeXML/t/../blib/script/latexmlc --whatsin="fragment" --whatsout="math" --source="../fragment.tex" --pmml --cmml --om --xmath --format="xhtml" --destination="parallel-math-pmml.test.xml" --log="/dev/null" --timeout="5" --autoflush="1" --timestamp="0" --nodefaultresources --xsltparameter="LATEXML_VERSION:TEST" --nocomments 2> parallel-math-pmml.test.status
t/93_formats.t ......... 20/?
# Failed test 'latexmlc invocation for test parallel-math-pmml'
# at /Users/kohlhase/localmh/ext/LaTeXML/blib/lib/LaTeXML/Util/Test.pm line 180.
# got: '35584'
# expected: '0'
t/93_formats.t ......... 23/? # Looks like you failed 4 tests of 25.
t/93_formats.t ......... Dubious, test returned 4 (wstat 1024, 0x400)
Failed 4/25 subtests
t/94_runtimes.t ........ ok
t/95_complex_config.t .. ok
t/96_marpa.t ........... skipped: Marpa::R2 not installed.
t/99_memory.t .......... skipped: Test::LeakTrace not installed.
Using the script from https://svn.kwarc.info/repos/MMT/src/stex-mmt/run-latexml.sh repeated runs over smglom sets ([email protected]:smglom/sets.git) produced different omdoc outputs (with different files sizes). From 149 files 10 to 75 files are not reproduce in the same way.
I have documented all changes made to the kwarc fork in https://github.com/KWARC/LaTeXML/blob/master/Changes-from-upstream.md.
We should go over these changes and decide if they are worth merging into upstream, or deprecate them entirely.
cc @kohlhase @tkw1536 and @brucemiller
Unsure if we should make a call to the community to see if someone is still using this fork, but now that all KWARC work is phased away from it, I would strongly recommend fully removing this github repository.
It also helps to avoid unneeded confusion that this fork is maintained/may be mantained in the future, which it isn't / won't be.
Let's see if this sounds good to everyone?
It is great that we have a good treatment of embedded text (amstext-style) for OpenMath now. But it uses the wrong encoding. If I convert
\documentclass{article}
\usepackage{amstext}
\begin{document}
$\{\text{$\phi$ and $\psi$}\}$
\end{document}
I get
<om:OMOBJ>
<om:OMA>
<om:OMS cd="latexml" name="set"/>
<om:OMSTR xml:id="XM1">
<om:OMV name="ϕ" xml:id="XM1a"/> and <om:OMV name="ψ" xml:id="XM1b"/>
</om:OMSTR>
</om:OMA>
</om:OMOBJ>
But according to the OpenMath 2 standard OMSTR is for strings, not for recursing into other content. for that we need OMFOREIGN (which is only allowed in OMATTR). So I would like to have instead:
<om:OMOBJ>
<om:OMA>
<om:OMS cd="latexml" name="set"/>
<om:OMATTR>
<om:OMATP>
<om:OMS cd="OMDoc" name="verbalizes"/>
<om:FOREIGN encoding="mtext" xml:id="XM1">
<om:OMV name="ϕ" xml:id="XM1a"/> and <om:OMV name="ψ" xml:id="XM1b"/>
</om:FOREIGN>
</om:OMATP>
<om:OMS cd="OMDoc" name="infObj"/>
</om:OMATTR>
</om:OMA>
</om:OMOBJ>
@m-iancu:fyi
I've merged the patch from brucemiller#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)">
I noticed a problem in .../smglom/functional-analysis/source/norm.tex
. It contains
\symdef[name=norm]{normOp}{|\cdot|}
\symvariant{normOp}{double}{\Vert\cdot\Vert}
\symdef{norm}[1]{\mixfixi[nobrackets]{|}{#1}{|}}
\symvariant{norm}[1]{double}{\mixfixi[nobrackets]{\Vert}{#1}{\Vert}}
and yields
<omdoc:notation cd="norm" name="norm">
<omdoc:prototype>
<om:OMS cd="norm" name="norm"/>
</omdoc:prototype>
<omdoc:rendering>
<m:mrow>
<m:mo stretchy="false">|</m:mo>
<m:mo>⋅</m:mo>
<m:mo stretchy="false">|</m:mo>
</m:mrow>
</omdoc:rendering>
<omdoc:rendering ic="variant:double">
<m:mrow>
<m:mo>∥</m:mo>
<m:mo>⋅</m:mo>
<m:mo>∥</m:mo>
</m:mrow>
</omdoc:rendering>
<omdoc:rendering ic="variant:double">
<m:mo cr="fun">∥</m:mo>
<omdoc:render name="arg1" precedence="neginfty"/>
<m:mo cr="fun">∥</m:mo>
</omdoc:rendering>
</omdoc:notation>
<omdoc:notation cd="norm" name="norm">
<omdoc:prototype>
<om:OMA>
<om:OMS cd="norm" cr="fun" name="norm"/>
<omdoc:expr name="arg1"/>
</om:OMA>
</omdoc:prototype>
<omdoc:rendering>
<m:mo cr="fun">|</m:mo>
<omdoc:render name="arg1" precedence="neginfty"/>
<m:mo cr="fun">|</m:mo>
</omdoc:rendering>
</omdoc:notation>
as a result. It seems that the second \symvariant{norm}[1]
deposits its <rendering>
into the first <notation>
(it contains a call to arg1
which gives rise to an error); it should go into the second one (I want to distinguish by argumens). I suspect that the problem is that I have given a [name=norm]
to the first \symdef[name=norm]{normOp}
and that gets things confused.
I am assigning this to @dginev, since it is probably still to difficult for @angerhang
It could be that we have to redesign the interface here, ... and I would be willing to do that, but maybe you can first have a look.
I get:
(XMath wilsonquotient.omdoc 2 to process...Fatal:post:generic Post-processor crashed!
Fatal:perl:die Perl died
Postprocessing LaTeXML::Post::XMath wilsonquotient.omdoc
Can't locate object method "getAttribute" via package "XML::LibXML::Text" at /path/to/localmh/ext/perl5lib/lib/perl5/LaTeXML/Post.pm line 440.
Status:conversion:3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.