LaTeX Reader: support \lettrine

This commit is contained in:
mb21 2017-10-22 12:24:30 +02:00
parent 05adbd6f19
commit e2123a4033
2 changed files with 10 additions and 0 deletions

View file

@ -1264,6 +1264,7 @@ inlineCommands = M.union inlineLanguageCommands $ M.fromList $
, ("cref", rawInlineOr "cref" $ doref "ref") -- from cleveref.sty
, ("vref", rawInlineOr "vref" $ doref "ref+page") -- from varioref.sty
, ("eqref", rawInlineOr "eqref" $ doref "eqref") -- from amsmath.sty
, ("lettrine", optional opt >> extractSpaces (spanWith ("",["lettrine"],[])) <$> tok)
, ("(", mathInline . toksToString <$> manyTill anyTok (controlSeq ")"))
, ("[", mathDisplay . toksToString <$> manyTill anyTok (controlSeq "]"))
, ("ensuremath", mathInline . toksToString <$> braced)

9
test/command/lettrine.md Normal file
View file

@ -0,0 +1,9 @@
```
% pandoc -f latex -t native
\lettrine{A}{category} is
\lettrine[lhang=0.17]{A}{category} is
^D
[Para [Span ("",["lettrine"],[]) [Str "A"],Span ("",[],[]) [Str "category"],Space,Str "is"]
,Para [Span ("",["lettrine"],[]) [Str "A"],Span ("",[],[]) [Str "category"],Space,Str "is"]]
```