diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index a54238206..6252293d7 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -680,6 +680,8 @@ inlineCommands = M.fromList $ , ("nohyphens", tok) , ("textnhtt", ttfamily) , ("nhttfamily", ttfamily) + -- textcolor + , ("textcolor", textcolor) ] ++ map ignoreInlines -- these commands will be ignored unless --parse-raw is specified, -- in which case they will appear as raw latex blocks: @@ -756,6 +758,12 @@ dosiunitx = do emptyOr160 unit, unit] +textcolor :: PandocMonad m => LP m Inlines +textcolor = do + skipopts + color <- braced + spanWith ("",[],[("style","color: " ++ color)]) <$> tok + lit :: String -> LP m Inlines lit = pure . str |