@@ -393,6 +393,8 @@ blockCommands = M.fromList $
393 , ("graphicspath", graphicsPath)
393 , ("graphicspath", graphicsPath)
394 -- hyperlink
394 -- hyperlink
395 , ("hypertarget", braced >> grouped block)
395 , ("hypertarget", braced >> grouped block)
397+ , ("textcolor", blockTextcolor)
396 ] ++ map ignoreBlocks
398 ] ++ map ignoreBlocks
397 -- these commands will be ignored unless --parse-raw is specified,
399 -- these commands will be ignored unless --parse-raw is specified,
398 -- in which case they will appear as raw latex blocks
400 -- in which case they will appear as raw latex blocks
@@ -414,6 +416,12 @@ blockCommands = M.fromList $
414 , "pagebreak"
416 , "pagebreak"
419+blockTextcolor :: PandocMonad m => LP m Blocks
423+ return <$> divWith ("",[],[("style","color: " ++ color)]) $ block
417graphicsPath :: PandocMonad m => LP m Blocks
425graphicsPath :: PandocMonad m => LP m Blocks
418graphicsPath = do
426graphicsPath = do
419 ps <- bgroup *> (manyTill braced egroup)
427 ps <- bgroup *> (manyTill braced egroup)
@@ -681,7 +689,7 @@ inlineCommands = M.fromList $
681 , ("textnhtt", ttfamily)
689 , ("textnhtt", ttfamily)
682 , ("nhttfamily", ttfamily)
690 , ("nhttfamily", ttfamily)
683 -- textcolor
691 -- textcolor
684− , ("textcolor", textcolor)
692+ , ("textcolor", inlineTextcolor)
685 ] ++ map ignoreInlines
693 ] ++ map ignoreInlines
686 -- these commands will be ignored unless --parse-raw is specified,
694 -- these commands will be ignored unless --parse-raw is specified,
687 -- in which case they will appear as raw latex blocks:
695 -- in which case they will appear as raw latex blocks:
@@ -693,6 +701,12 @@ inlineCommands = M.fromList $
693 , "pagebreak"
701 , "pagebreak"
704+inlineTextcolor :: PandocMonad m => LP m Inlines
708+ spanWith ("",[],[("style","color: " ++ color)]) <$> tok
696ttfamily :: PandocMonad m => LP m Inlines
710ttfamily :: PandocMonad m => LP m Inlines
697ttfamily = (code . stringify . toList) <$> tok
711ttfamily = (code . stringify . toList) <$> tok
@@ -758,12 +772,6 @@ dosiunitx = do
758 emptyOr160 unit,
772 emptyOr160 unit,
761−textcolor :: PandocMonad m => LP m Inlines
765− spanWith ("",[],[("style","color: " ++ color)]) <$> tok
767lit :: String -> LP m Inlines
775lit :: String -> LP m Inlines
768lit = pure . str
776lit = pure . str