Closed rgieseke closed 3 years ago
The following seems to work
<xsl:template match="ltx:theorem/ltx:title">
<title>
<xsl:apply-templates select="@*|node()"/>
</title>
</xsl:template>
<xsl:template match="ltx:title[@class='ltx_runin']/ltx:tag">
<xsl:apply-templates select="@*|node()"/>
</xsl:template>
Gives (including a bold elem):
<statement id="Thmtheoremx1">
<title><bold>My theorem</bold>.</title>
Is there anything in JATS specifically to distinguish the reference number of a section or theorem (ltx:tag
) from the title proper? For example in "1. Introduction", should the "1" be wrapped or marked up separately? The current code throws away the reference number; and your "My Theorem", for better or worse, ends up considered to be a reference number, and so also gets omitted.
If not, I have a patch that includes the ltx:tag
in the title. I don't think you really want to single out ltx_runin
, that's really just formatting/styling. But the patch also now includes the number in section headings as well. Which I actually suspect is what you want.
It doesn't seem like it, the example in the JATS tag library looks like
<p>Industrial buyers categorise foreign countries
according to their level of technological achievement
and subsequently differentiate their perceptions of
these countries accordingly. ... The following
hypothesis is posited:
<statement><label>Hypothesis 1</label>
<p>Buyer preferences for companies are influenced
by factors extrinsic to the firm attributable to, and
determined by, country-of-origin effects.</p>
</statement>
</p>
https://jats.nlm.nih.gov/publishing/tag-library/1.2/element/statement.html
It kind of seems that label
and title
are not clearly distinguished.
The id Document Internal Identifier
could probably contain information about a numerical value.
Not sure about whether there is any good way to wrap it somehow as suggested by @dginev
https://github.com/brucemiller/LaTeXML/pull/1516#pullrequestreview-638231948)
I don't think you really want to single out ltx_runin Yeah, that was just the first workaround i could get work ... i've tested your patch in #1516, works well!
When i convert a theorem to JATS-XML the title is not appearing in the XML.
For a theorem environment defined like
test.tex
I get with
latexml test.tex
:When i convert to JATS-XML with
latexmlc test.tex --dest=test.jats.xml --pmml --stylesheet=LaTeXML-jats.xsl
:It seems the conversion should happen here, but is not picking up the title: