Skip to content

Commit

Permalink
LaTeX reader: preserve center environment
Browse files Browse the repository at this point in the history
  • Loading branch information
ip1981 committed Nov 23, 2020
1 parent 94c9028 commit 8eb9c67
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Text/Pandoc/Readers/LaTeX.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1639,7 +1639,7 @@ environments = M.fromList
skipopts *> spaces *> optional braced *> spaces *> blocks)
, ("figure", env "figure" $ skipopts *> figure)
, ("subfigure", env "subfigure" $ skipopts *> tok *> figure)
, ("center", env "center" blocks)
, ("center", divWith ("", ["center"], []) <$> env "center" blocks)
, ("longtable", env "longtable" $
resetCaption *> simpTable "longtable" False >>= addTableCaption)
, ("table", env "table" $
Expand Down
13 changes: 13 additions & 0 deletions test/command/latex-center.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# `\begin{center}`

```
% pandoc -f latex -t native
\begin{center}
Hello
\end{center}
^D
[Div ("",["center"],[])
[Para [Str "Hello"]]]
```

0 comments on commit 8eb9c67

Please sign in to comment.