# problem with \left. \right| around an array

I am trying to typeset synthetic division. I am using the following code:

$\left.\begin{array}[t]{c}1\\ \,\end{array}\right|\!\begin{array}[t]{cccc}1& 2& -5& 2\\ & 1& 3& -2\\ \hline 1& 3& -2& 0\end{array}$


The output I get is the following:

Why does the vertical line go way beyond the top of the array?

I need a vertical line of the size of the first two lines of the array on the right. I am trying to achieve it using KaTeX so I can only use the commands KaTeX supports. Adding extra packages is not possible.

$\begin{array}[t]{c|}1\\ \,\end{array}\enspace \begin{array}[t]{rrrr}1& 2& -5& 2\\ & 1& 3& -2\\ \hline 1& 3& -2& 0\end{array}$

• @FerencBeleznay yes which is the issue the delarray package addresses, it shifts the delimiter alongside the array as you use [t] or [b] Dec 13, 2019 at 9:13