aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 59339c606..038430f99 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -923,7 +923,7 @@ inlineCommands = M.union inlineLanguageCommands $ M.fromList
, ("eqref", rawInlineOr "eqref" $ doref "eqref") -- from amsmath.sty
, ("mbox", rawInlineOr "mbox" $ processHBox <$> tok)
, ("hbox", rawInlineOr "hbox" $ processHBox <$> tok)
- , ("lettrine", optional opt >> extractSpaces (spanWith ("",["lettrine"],[])) <$> tok)
+ , ("lettrine", rawInlineOr "lettrine" $ lettrine)
, ("(", mathInline . untokenize <$> manyTill anyTok (controlSeq ")"))
, ("[", mathDisplay . untokenize <$> manyTill anyTok (controlSeq "]"))
, ("ensuremath", mathInline . untokenize <$> braced)
@@ -1178,6 +1178,13 @@ inlineCommands = M.union inlineLanguageCommands $ M.fromList
, ("ifdim", ifdim)
]
+lettrine :: PandocMonad m => LP m Inlines
+lettrine = do
+ optional opt
+ x <- tok
+ y <- tok
+ return $ extractSpaces (spanWith ("",["lettrine"],[])) x <> smallcaps y
+
ifdim :: PandocMonad m => LP m Inlines
ifdim = do
contents <- manyTill anyTok (controlSeq "fi")