aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-03-05 20:21:29 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-03-05 20:21:29 +0100
commitddc2b9024fbe8be9c51ff1347caa6eef30adebe2 (patch)
treeec7a6924ce0e677ef73a22a9b281f71ffa27bb9a /src/Text/Pandoc
parente20f55618f82eb93f9ad5968e8e90b57def0d5d7 (diff)
downloadpandoc-ddc2b9024fbe8be9c51ff1347caa6eef30adebe2.tar.gz
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.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs6
1 files changed, 5 insertions, 1 deletions
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 ->