mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-25 01:36:45 +00:00
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:
@@ -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 ->
|
||||
|
||||
Reference in New Issue
Block a user