slatex / LaTeXML-Plugin-sTeX

A LaTeXML Plugin for Semantic LaTeX (sTeX)
LaTeX Project Public License v1.3c
2 stars 3 forks source link

gviewnl #111

Open angerhang opened 8 years ago

angerhang commented 8 years ago

For ticket #104 : Given a modified version of smglom/set/setcarprod based on the gviewnl branch on the pdf side

\begin{gviewnl}[creators=miko,sigpath=smglom/set/]{setcartprod}{en}

  We can interpret any set $A$ as an one-dimensional
  \trefii[cartesian-space]{Cartesian}{space}, if we interpret $\inset{a}A$ as
  $\inset{\tup{a}}{\ndim{A}1}$.
\end{gviewnl}

we can generate

<?xml version="1.0"?>
<!--This OMDoc document is generated from an sTeX-encoded one via LaTeXML, you
  may want to reconsider editing it.-->
<omdoc xmlns:omdoc="http://omdoc.org/ns" xmlns="http://omdoc.org/ns" xmlns:stex="http://kwarc.info/ns/sTeX" xmlns:om="http://www.openmath.org/OpenMath" xmlns:m="http://www.w3.org/1998/Math/MathML" xml:base="https://mathhub.info" xml:id="omdoc1" about="#omdoc1" stex:srcref="smglom/sets/source/setcartprod.en.tex#textrange(from=5;0,to=0;0)">
<div xmlns="http://www.w3.org/1999/xhtml" id="p1" class="ltx_para">
<p id="p1.p1" class="ltx_p" about="#omdoc1.p1.p1">&#x201C;metasetkeysmhviewsetcartprod,creators=miko,sigpath=smglom/set/&#x201C;requiremodules/mounted/lmh/MathHub/&#x201C;mhview@sigrepos/source/&#x201C;mhview@sigpath.texif@langfiles</p>
</div><omdoc:view from="views@setcartprod@from" to="views@setcartprod@to" xml:id="setcartprod.en">
<div xmlns="http://www.w3.org/1999/xhtml" id="setcartprod.en.p1" class="ltx_para">
<p id="setcartprod.en.p1.p1" class="ltx_p" about="#setcartprod.en.p1.p1">We can interpret any set <om:OMOBJ stex:srcref="smglom/sets/source/setcartprod.en.tex#textrange(from=2;23,to=3;30)"><om:OMV name="&#x1D434;"/></om:OMOBJ> as an one-dimensional
<omdoc:term cd="cartesian-space" name="Cartesian-space" xml:id="setcartprod.en.p1.p1.term2" about="#setcartprod.en.p1.p1.term2" stex:srcref="smglom/sets/source/setcartprod.en.tex#textrange(from=3;33,to=4;44)">Cartesian space</omdoc:term>, if we interpret <om:OMOBJ stex:srcref="smglom/sets/source/setcartprod.en.tex#textrange(from=3;8,to=4;74)"><om:OMA><om:OMS cd="arithmetics" name="multiplication"/><om:OMV name="\inset"/><om:OMV name="&#x1D44E;"/><om:OMV name="&#x1D434;"/></om:OMA></om:OMOBJ> as
<om:OMOBJ stex:srcref="smglom/sets/source/setcartprod.en.tex#textrange(from=4;22,to=5;30)"><om:OMA><om:OMS cd="arithmetics" name="multiplication"/><om:OMV name="\inset"/><om:OMV name="\tup"/><om:OMV name="&#x1D44E;"/><om:OMA><om:OMS cd="latexml" name="nCartSpace"/><om:OMV name="&#x1D434;"/><om:OMI>1</om:OMI></om:OMA></om:OMA></om:OMOBJ>.</p>
</div></omdoc:view><omdoc:bibliography files="local" xml:id="omdoc1.bibliography3" about="#omdoc1.bibliography3" stex:srcref="smglom/sets/source/setcartprod.en.tex#textrange(from=2;0,to=2;20)"/><omdoc:index xml:id="omdoc1.index4" about="#omdoc1.index4" stex:srcref="smglom/sets/source/setcartprod.en.tex#textrange(from=3;1,to=3;12)"/></omdoc>

without the need to provide latexml with the loading paths instead we store the loading info in the signature and retrieve this information when needed.