diff --git a/src/Text/TeXMath/Readers/TeX.hs b/src/Text/TeXMath/Readers/TeX.hs index 6e7849aa..b09ec2f4 100644 --- a/src/Text/TeXMath/Readers/TeX.hs +++ b/src/Text/TeXMath/Readers/TeX.hs @@ -453,8 +453,10 @@ arrayLine = arrayAlignments :: TP [Alignment] arrayAlignments = mconcat <$> - braces (many (((:[]) . letterToAlignment <$> letter) + braces (many ( + ((:[]) . letterToAlignment <$> letter) <|> ([] <$ char '|') + <|> ([] <$ ((char '@' <|> char '!') <* inbraces)) <|> (do char '*' num <- T.pack <$> braces (many1 digit) cols <- arrayAlignments diff --git a/test/regression/241.test b/test/regression/241.test new file mode 100644 index 00000000..52fd0c0d --- /dev/null +++ b/test/regression/241.test @@ -0,0 +1,30 @@ +<<< tex +\begin{array}{l@{\qquad}l} +\text{Infection/colonization episode} & \text{Waning immunity episode}\\ +b^{\prime}(t) = \mu_{0}b(t) - cy(t) & b(t) = 0 +\end{array} +>>> native +[ EArray + [ AlignLeft , AlignLeft ] + [ [ [ EText TextNormal "Infection/colonization episode" ] + , [ EText TextNormal "Waning immunity episode" ] + ] + , [ [ ESuper (EIdentifier "b") (ESymbol Ord "\8242") + , EDelimited "(" ")" [ Right (EIdentifier "t") ] + , ESymbol Rel "=" + , ESub (EIdentifier "\956") (ENumber "0") + , EIdentifier "b" + , EDelimited "(" ")" [ Right (EIdentifier "t") ] + , ESymbol Bin "\8722" + , EIdentifier "c" + , EIdentifier "y" + , EDelimited "(" ")" [ Right (EIdentifier "t") ] + ] + , [ EIdentifier "b" + , EDelimited "(" ")" [ Right (EIdentifier "t") ] + , ESymbol Rel "=" + , ENumber "0" + ] + ] + ] +]