Skip to content

Conversion of LaTeX multicols env to Markdown results in content loss #10832

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

Open
sommio opened this issue May 10, 2025 · 1 comment
Open

Conversion of LaTeX multicols env to Markdown results in content loss #10832

sommio opened this issue May 10, 2025 · 1 comment
Labels

Comments

@sommio
Copy link

sommio commented May 10, 2025

  • OS: Arch Linux
  • Pandoc 3.1.12.1
  • Lua 5.4

My latex code

\begin{enumerate}
    \begin{multicols}{2}
        \item $\frac{8 x^{5} y^{7}}{-12 x^{3} y^{2}}$
        \item $\frac{32 p^{4} q^{3}}{16 p^{3} q^{4}}$
        \item  $\frac{-6 a^{2} b^{4}}{-3 a^{4} b^{5}}$
        \item  $\frac{15 m^{3} n^{4}(a+b)^{3}}{18 m^{2} n^{3}(a+b)^{4}}$
        \item  $\frac{2(3 x-2 y)}{3(2 y-3 x)}$
        \item  $\frac{-a b(x+y)^{3}(x-y)}{b(x+y)^{2}(y-x)^{2}}$
        \item  $\frac{3 a(x-y)^{3}}{15(y-x)^{3}}$
        \item  $\frac{(a-b)(b-c)(c-a)}{(b-a)(a-c)(c-b)}$
    \end{multicols}
    \item $\frac{-(x+y-z)(x-y+z)(x-y-z)}{(y+z-x)(y-z+x)(y-z-x)}$
    \begin{multicols}{2}
        \item  $\frac{x^{2}-y^{2}}{x^{2}-2 x y+y^{2}}$
        \item  $\frac{1-x^{3}}{x^{2}-1}$
        \item  $\frac{x^{2}+9 x+14}{x^{2}+8 x+7}$,
        \item  $\frac{9 a^{4}-1}{6 a^{2} b^{2}+2 b^{2}}$
        \item  $\frac{a^{2}+b^{2}-c^{2}+2 a b}{a^{2}-b^{2}+c^{2}-2 a c}$
        \item  $\frac{1+3 a^{2}-3 a-a^{3}}{\left(a^{2}-2 a+1\right)\left(2 a^{2}-3 a+1\right)}$
        \item  $\frac{6 x^{3}+11 x^{2}-x-6}{12 x^{3}-8 x^{2}-27 x+18}$
        \item  $\frac{x^{4}-2 x^{2}-3 x-2}{2 x^{4}-4 x^{3}+2 x-4}$
        \item  $\frac{x^{3}+x^{2}-5 x-2}{x^{3}+2 x^{2}-2 x-1}$
    \end{multicols}
\end{enumerate}

My cli

pandoc -s in.tex -o out.md

Out markdown

1.  $\frac{-(x+y-z)(x-y+z)(x-y-z)}{(y+z-x)(y-z+x)(y-z-x)}$
@sommio sommio added the bug label May 10, 2025
@jgm
Copy link
Owner

jgm commented May 10, 2025

I had no idea you could do that with a multicols inside an enumerate environment!

In any case, pandoc's parser expects \items inside a list environment and ignores everything else.

We could probably special case this and look for items inside a multicols if one is present.

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