jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.03k stars 3.35k forks source link

Minipage inline latex is split over multiple lines #690

Closed ahcox closed 10 years ago

ahcox commented 11 years ago

For \minipage, newlines matter. pandoc is adding newlines that break \minipage. E.g., this:

    \noindent
    \begin{minipage}[t]{0.49\linewidth} Column 1 text in here.  \end{minipage} \begin{minipage}[t]{0.49\linewidth} Column 2 text in here \end{minipage}

is turned into this:

    \noindent

    \begin{minipage}[t]{0.49\linewidth} Column 1 text in here.  \end{minipage}

    \begin{minipage}[t]{0.49\linewidth} Column 2 text in here \end{minipage}

Which doesn't produce a side-by-side layout.

Ubuntu 12.10, 64bit, version:

pandoc --version
pandoc 1.9.4.2
Compiled with citeproc-hs 0.3.4, texmath 0.6.0.6, highlighting-kate 0.5.1.
Syntax highlighting is supported for the following languages:
    Actionscript, Ada, Alert, Alert_indent, Apache, Asn1, Asp, Awk, Bash,
    Bibtex, Boo, C, Changelog, Clojure, Cmake, Coffeescript, Coldfusion,
    Commonlisp, Cpp, Cs, Css, D, Diff, Djangotemplate, Doxygen, Dtd, Eiffel,
    Email, Erlang, Fortran, Fsharp, Gnuassembler, Go, Haskell, Haxe, Html, Ini,
    Java, Javadoc, Javascript, Json, Jsp, Latex, Lex, LiterateHaskell, Lua,
    Makefile, Mandoc, Matlab, Maxima, Metafont, Mips, Modula2, Modula3,
    Monobasic, Nasm, Noweb, Objectivec, Objectivecpp, Ocaml, Octave, Pascal,
    Perl, Php, Pike, Postscript, Prolog, Python, R, Relaxngcompact, Rhtml, Ruby,
    Scala, Scheme, Sci, Sed, Sgml, Sql, SqlMysql, SqlPostgresql, Tcl, Texinfo,
    Verilog, Vhdl, Xml, Xorg, Xslt, Xul, Yacc, Yaml
jgm commented 11 years ago

Pandoc puts a blank line between every block element in the LaTeX output, so it's not easy to fix this without lots of restructuring.

Could you work around it by putting the two minipages inside a third, wider minipage?

+++ ahcox [Dec 23 12 04:52 ]:

For \minipage, newlines matter. pandoc is adding newlines that break \minipage. E.g., this:

\noindent
\begin{minipage}[t]{0.49\linewidth} Column 1 text in here.  \end{minipage} \

begin{minipage}[t]{0.49\linewidth} Column 2 text in here \end{minipage}

is turned into this:

    \noindent

    \begin{minipage}[t]{0.49\linewidth} Column 1 text in here.  \end{minipage}

    \begin{minipage}[t]{0.49\linewidth} Column 2 text in here \end{minipage}

Which doesn't produce a side-by-side layout.

Ubuntu 12.10, 64bit, version:

    pandoc --version
    pandoc 1.9.4.2
    Compiled with citeproc-hs 0.3.4, texmath 0.6.0.6, highlighting-kate 0.5.1.
    Syntax highlighting is supported for the following languages:
        Actionscript, Ada, Alert, Alert_indent, Apache, Asn1, Asp, Awk, Bash,
        Bibtex, Boo, C, Changelog, Clojure, Cmake, Coffeescript, Coldfusion,
        Commonlisp, Cpp, Cs, Css, D, Diff, Djangotemplate, Doxygen, Dtd, Eiffel,
        Email, Erlang, Fortran, Fsharp, Gnuassembler, Go, Haskell, Haxe, Html, I
ni,
        Java, Javadoc, Javascript, Json, Jsp, Latex, Lex, LiterateHaskell, Lua,
        Makefile, Mandoc, Matlab, Maxima, Metafont, Mips, Modula2, Modula3,
        Monobasic, Nasm, Noweb, Objectivec, Objectivecpp, Ocaml, Octave, Pascal,
        Perl, Php, Pike, Postscript, Prolog, Python, R, Relaxngcompact, Rhtml, R
uby,
        Scala, Scheme, Sci, Sed, Sgml, Sql, SqlMysql, SqlPostgresql, Tcl, Texinf
o,
        Verilog, Vhdl, Xml, Xorg, Xslt, Xul, Yacc, Yaml

   --
   Reply to this email directly or [1]view it on GitHub.
   [Jshd8sI44GVrKZBvymxqKJihaa4oewH9pRh48cBiPG58lNNnszPDVCjJZutT-bcF.gif]

References

   1. https://github.com/jgm/pandoc/issues/690
jgm commented 10 years ago

Closing this because #1196 deals with the same issue, and we only need one bug report for it.