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.
This commit is contained in:
John MacFarlane
2017-03-05 20:21:29 +01:00
parent e20f55618f
commit ddc2b9024f
+5 -1
View File
@@ -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 ->