git.iko.soy/typeable/pandoc
on master help sign in
LaTeX Reader: support \lettrine
commite2123a4033ea9fc5c285f521883dfb65b721f069 authormb21 <mb21@users.noreply.github.com> dateSun 22 Oct 2017, 12:24 (9 years ago) parent05adbd6
2 files changed+10
src/Text/Pandoc/Readers/LaTeX.hs+1 test/command/lettrine.md+9
src/Text/Pandoc/Readers/LaTeX.hs+1
@@ -1264,6 +1264,7 @@ inlineCommands = M.union inlineLanguageCommands $ M.fromList $
12641264 , ("cref", rawInlineOr "cref" $ doref "ref") -- from cleveref.sty
12651265 , ("vref", rawInlineOr "vref" $ doref "ref+page") -- from varioref.sty
12661266 , ("eqref", rawInlineOr "eqref" $ doref "eqref") -- from amsmath.sty
1267+ , ("lettrine", optional opt >> extractSpaces (spanWith ("",["lettrine"],[])) <$> tok)
12671268 , ("(", mathInline . toksToString <$> manyTill anyTok (controlSeq ")"))
12681269 , ("[", mathDisplay . toksToString <$> manyTill anyTok (controlSeq "]"))
12691270 , ("ensuremath", mathInline . toksToString <$> braced)
test/command/lettrine.mdnew file+9
@@ -0,0 +1,9 @@
1+```
2+% pandoc -f latex -t native
3+\lettrine{A}{category} is
4+
5+\lettrine[lhang=0.17]{A}{category} is
6+^D
7+[Para [Span ("",["lettrine"],[]) [Str "A"],Span ("",[],[]) [Str "category"],Space,Str "is"]
8+,Para [Span ("",["lettrine"],[]) [Str "A"],Span ("",[],[]) [Str "category"],Space,Str "is"]]
9+```