diff options
author | Marc Schreiber <marc.schreiber@fh-aachen.de> | 2017-05-02 10:48:57 +0200 |
---|---|---|
committer | Marc Schreiber <marc.schreiber@fh-aachen.de> | 2017-05-02 10:48:57 +0200 |
commit | 49336ee6eeecc352e248d1262ea1b46070e00243 (patch) | |
tree | e088f12bb54d80cfe2efbbb0e31cc70011504094 /src/Text/Pandoc/Readers | |
parent | 022d58e02a6276aa830639ad641aae1542731bbe (diff) | |
download | pandoc-49336ee6eeecc352e248d1262ea1b46070e00243.tar.gz |
Add basic \textcolor support to LaTeX reader
Diffstat (limited to 'src/Text/Pandoc/Readers')
-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 |