diff options
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 44be8dea3..494f532a1 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -1316,8 +1316,21 @@ inlineCommands = M.fromList $ , ("faClose", lit "\10007") -- xspace , ("xspace", doxspace) + -- etoolbox + , ("ifstrequal", ifstrequal) ] +ifstrequal :: PandocMonad m => LP m Inlines +ifstrequal = do + str1 <- tok + str2 <- tok + ifequal <- braced + ifnotequal <- braced + if str1 == str2 + then getInput >>= setInput . (ifequal ++) + else getInput >>= setInput . (ifnotequal ++) + return mempty + ttfamily :: PandocMonad m => LP m Inlines ttfamily = (code . stringify . toList) <$> tok |