aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorschrieveslaach <schrieveslaach@online.de>2017-05-03 12:16:48 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-05-03 12:16:48 +0200
commit6e55e6837a38b83d0ed4329ab366c699d6c2551f (patch)
tree91a8f2125cac7dc8f6863f1a1a2dfdcd16ff5e3a /src/Text/Pandoc/Readers
parente02cfcdeaccf588399579283998a7fb93a5c08f6 (diff)
downloadpandoc-6e55e6837a38b83d0ed4329ab366c699d6c2551f.tar.gz
LaTeX reader: Add support for tabularx environment (#3632)
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index a54238206..b88b6eae4 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -1156,6 +1156,7 @@ environments = M.fromList
, ("table", env "table" $
resetCaption *> skipopts *> blocks >>= addTableCaption)
, ("tabular*", env "tabular" $ simpTable True)
+ , ("tabularx", env "tabularx" $ simpTable True)
, ("tabular", env "tabular" $ simpTable False)
, ("quote", blockQuote <$> env "quote" blocks)
, ("quotation", blockQuote <$> env "quotation" blocks)
@@ -1414,7 +1415,11 @@ parseAligns = try $ do
let lAlign = AlignLeft <$ char 'l'
let rAlign = AlignRight <$ char 'r'
let parAlign = AlignLeft <$ (char 'p' >> braced)
- let alignChar = cAlign <|> lAlign <|> rAlign <|> parAlign
+ -- algins from tabularx
+ let xAlign = AlignLeft <$ char 'X'
+ let mAlign = AlignLeft <$ (char 'm' >> braced)
+ let bAlign = AlignLeft <$ (char 'b' >> braced)
+ let alignChar = cAlign <|> lAlign <|> rAlign <|> parAlign <|> xAlign <|> mAlign <|> bAlign
let alignPrefix = char '>' >> braced
let alignSuffix = char '<' >> braced
let alignSpec = do