xsweet merge requestshttps://gitlab.coko.foundation/cokoapps/xsweet/-/merge_requests2024-03-21T12:34:43Zhttps://gitlab.coko.foundation/cokoapps/xsweet/-/merge_requests/6fix(service): math-display not wrapped in p2024-03-21T12:34:43ZDan Viselfix(service): math-display not wrapped in pThis a tiny change to the math-fixing routine behind the `useMath` flag. Basically, what we were getting back from XSweet when there was a display equation was this:
```plaintext
<p><math-display>[equation]</math-display></p>
```
The p...This a tiny change to the math-fixing routine behind the `useMath` flag. Basically, what we were getting back from XSweet when there was a display equation was this:
```plaintext
<p><math-display>[equation]</math-display></p>
```
The problem with this is when it hits Wax, which sees `math-display` as a block-level element that can't go inside a `p` so it's thrown away, and what comes out is this:
```plaintext
<p>[equation]</p>
```
The LaTeX of the equation is correct, and if you type a "$$ " before it, it turns into a display equation. But this fix modifies what's coming out of XSweet to this:
```plaintext
<math-display>[equation]</math-display>
```
which goes into Wax without any trouble.https://gitlab.coko.foundation/cokoapps/xsweet/-/merge_requests/9Mathtype refinements2024-03-20T10:19:47ZDan ViselMathtype refinementsThis changes the MathType processing code to deal with inline equations and edge situations found in a particular document from Amnet. Sometimes LaTeX was being exported that included inline MTEF XML, which contains positioning and color...This changes the MathType processing code to deal with inline equations and edge situations found in a particular document from Amnet. Sometimes LaTeX was being exported that included inline MTEF XML, which contains positioning and color data that can't be represented in vanilla LaTeX; this strips that out. This is not stripping out all XML tags (which might look very much like valid LaTeX); it only strips out the tags that were represented in that document. I've asked for more sample MathType documents to see how often this issue comes up, but haven't yet received them. This does post a warning if it does encounter something in LaTeX from Mathtype that looks like XML so that we can better diagnose this issue in the future.