From ddc2b9024fbe8be9c51ff1347caa6eef30adebe2 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 5 Mar 2017 20:21:29 +0100 Subject: LaTeX reader: support all \textXX commands. where XX = rm, tt, up, md, sf, bf. Spans with a class are used when there is nothing better. Closes #3488. --- src/Text/Pandoc/Readers/LaTeX.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 732420a4c..8c31b0404 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -498,6 +498,11 @@ inlineCommands = M.fromList $ , ("textit", extractSpaces emph <$> tok) , ("textsl", extractSpaces emph <$> tok) , ("textsc", extractSpaces smallcaps <$> tok) + , ("textsf", extractSpaces (spanWith ("",["sans-serif"],[])) <$> tok) + , ("textmd", extractSpaces (spanWith ("",["medium"],[])) <$> tok) + , ("textrm", extractSpaces (spanWith ("",["roman"],[])) <$> tok) + , ("textup", extractSpaces (spanWith ("",["upright"],[])) <$> tok) + , ("texttt", (code . stringify . toList) <$> tok) , ("sout", extractSpaces strikeout <$> tok) , ("textsuperscript", extractSpaces superscript <$> tok) , ("textsubscript", extractSpaces subscript <$> tok) @@ -582,7 +587,6 @@ inlineCommands = M.fromList $ , ("verb", doverb) , ("lstinline", skipopts *> doverb) , ("Verb", doverb) - , ("texttt", (code . stringify . toList) <$> tok) , ("url", (unescapeURL <$> braced) >>= \url -> pure (link url "" (str url))) , ("href", (unescapeURL <$> braced <* optional sp) >>= \url -> -- cgit v1.2.3