texmath
texmath copied to clipboard
Handle < and > in array column specifiers
I just discovered the next issue when array's is used instead of case.
The test case:
\documentclass{scrartcl}
\usepackage{amsmath}
\usepackage{array}
\begin{document}
\setlength{\arraycolsep}{1pt}
\begin{equation}
x =
\left\{ \begin{array}{>{\arraybackslash$} p{3cm} <{$} l}
y - 1, & \mbox{if } 1 \\
y, & \mbox{if } 2 \\
\end{array} \right.
\end{equation}
\end{document}
Error:
[WARNING] Could not convert TeX math 'x =
\left\{ \begin{array}{>{\arraybackslash$} p{3cm} <{$} l}
y - 1, & \mbox{if } 1 \\
y, & \mbox{if } 2 \\
\end{array} \right.', rendering as TeX:
ft\{ \begin{array}{>{\arraybackslash$} p
^
unexpected ">"
expecting white space, letter, "|" or "}"
What is the meaning of the column specifiers {>{\arraybackslash$} and <{$}?
That's the part the parser doesn't seem to understand.
>{XXX} and <{YYY} are used to put XXX in the entry of column and YYY right after entry of the column.
In my case it puts
\arraybackslashto restore behaviour of\\that is used to break a line :)$after\arraybackslashis using to start math environment,$at the end to finish math environment.
@jgm any news with this? :)