@@ -466,8 +466,9 @@ inlineToMarkdown _ (Math InlineMath str) =
466466 return $ "$" <> text str <> "$"
467467inlineToMarkdown _ (Math DisplayMath str) =
468468 return $ "$$" <> text str <> "$$"
469−inlineToMarkdown _ (RawInline f str)
470− | f == "html" || f == "latex" || f == "tex" || f == "markdown" =
469+inlineToMarkdown opts (RawInline f str)
470+ | f == "html" || f == "markdown" ||
471+ (isEnabled Ext_raw_tex opts && (f == "latex" || f == "tex")) =
471472 return $ text str
472473inlineToMarkdown _ (RawInline _ _) = return empty
473474inlineToMarkdown opts (LineBreak)