@@ -868,14 +868,17 @@ emDashOld = do
868868-- | Parse a \newcommand or \renewcommand macro definition.
869869macro :: GenParser Char ParserState Block
870870macro = do
871− getState >>= guard . stateApplyMacros
871+ apply <- stateApplyMacros `fmap` getState
872872 inp <- getInput
873873 case parseMacroDefinitions inp of
874874 ([], _) -> pzero
875− (ms, rest) -> do count (length inp - length rest) anyChar
876− updateState $ \st ->
877− st { stateMacros = ms ++ stateMacros st }
878− return Null
875+ (ms, rest) -> do def <- count (length inp - length rest) anyChar
876+ if apply
877+ then do
878+ updateState $ \st ->
879+ st { stateMacros = ms ++ stateMacros st }
880+ return Null
881+ else return $ RawBlock "latex" def
879882
880883-- | Apply current macros to string.
881884applyMacros' :: String -> GenParser Char ParserState String