@@ -453,7 +453,7 @@ inline = choice [ str
453453 , accentedChar
454454 , nonbreakingSpace
455455 , specialChar
456− , rawLaTeXInline
456+ , rawLaTeXInline'
457457 , escapedChar
458458 , unescapedChar
459459 ] <?> "inline"
@@ -771,11 +771,16 @@ footnote = try $ do
771771 setInput rest
772772 return $ Note blocks
773773
774+-- | Parse any LaTeX inline command and return it in a raw TeX inline element.
775+rawLaTeXInline' :: GenParser Char ParserState Inline
776+rawLaTeXInline' = do
777+ notFollowedBy' $ oneOfStrings ["\\begin", "\\end", "\\item", "\\ignore",
778+ "\\section"]
779+ rawLaTeXInline
780+
774781-- | Parse any LaTeX command and return it in a raw TeX inline element.
775782rawLaTeXInline :: GenParser Char ParserState Inline
776783rawLaTeXInline = try $ do
777− notFollowedBy' $ oneOfStrings ["\\begin", "\\end", "\\item", "\\ignore",
778− "\\section"]
779784 state <- getState
780785 if stateParseRaw state
781786 then do