RTF reader: support \nosupersub.

Closes #8170.
This commit is contained in:
John MacFarlane 2022-07-07 22:56:02 +02:00
parent 7fdc01ac0d
commit 56051c8ac3
2 changed files with 18 additions and 0 deletions

View file

@ -590,6 +590,9 @@ processTok bs (Tok pos tok') = do
modifyGroup (\g -> g{ gSub = boolParam mbp })
ControlWord "super" mbp -> bs <$
modifyGroup (\g -> g{ gSuper = boolParam mbp })
ControlWord "nosupersub" mbp -> bs <$
modifyGroup (\g -> g{ gSuper = not $ boolParam mbp
, gSub = not $ boolParam mbp })
ControlWord "up" mbp -> bs <$
modifyGroup (\g -> g{ gSuper = boolParam mbp })
ControlWord "strike" mbp -> bs <$

15
test/command/8170.md Normal file
View file

@ -0,0 +1,15 @@
```
% pandoc -f rtf -t html
{\rtf1\ansi\ansicpg1252\cocoartf2638
\cocoascreenfonts1\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\froman\fcharset0 Times-Roman;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\margl1440\margr1440\vieww16800\viewh17280\viewkind0
\pard\tx1080\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li180\fi440\sa120\pardirnatural\partightenfactor0
\f0\fs34 \cf0 In 5
\fs20 \super th
\fs34 \nosupersub grade I found a bug.}
^D
<p>In 5<sup>th</sup> grade I found a bug.</p>
```