We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
\hspace
1 parent 4f2acdc commit c50e483Copy full SHA for c50e483
src/Text/TeXMath/Readers/TeX.hs
@@ -719,14 +719,15 @@ xspace "\\mspace" =
719
_ -> mzero
720
xspace "\\hspace" = do
721
braces $ do
722
+ neg <- option 1 $ (-1) <$ char '-'
723
as <- option "" $ many1 digit
724
bs <- option "" $ char '.' *> many1 digit
725
let denominator = 10^(length bs)
726
as' <- if null as then pure 0 else stringToInteger as
727
bs' <- if null bs then pure 0 else stringToInteger bs
728
let numerator = (as' * denominator) + bs'
- let n = numerator % denominator
729
- scaleFactor <-
+ let n = neg * (numerator % denominator)
730
+ scaleFactor <- lexeme $
731
1 <$ (string "em")
732
<|> (1/12) <$ (string "pt")
733
<|> 6 <$ (string "in")
0 commit comments