8000 Minipages ignored when converting from LaTeX · Issue #10266 · jgm/pandoc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Minipages ignored when converting from LaTeX #10266
Closed
@iykdw

Description

@iykdw

Explain the problem.
Given the MWE input file

\begin{document}
\begin{center}
	\begin{minipage}{0.5\textwidth}
		\indent The logarithm of a particular exponent can be thought of as "undoing" the exponential. For some $a$ and $b$ where $a>0$ and $b>0$, $a^x=b$ if and only if $\log_a(b)=x$. This number $x$ is called the logarithm of $b$ to base $a$.
		\indent $y=e^x$ is the inverse of $\ln y = x$. Thus, if $y=5e^{4x-1}$, $x=0.25(\ln (0.2y)+1)$.
	\end{minipage}
	\begin{minipage}{0.45\textwidth}
		\begin{align*}
			y=2^x    & \leftrightarrow & \log_{2}y  = x \\
			y=3^x    & \leftrightarrow & \log_{3}y = x  \\
			y = 10^x & \leftrightarrow & \log_{10}y = x \\
			         &                 & \log y = x     \\
			y = e^x  & \leftrightarrow & \log_e y = x   \\
			         &                 & \ln y = x
		\end{align*}
	\end{minipage}
\end{center}
\end{document}

and the command pandoc -s -t native test.tex, the output generated seems to completely ignore the minipage environment:

  Meta { unMeta = fromList [] }
  [ Div
      ( "" , [ "center" ] , [] )
      [ Para
          [ Str "The"
          , Space
          , Str "logarithm"
          , Space
          , Str "of"
          , Space
          , Str "a"
          , Space
          , Str "particular"
          , Space
          , Str "exponent"
          , Space
          , Str "can"
          , Space
          , Str "be"
          , Space
          , Str "thought"
          , Space
          , Str "of"
          , Space
          , Str "as"
          , Space
          , Str "\"undoing\""
          , Space
          , Str "the"
          , Space
          , Str "exponential."
          , Space
          , Str "For"
          , Space
          , Str "some"
          , Space
          , Math InlineMath "a"
          , Space
          , Str "and"
          , Space
          , Math InlineMath "b"
          , Space
          , Str "where"
          , Space
          , Math InlineMath "a>0"
          , Space
          , Str "and"
          , Space
          , Math InlineMath "b>0"
          , Str ","
          , Space
          , Math InlineMath "a^x=b"
          , Space
          , Str "if"
          , Space
          , Str "and"
          , Space
          , Str "only"
          , Space
          , Str "if"
          , Space
          , Math InlineMath "\\log_a(b)=x"
          , Str "."
          , Space
          , Str "This"
          , Space
          , Str "number"
          , Space
          , Math InlineMath "x"
          , Space
          , Str "is"
          , Space
          , Str "called"
          , Space
          , Str "the"
          , Space
          , Str "logarithm"
          , Space
          , Str "of"
          , Space
          , Math InlineMath "b"
          , Space
          , Str "to"
          , Space
          , Str "base"
          , Space
          , Math InlineMath "a"
          , Str "."
          ]
      , Para
          [ Math InlineMath "y=e^x"
          , Space
          , Str "is"
          , Space
          , Str "the"
          , Space
          , Str "inverse"
          , Space
          , Str "of"
          , Space
          , Math InlineMath "\\ln y = x"
          , Str "."
          , Space
          , Str "Thus,"
          , Space
          , Str "if"
          , Space
          , Math InlineMath "y=5e^{4x-1}"
          , Str ","
          , Space
          , Math InlineMath "x=0.25(\\ln (0.2y)+1)"
          , Str "."
          ]
      , Para
          [ Math
              DisplayMath
              "\\begin{aligned}\n            y=2^x    & \\leftrightarrow & \\log_{2}y  = x \\\\\n            y=3^x    & \\leftrightarrow & \\log_{3}y = x  \\\\\n            y = 10^x & \\leftrightarrow & \\log_{10}y = x \\\\\n                     &                 & \\log y = x     \\\\\n            y = e^x  & \\leftrightarrow & \\log_e y = x   \\\\\n                     &                 & \\ln y = x\n        \n\\end{aligned}"
          ]
      ]
  ]

This then becomes an issue for layout when converting to other formats. I would expect to see something like

...
[ Div
      ( "" , [ "center" ] , [] )
     [Div
        ("", ["minipage"], [])
          [ Para
              [ Str "The"
              , Space
              , Str "logarithm"
              , Space
...

Pandoc version?
pandoc -v reports

pandoc 3.4
Features: +server +lua
Scripting engine: Lua 5.4

on MacOS Sonoma 14.3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0