KWARC / LaTeXML

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

symvariant problem (association of renderings) #4

Closed kohlhase closed 9 years ago

kohlhase commented 9 years ago

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>&#x22C5;</m:mo>
          <m:mo stretchy="false">|</m:mo>
        </m:mrow>
      </omdoc:rendering>
      <omdoc:rendering ic="variant:double">
        <m:mrow>
          <m:mo>&#x2225;</m:mo>
          <m:mo>&#x22C5;</m:mo>
          <m:mo>&#x2225;</m:mo>
        </m:mrow>
      </omdoc:rendering>
      <omdoc:rendering ic="variant:double">
        <m:mo cr="fun">&#x2225;</m:mo>
        <omdoc:render name="arg1" precedence="neginfty"/>
        <m:mo cr="fun">&#x2225;</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.

dginev commented 9 years ago

Shouldn't this issue be in the sTeX Trac? The KWARC/LaTeXML trac is in itself a weird place to put issues, since so far the only uses specific to the KWARC/LaTeXML fork are sTeX-specific.

kohlhase commented 9 years ago

you are completely right, my bad.

kohlhase commented 9 years ago

moved to https://github.com/KWARC/sTeX/issues/65