Last active
August 29, 2015 14:07
-
-
Save pkra/db08cf423cc1a5aa8eb7 to your computer and use it in GitHub Desktop.
Lens: JATS sample for math-related issues.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD with MathML3 v1.1d1 20130915//EN" "JATS-archivearticle1-mathml3.dtd"> | |
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="en" dtd-version="1.1d1"> | |
<front> | |
<journal-meta> | |
<publisher> | |
<publisher-name>American Mathematical Society</publisher-name> | |
</publisher> | |
</journal-meta> | |
<article-meta> | |
<article-categories> | |
<subj-group subj-group-type="display-channel"> | |
<subject>Research article</subject> | |
</subj-group> | |
</article-categories> | |
<title-group> | |
<article-title>Mathematical article with lots of | |
<inline-formula content-type="math/tex"> | |
<tex-math>{\mathbb N}^2 \times \mathbb {R}</tex-math> | |
</inline-formula> | |
equations. | |
</article-title> | |
</title-group> | |
<contrib-group> | |
<contrib contrib-type="author"> | |
<name name-style="western"> | |
<given-names>Mathy McAuthorsen</given-names> | |
</name> | |
</contrib> | |
<aff>Institute for Advanced Webby Math</aff> | |
</contrib-group> | |
<abstract> | |
<title>Abstract</title> | |
<p>In this minimal example we explore issues with math in Lens | |
</p> | |
</abstract> | |
</article-meta> | |
</front> | |
<body> | |
<sec id="ltxid1" disp-level="section"> | |
<title>Titles with math are cut off at the first | |
<inline-formula content-type="math/tex"> | |
<tex-math>{\mathbb N}^2 \times {\mathbb R}</tex-math> | |
</inline-formula> equation. | |
</title> | |
<p>The title should read: | |
<br/> Titles with math are cut off at the first | |
<inline-formula content-type="math/tex"> | |
<tex-math>{\mathbb N}^2 \times {\mathbb R}</tex-math> | |
</inline-formula> equation.</p> | |
<p> | |
<bold>Whitespace around math</bold> | |
<br /> Whitespace is missing | |
<inline-formula content-type="math/tex"> | |
<tex-math>{\mathbb N}^2 \times \mathbb {R}</tex-math> | |
</inline-formula> after inline equations (when appropriate) but is forced in front of an equation, e.g., in parenthesis ( | |
<inline-formula content-type="math/tex"> | |
<tex-math>f(0)=0</tex-math> | |
</inline-formula>), even when inappropriate. | |
</p> | |
<p> | |
<bold>Math in figures</bold> | |
<br /> See | |
<xref ref-type="fig" rid="fig1">Figure 1A</xref> | |
</p> | |
<fig id="fig1" position="float"> | |
<label>Figure label without math rendering | |
<inline-formula content-type="math/tex"> | |
<tex-math>{\mathbb N}^2 \times {\mathbb R}.</tex-math> | |
</inline-formula> | |
</label> | |
<caption> | |
<title>Titles with math are not cut off at the first | |
<inline-formula content-type="math/tex"> | |
<tex-math>{\mathbb N}^2 \times {\mathbb R}.</tex-math> | |
</inline-formula> equation.</title> | |
<p> | |
<inline-formula content-type="math/tex"> | |
<tex-math>{\mathbb N}^2 \times {\mathbb R}.</tex-math> | |
</inline-formula> | |
</p> | |
</caption> | |
<graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://upload.wikimedia.org/wikipedia/commons/0/00/Equation_of_time.png" /> | |
</fig> | |
<p> | |
<bold>Math in references</bold> | |
<br /> See [ | |
<xref rid="AEG0" ref-type="bibr">AEG0</xref>]. | |
</p> | |
<p> | |
<bold> References to equations do not work</bold> | |
<br /> E.g., | |
<disp-formula content-type="math/tex"> | |
<tex-math>\begin{equation} \frac {\partial S_r}{\partial s}= L_{r-1}(f_s)+ f_s(S_1S_r-(r+1)S_{r+1})+f_s tr(T_{r-1} \overline {R}_N)+E^T_s(S_r), \tag{3}\cssId{derivata.elbert}{} \end{equation} | |
</tex-math> | |
</disp-formula> | |
Then refer to its ID, say ( | |
<xref rid="derivata.elbert">3</xref>).(The MathML equivalent also does not work; it's commented out below.) | |
<!-- <disp-formula> | |
<mml:math> | |
<mml:mtable> | |
<mml:mlabeledtr> | |
<mml:mtd id="mjx-eqn-3"> | |
<mml:mtext>(3)</mml:mtext> | |
</mml:mtd> | |
<mml:mtd> | |
<mml:mfrac> | |
<mml:mrow> | |
<mml:mi mathvariant="normal">∂</mml:mi> | |
<mml:msub> | |
<mml:mi>S</mml:mi> | |
<mml:mi>r</mml:mi> | |
</mml:msub> | |
</mml:mrow> | |
<mml:mrow> | |
<mml:mi mathvariant="normal">∂</mml:mi> | |
<mml:mi>s</mml:mi> | |
</mml:mrow> | |
</mml:mfrac> | |
<mml:mo>=</mml:mo> | |
<mml:msub> | |
<mml:mi>L</mml:mi> | |
<mml:mrow class="MJX-TeXAtom-ORD"> | |
<mml:mi>r</mml:mi> | |
<mml:mo>−</mml:mo> | |
<mml:mn>1</mml:mn> | |
</mml:mrow> | |
</mml:msub> | |
<mml:mo stretchy="false">(</mml:mo> | |
<mml:msub> | |
<mml:mi>f</mml:mi> | |
<mml:mi>s</mml:mi> | |
</mml:msub> | |
<mml:mo stretchy="false">)</mml:mo> | |
<mml:mo>+</mml:mo> | |
<mml:msub> | |
<mml:mi>f</mml:mi> | |
<mml:mi>s</mml:mi> | |
</mml:msub> | |
<mml:mo stretchy="false">(</mml:mo> | |
<mml:msub> | |
<mml:mi>S</mml:mi> | |
<mml:mn>1</mml:mn> | |
</mml:msub> | |
<mml:msub> | |
<mml:mi>S</mml:mi> | |
<mml:mi>r</mml:mi> | |
</mml:msub> | |
<mml:mo>−</mml:mo> | |
<mml:mo stretchy="false">(</mml:mo> | |
<mml:mi>r</mml:mi> | |
<mml:mo>+</mml:mo> | |
<mml:mn>1</mml:mn> | |
<mml:mo stretchy="false">)</mml:mo> | |
<mml:msub> | |
<mml:mi>S</mml:mi> | |
<mml:mrow class="MJX-TeXAtom-ORD"> | |
<mml:mi>r</mml:mi> | |
<mml:mo>+</mml:mo> | |
<mml:mn>1</mml:mn> | |
</mml:mrow> | |
</mml:msub> | |
<mml:mo stretchy="false">)</mml:mo> | |
<mml:mo>+</mml:mo> | |
<mml:msub> | |
<mml:mi>f</mml:mi> | |
<mml:mi>s</mml:mi> | |
</mml:msub> | |
<mml:mi>t</mml:mi> | |
<mml:mi>r</mml:mi> | |
<mml:mo stretchy="false">(</mml:mo> | |
<mml:msub> | |
<mml:mi>T</mml:mi> | |
<mml:mrow class="MJX-TeXAtom-ORD"> | |
<mml:mi>r</mml:mi> | |
<mml:mo>−</mml:mo> | |
<mml:mn>1</mml:mn> | |
</mml:mrow> | |
</mml:msub> | |
<mml:msub> | |
<mml:mover> | |
<mml:mi>R</mml:mi> | |
<mml:mo accent="false">¯</mml:mo> | |
</mml:mover> | |
<mml:mi>N</mml:mi> | |
</mml:msub> | |
<mml:mo stretchy="false">)</mml:mo> | |
<mml:mo>+</mml:mo> | |
<mml:msubsup> | |
<mml:mi>E</mml:mi> | |
<mml:mi>s</mml:mi> | |
<mml:mi>T</mml:mi> | |
</mml:msubsup> | |
<mml:mo stretchy="false">(</mml:mo> | |
<mml:msub> | |
<mml:mi>S</mml:mi> | |
<mml:mi>r</mml:mi> | |
</mml:msub> | |
<mml:mo stretchy="false">)</mml:mo> | |
<mml:mo>,</mml:mo> | |
<mml:mrow id="derivata.elbert" /> | |
</mml:mtd> | |
</mml:mlabeledtr> | |
</mml:mtable> | |
</mml:math> | |
</disp-formula>--> | |
</p> | |
<p> | |
<bold>Lens picks the first child of an equation element</bold> | |
<br /> Ideally, Lens could choose client dependent, e.g., on old or mobile browsers use fallback image. Alternatively, this could be done by MathJax but that would require coding everything into annotation-xml elements. | |
</p> | |
<p> | |
<bold>MathJax timinig problems</bold> | |
<br /> Erratically, MathJax output is tripped up. Maybe a race of Lens vs MathJax or a display:none problem | |
</p> | |
</sec> | |
<sec id="ltxid25" disp-level="section"> | |
<title>References</title> | |
<ref-list> | |
<ref id="AEG0"> | |
<label>[1]</label> | |
<mixed-citation> | |
<person-group person-group-type="author"> | |
<name name-style="western"> | |
<surname>McAutherson</surname> | |
<given-names>Mathy</given-names> | |
</name> | |
</person-group>, | |
<article-title>A reference with | |
<inline-formula content-type="math/tex"> | |
<tex-math>\mathbb {N}^2\times \mathbb {R}</tex-math> | |
</inline-formula> | |
inline math. | |
</article-title> | |
<source>Web J. Math.</source> | |
<volume>1</volume> | |
<issue>2</issue> | |
<fpage>3</fpage> | |
<lpage>4</lpage> MR | |
<ext-link xlink:href="http://www.ams.org/mathscinet-getitem?mr=00001">00001</ext-link> | |
</mixed-citation> | |
</ref> | |
</ref-list> | |
</sec> | |
</body> | |
</article> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment