git.iko.soy/typeable/pandoc
on master help sign in
LaTeX reader: support tex `\tt` command.

Closes #5654.

commitd9960244d8413592fc29c69780c41944c8c341be authorJohn MacFarlane <jgm@berkeley.edu> dateMon 22 Jul 2019, 15:28 (7 years ago) parent63c65c8
3 files changed+8−1
src/Text/Pandoc/Readers/LaTeX.hs+1 test/command/4669.md+1−1 test/command/5654.md+6
src/Text/Pandoc/Readers/LaTeX.hs+1
@@ -924,6 +924,7 @@ inlineCommands = M.union inlineLanguageCommands $ M.fromList
924924 , ("it", extractSpaces emph <$> inlines)
925925 , ("sl", extractSpaces emph <$> inlines)
926926 , ("bf", extractSpaces strong <$> inlines)
927+ , ("tt", code . stringify . toList <$> inlines)
927928 , ("rm", inlines)
928929 , ("itshape", extractSpaces emph <$> inlines)
929930 , ("slshape", extractSpaces emph <$> inlines)
test/command/4669.md+1−1
@@ -6,7 +6,7 @@
66 while (n > 0) {
77\end{verbatim}
88^D
9−[Para [Span ("",[],[]) [Str "<-"]]
9+[Para [Span ("",[],[]) [Code ("",[],[]) "<-"]]]
1010,CodeBlock ("",[],[]) " while (n > 0) {"]
1111```
1212
test/command/5654.mdnew file+6
@@ -0,0 +1,6 @@
1+```
2+% pandoc -f latex -t markdown
3+This is {\tt monospaced too} done.
4+^D
5+This is `monospaced too` done.
6+```