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

Latex math environment flalign not converted to markdown math #9679

Closed
asmaier opened this issue Apr 21, 2024 · 3 comments
Closed

Latex math environment flalign not converted to markdown math #9679

asmaier opened this issue Apr 21, 2024 · 3 comments
Labels

Comments

@asmaier
Copy link

asmaier commented Apr 21, 2024

Explain the problem.

When trying to convert the following example LaTex file test.tex :

\documentclass[12pt,a4paper,twoside]{book}
\usepackage[intlimits]{amsmath}	
\begin{document}
% examples taken from amsmath user guide
\begin{equation*}
a=b
\end{equation*}

\begin{equation}
a=b
\end{equation}

\begin{equation}\label{xx}
\begin{split}
a& =b+c-d\\
& \quad +e-f\\
& =g+h\\
& =i
\end{split}
\end{equation}

\begin{multline}
a+b+c+d+e+f\\
+i+j+k+l+m+n
\end{multline}

\begin{gather}
a_1=b_1+c_1\\
a_2=b_2+c_2-d_2+e_2
\end{gather}

\begin{align}
a_{11}& =b_{11}&
a_{12}& =b_{12}\\
a_{21}& =b_{21}&
a_{22}& =b_{22}+c_{22}
\end{align}

\begin{flalign*}
a_{11} + b_{11}& = c_{11}&
a_{12}& =b_{12}\\
b_{21}& = c_{21}&
a_{22}& =b_{22}+c_{22}
\end{flalign*}
\end{document}

via

pandoc --wrap=preserve -s -t markdown -f latex -o test.md test.tex

I get the following result

$$a=b$$

$$a=b$$

$$\label{xx}
\begin{split}
a& =b+c-d\\
& \quad +e-f\\
& =g+h\\
& =i
\end{split}$$

$$\begin{gathered}
a+b+c+d+e+f\\
+i+j+k+l+m+n
\end{gathered}$$

$$\begin{gathered}
a_1=b_1+c_1\\
a_2=b_2+c_2-d_2+e_2
\end{gathered}$$

$$\begin{aligned}
a_{11}& =b_{11}&
a_{12}& =b_{12}\\
a_{21}& =b_{21}&
a_{22}& =b_{22}+c_{22}
\end{aligned}$$

::: flalign*
a\_11 + b\_11& = c\_11&
a\_12& =b\_12\
b\_21& = c\_21&
a\_22& =b\_22+c\_22
:::

Curiously all amsmath environments are converted to markdown math except for flalign .
I think flalign should also be converted to a math environment in markdown.

Pandoc version?
I'm using pandoc 3.1.13 on Mac OS Sonoma 14.3.1 .

@asmaier asmaier added the bug label Apr 21, 2024
@asmaier asmaier changed the title Latex math environment falign not converted to markdown math Latex math environment flalign not converted to markdown math Apr 21, 2024
@jgm
Copy link
Owner

jgm commented Apr 21, 2024

What would be the proper fallback for this within math mode?
aligned?

@asmaier
Copy link
Author

asmaier commented Apr 23, 2024

Yes, I believe that is probably the best solution for now.

@jgm jgm closed this as completed in 6578dcd Apr 23, 2024
@asmaier
Copy link
Author

asmaier commented Apr 25, 2024

Thank you.

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

No branches or pull requests

2 participants