Comments (2)
Here's the xml from typing into Word:
<m:oMathPara>
<m:oMath>
<m:d>
<m:dPr>
<m:ctrlPr>
<w:rPr>
<w:rFonts w:ascii="Cambria Math"
w:hAnsi="Cambria Math" />
<w:i />
</w:rPr>
</m:ctrlPr>
</m:dPr>
<m:e>
<m:nary>
<m:naryPr>
<m:chr m:val="∑" />
<m:limLoc m:val="undOvr" />
<m:supHide m:val="1" />
<m:ctrlPr>
<w:rPr>
<w:rFonts w:ascii="Cambria Math"
w:hAnsi="Cambria Math" />
<w:i />
</w:rPr>
</m:ctrlPr>
</m:naryPr>
<m:sub>
<m:r>
<w:rPr>
<w:rFonts w:ascii="Cambria Math"
w:hAnsi="Cambria Math" />
</w:rPr>
<m:t>x</m:t>
</m:r>
</m:sub>
<m:sup />
<m:e>
<m:r>
<w:rPr>
<w:rFonts w:ascii="Cambria Math"
w:hAnsi="Cambria Math" />
</w:rPr>
<m:t>x</m:t>
</m:r>
</m:e>
</m:nary>
</m:e>
</m:d>
<m:d>
<m:dPr>
<m:ctrlPr>
<w:rPr>
<w:rFonts w:ascii="Cambria Math"
w:hAnsi="Cambria Math" />
<w:i />
</w:rPr>
</m:ctrlPr>
</m:dPr>
<m:e>
<m:nary>
<m:naryPr>
<m:chr m:val="∑" />
<m:limLoc m:val="undOvr" />
<m:supHide m:val="1" />
<m:ctrlPr>
<w:rPr>
<w:rFonts w:ascii="Cambria Math"
w:hAnsi="Cambria Math" />
<w:i />
</w:rPr>
</m:ctrlPr>
</m:naryPr>
<m:sub>
<m:r>
<w:rPr>
<w:rFonts w:ascii="Cambria Math"
w:hAnsi="Cambria Math" />
</w:rPr>
<m:t>i</m:t>
</m:r>
</m:sub>
<m:sup />
<m:e>
<m:r>
<w:rPr>
<w:rFonts w:ascii="Cambria Math"
w:hAnsi="Cambria Math" />
</w:rPr>
<m:t>x</m:t>
</m:r>
</m:e>
</m:nary>
</m:e>
</m:d>
</m:oMath>
</m:oMathPara>
By comparison, here's the xml produced by pandoc:
<m:oMathPara>
<m:oMathParaPr>
<m:jc m:val="center" />
</m:oMathParaPr>
<m:oMath>
<m:d>
<m:dPr>
<m:begChr m:val="(" />
<m:endChr m:val=")" />
<m:grow />
</m:dPr>
<m:e>
<m:limLow>
<m:e>
<m:r>
<m:t>∑</m:t>
</m:r>
</m:e>
<m:lim>
<m:r>
<m:t>i</m:t>
</m:r>
</m:lim>
</m:limLow>
<m:sSub>
<m:e>
<m:r>
<m:t>x</m:t>
</m:r>
</m:e>
<m:sub>
<m:r>
<m:t>i</m:t>
</m:r>
</m:sub>
</m:sSub>
</m:e>
</m:d>
<m:nary>
<m:naryPr>
<m:chr m:val="∑" />
<m:limLoc m:val="undOvr" />
<m:subHide m:val="0" />
<m:supHide m:val="1" />
</m:naryPr>
<m:sub>
<m:r>
<m:t>i</m:t>
</m:r>
</m:sub>
<m:sup />
<m:e>
<m:sSub>
<m:e>
<m:r>
<m:t>x</m:t>
</m:r>
</m:e>
<m:sub>
<m:r>
<m:t>i</m:t>
</m:r>
</m:sub>
</m:sSub>
</m:e>
</m:nary>
</m:oMath>
</m:oMathPara>
from texmath.
I see what's happening. Look at the native output:
[EDelimited "(" ")" [Right (EUnder True (ESymbol Op "\8721") (EIdentifier "i")),Right (ESub (EIdentifier "x") (EIdentifier "i"))],EUnder True (ESymbol Op "\8721") (EIdentifier "i"),ESub (EIdentifier "x") (EIdentifier "i")]
In the OMML writer, we do a preliminary transformation to convert selected EUnder, EUnderOver, etc. into nary:
everywhere (mkT $ handleDownup dt)
where
handleDownUp :: DisplayType -> [Exp] -> [Exp]
This gets the second EUnder but not the first one, since the first one is in an EDelimited context where each non-delimiter element has the Right constructor.
The whole thing is pretty ugly, there must be a better way1
from texmath.
Related Issues (20)
- $\underbrace{x}_{y}$ from LaTeX to typst
- mathml vector - typeset error HOT 1
- texmath converts $s_n$ to $space_n$ from LaTeX to Typst HOT 1
- MathML <mo> created for each adjacent Rel symbol HOT 5
- texmath-0.12.8 testsuite failure in Nightly HOT 3
- Feature request: color
- Installing `texmath` binary as dependency in Nix project HOT 2
- how to run server HOT 2
- Wrong equation conversion from docx HOT 4
- pandoc cannot convert latex formula containing "*{20}{l}" HOT 1
- Recognise `\allowbreak` in TeX input
- texmath converts $\ddot{q}$ to $q^(̈)$ from LaTeX to Typst HOT 3
- Use Unicode in Typst HOT 5
- Do not use extra lr in typst writer HOT 2
- Minus for subtraction and minus for negative numbers not differentiated in default HTML math output HOT 5
- Pandoc cannot recognize some uppercase Greek letters and lowercase omicron HOT 8
- Math not correctly converted to typst: `\mathbf` should be bold and upright but is only bold
- Regarding issues with converting Markdown using Pandoc.
- Converting left/right math functions to Typst and docx HOT 7
- Writing primes ′ in Typst HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from texmath.