Skip to content

Commit 28e949e

Browse files
committed
Allow multicols env in LaTeX reader
The multicols environment has a mandatory argument - number of columns. It is incorrectly parsed as plain string. Just ignore it. Signed-off-by: Igor Pashev <pashev.igor@gmail.com>
1 parent de4fb05 commit 28e949e

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/Text/Pandoc/Readers/LaTeX.hs

+1
Original file line numberDiff line numberDiff line change
@@ -1913,6 +1913,7 @@ environments = M.fromList
19131913
, ("abstract", mempty <$ (env "abstract" blocks >>= addMeta "abstract"))
19141914
, ("sloppypar", env "sloppypar" $ blocks)
19151915
, ("letter", env "letter" letterContents)
1916+
, ("multicols", env "multicols" $ spaces *> braced *> spaces *> blocks)
19161917
, ("minipage", env "minipage" $
19171918
skipopts *> spaces *> optional braced *> spaces *> blocks)
19181919
, ("figure", env "figure" $ skipopts *> figure)

test/command/latex-multicols.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# `\begin{multicols}`
2+
3+
```
4+
% pandoc -f latex -t native
5+
\begin{multicols}{2}
6+
Hello
7+
\end{multicols}
8+
^D
9+
[Para [Str "Hello"]]
10+
```
11+

0 commit comments

Comments
 (0)