brucemiller / LaTeXML

LaTeXML: a TeX and LaTeX to XML/HTML/ePub/MathML translator.
http://dlmf.nist.gov/LaTeXML/
Other
857 stars 92 forks source link

JATS: <inline-graphic> not output into JATS #2350

Open castedo opened 1 month ago

castedo commented 1 month ago

REPO STEPS: With doc.tex.txt:

latexmlc --format=jats doc.tex.txt

GOT:

<article>
...
    <fig id="S0.F1">
      <caption>
        <p>The foo.</p>
      </caption>
      <graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="foo.png"/>
    </fig>
    <fig id="S0.F2">
      <caption>
        <p>Some inline bars.</p>
      </caption>
      <p><graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="bar0.png"/>
<graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="bar1.png"/>
<graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="bar2.png"/></p>
    </fig>
...

EXPECTED:

<article xmlns:xlink="http://www.w3.org/1999/xlink">
...
    <fig id="S0.F1">
      <caption>
        <p>The foo.</p>
      </caption>
      <graphic xlink:href="foo.png"/>
    </fig>
    <fig id="S0.F2">
      <caption>
        <p>Some inline bars.</p>
      </caption>
      <p><inline-graphic xlink:href="bar0.png"/>
<inline-graphic xlink:href="bar1.png"/>
<inline-graphic xlink:href="bar2.png"/></p>
    </fig>
...

NOTES: In other words, when \includegraphics is used in an text mode, then <include-graphic> should appear in JATS. This difference is based on the LaTeX of https://github.com/castedo/ten-years-challenge-pulsed-drive and how Pandoc converts it to JATS.

The xmlns:xlink= expectation difference is just me whining :smile:.