aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 0ba6cd560..feef85c2a 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -378,7 +378,8 @@ comment = try (do
-- inline
--
-inline = choice [ strong, emph, strikeout, ref, lab, code, linebreak, spacer,
+inline = choice [ strong, emph, strikeout, superscript, subscript,
+ ref, lab, code, linebreak, spacer,
math, ellipses, emDash, enDash, hyphen, quoted, apostrophe,
accentedChar, specialChar, specialInline, escapedChar,
unescapedChar, str, endline, whitespace ] <?> "inline"
@@ -522,6 +523,18 @@ strikeout = try $ do
result <- manyTill inline (char '}')
return (Strikeout result)
+superscript = try $ do
+ string "\\textsuperscript{"
+ result <- manyTill inline (char '}')
+ return (Superscript result)
+
+-- note: \textsubscript isn't a standard latex command, but we use
+-- a defined version in pandoc.
+subscript = try $ do
+ string "\\textsubscript{"
+ result <- manyTill inline (char '}')
+ return (Subscript result)
+
apostrophe = do
char '\''
return Apostrophe