Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'mathml'-option messing up sub- and superscripts in specific situations #134

Open
iabarus opened this issue Sep 1, 2023 · 1 comment
Open

Comments

@iabarus
Copy link

iabarus commented Sep 1, 2023

LaTeX

Example 1:

\documentclass[10pt]{article}
\usepackage{mathtools}

\begin{document}
\begin{equation*}
  \bigcap E_n^c
\end{equation*}
\end{document}

Example 2:

This works:
\begin{equation*}
  \begin{bmatrix}
    X_1^{1}\\
    \vdots\\
    X_1^{n}
  \end{bmatrix}
\end{equation*}
This does not:
\begin{equation*}
  \det\begin{bmatrix}
        X_1^{1}\\
        \vdots\\
        X_1^{n}
      \end{bmatrix}
    \end{equation*}

make4ht

make4ht file.tex 'mathml,mathjax'

Desired output

via make4ht file.tex 'mathjax'
image

Erroneous output

image
image

@iabarus iabarus changed the title 'mathml'-option messing up sub- and superscripts when used with \bigcap 'mathml'-option messing up sub- and superscripts in specific situations Sep 3, 2023
@michal-h21
Copy link
Owner

This issue is a bit complicated because it is also related, for example, to \sum or \int, which use a similar mechanism, and I don't know how to differentiate these cases:

\documentclass[10pt]{article}
%\usepackage{mathtools}
\usepackage{amsmath}

\begin{document}
\begin{equation*}
  \bigcap E_n^c\\
  \bigcup E_n^c\\
  \bigodot E_n^c\\
  \bigoplus E_n^c\\
  \bigotimes E_n^c\\
  \bigsqcup E_n^c\\
\biguplus E_n^c\\
\bigvee E_n^c\\
\bigwedge E_n^c\\
\coprod E_n^c\\
\intop E_n^c\\
\ointop E_n^c\\
\prod E_n^c\\
\sum E_n^c\\
\end{equation*}

$
  \bigcap E_n^c\\
  \bigcup E_n^c\\
  \bigodot E_n^c\\
  \bigoplus E_n^c\\
  \bigotimes E_n^c\\
  \bigsqcup E_n^c\\
$

\begin{equation*}
  E_n^c
\end{equation*}

This works:
\begin{equation*}
  \begin{bmatrix}
    X_1^{1}\\
    \vdots\\
    X_1^{n}
  \end{bmatrix}
\end{equation*}
This does not:
\begin{equation*}
  \det\begin{bmatrix}
    X_1^{1}\\
    \vdots\\
    X_1^{n}
  \end{bmatrix}
\end{equation*}

$\det_{\rm sub}$

Integral \(\int_{a}^{b} x^2 \,dx\) inside text

\[ \int_{a}^{b} x^2 \,dx \]

\[
  \oint_V f(s) \,ds
\]

Sum $\sum_{n=1}^{\infty} 2^{-n} = 1$ inside text  Example of sum expression inside text

\[ \sum_{n=1}^{\infty} 2^{-n} = 1 \]

Product $\prod_{i=a}^{b} f(i)$ inside text

\[ \bigwedge_{i=a}^{b} f(i) \]

\end{document}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants