diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-11-12 14:19:58 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-11-12 14:19:58 -0800 |
commit | 7ba0ae8b4d9a6d3e7d4484a5f257e1e53f35667d (patch) | |
tree | bb1f0a8c26ee135a0af56dce9d0489fd15c63e46 | |
parent | b4f68a5a9fb189ad36b25a5029b6e6ef7ea05039 (diff) | |
download | pandoc-7ba0ae8b4d9a6d3e7d4484a5f257e1e53f35667d.tar.gz |
LaTeX reader: allow optional args for parbox.
See #4056.
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 2 | ||||
-rw-r--r-- | test/command/4056.md | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 9bac3d3a7..708980f1d 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -2003,7 +2003,7 @@ closing = do blockCommands :: PandocMonad m => M.Map Text (LP m Blocks) blockCommands = M.fromList $ [ ("par", mempty <$ skipopts) - , ("parbox", braced >> grouped blocks) + , ("parbox", skipopts >> braced >> grouped blocks) , ("title", mempty <$ (skipopts *> (grouped inline >>= addMeta "title") <|> (grouped block >>= addMeta "title"))) diff --git a/test/command/4056.md b/test/command/4056.md new file mode 100644 index 000000000..be245a30d --- /dev/null +++ b/test/command/4056.md @@ -0,0 +1,11 @@ +``` +% pandoc -f markdown -t native +\parbox[t]{0.4\textwidth}{ +\begin{shaded} +\end{shaded} +} +^D +[RawBlock (Format "latex") "\\parbox[t]{0.4\\textwidth}{\n\\begin{shaded}\n\\end{shaded}\n}"] +``` + + |