LaTeX reader: Recognize that \vadjust sometimes takes "pre".

Closes #7531.
This commit is contained in:
John MacFarlane 2021-09-19 10:11:29 -07:00
parent 132a6df51e
commit c9ce6da1bb

View file

@ -941,6 +941,9 @@ getRawCommand name txt = do
void $ count 4 braced
"def" ->
void $ manyTill anyTok braced
"vadjust" ->
void (manyTill anyTok braced) <|>
void (satisfyTok isPreTok) -- see #7531
_ | isFontSizeCommand name -> return ()
| otherwise -> do
skipopts
@ -948,6 +951,10 @@ getRawCommand name txt = do
void $ many braced
return $ txt <> untokenize rawargs
isPreTok :: Tok -> Bool
isPreTok (Tok _ Word "pre") = True
isPreTok _ = False
isDigitTok :: Tok -> Bool
isDigitTok (Tok _ Word t) = T.all isDigit t
isDigitTok _ = False