@@ -56,8 +56,6 @@ import Text.Printf (printf)
5656
5757data WriterState =
5858 WriterState { stStrikeout :: Bool -- document contains strikeout
59− , stSuperscript :: Bool -- document contains superscript
60− , stSubscript :: Bool -- document contains subscript
6159 , stEscapeComma :: Bool -- in a context where we need @comma
6260 , stIdentifiers :: Set.Set String -- header ids used already
6361 , stOptions :: WriterOptions -- writer options
@@ -74,8 +72,7 @@ type TI m = StateT WriterState m
7472writeTexinfo :: PandocMonad m => WriterOptions -> Pandoc -> m Text
7573writeTexinfo options document =
7674 evalStateT (pandocToTexinfo options $ wrapTop document)
77− WriterState { stStrikeout = False, stSuperscript = False,
78− stEscapeComma = False, stSubscript = False,
75+ WriterState { stStrikeout = False, stEscapeComma = False,
7976 stIdentifiers = Set.empty, stOptions = options}
8077
8178-- | Add a "Top" node around the document, needed by Texinfo.
@@ -102,8 +99,6 @@ pandocToTexinfo options (Pandoc meta blocks) = do
10299 let context = defField "body" body
103100 $ defField "toc" (writerTableOfContents options)
104101 $ defField "titlepage" titlePage
105− $ defField "subscript" (stSubscript st)
106− $ defField "superscript" (stSuperscript st)
107102 $
108103 defField "strikeout" (stStrikeout st) metadata
109104 case writerTemplate options of
@@ -427,14 +422,12 @@ inlineToTexinfo (Strikeout lst) = do
427422 return $ text "@textstrikeout{" <> contents <> text "}"
428423
429424inlineToTexinfo (Superscript lst) = do
430− modify $ \st -> st{ stSuperscript = True }
431425 contents <- inlineListToTexinfo lst
432− return $ text "@textsuperscript{" <> contents <> char '}'
426+ return $ text "@sup{" <> contents <> char '}'
433427
434428inlineToTexinfo (Subscript lst) = do
435− modify $ \st -> st{ stSubscript = True }
436429 contents <- inlineListToTexinfo lst
437− return $ text "@textsubscript{" <> contents <> char '}'
430+ return $ text "@sub{" <> contents <> char '}'
438431
439432inlineToTexinfo (SmallCaps lst) =
440433 inlineListToTexinfo lst >>= return . inCmd "sc"