gjtorikian / mtex2MML

A Bison grammar to convert TeX math into MathML.
23 stars 14 forks source link

Incorrect output from `\underline{}` #73

Open edward-encoord opened 2 years ago

edward-encoord commented 2 years ago

Thanks for this great tool.

I'm using AsciiDoctor Mathematical (it uses this tool), and \underline{} cannot be correctly displayed:

image

They are shown correctly in mathjax:

image

I'm wondering if I did something wrong and if I should ask the AsciiDoctor team for help.

gjtorikian commented 2 years ago

Could you please provide the LaTeX sequence for that equation? This is probably the right repo, and it might be a bug.

edward-encoord commented 2 years ago

Thanks for the reply. Here is the code I used in an AsciiDoc file:

[latexmath]
++++
\begin{aligned}
  \left[ \begin{array}{l}
    \overline{S}_\text{fr} \\
    \overline{S}_\text{to}
  \end{array} \right]
  = \left[ \begin{array}{l}
      \overline{V}_\text{fr} \\
      \overline{V}_\text{to}
    \end{array} \right]
    \odot \left(
      \underset{\overline{\quad}}{\boldsymbol{Y}}
      \, \left[ \begin{array}{l}
        \underset{\overline{\quad}}{V}_\text{fr} \\
        \underset{\overline{\quad}}{V}_\text{to}
      \end{array} \right]
    \right)
\end{aligned}
++++

I'm using AsciiDoctor PDF in asciidoctor/docker-asciidoctor:

bash-5.1# asciidoctor-pdf -v
Asciidoctor PDF 1.6.2 using Asciidoctor 2.0.17 [https://asciidoctor.org]
Runtime Environment (ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x86_64-linux-musl]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)
edward-encoord commented 2 years ago

I posted the wrong code. That was my revised version. Sorry for that.

Here is the one with \underline{}:

[latexmath]
++++
\begin{aligned}
  \left[ \begin{array}{l}
    \overline{S}_\text{fr} \\
    \overline{S}_\text{to}
  \end{array} \right]
  = \left[ \begin{array}{l}
      \overline{V}_\text{fr} \\
      \overline{V}_\text{to}
    \end{array} \right]
    \odot \left(
      \underline{\boldsymbol{Y}}
      \, \left[ \begin{array}{l}
        \underline{V}_\text{fr} \\
        \underline{V}_\text{to}
      \end{array} \right]
    \right)
\end{aligned}
++++