TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an identical error message as the one in this question. However upon applying the solution in the answer, the errors still occur.

As always, any help is greatly appreciated, and thanks in advance.

MWE:

\documentclass[12pt]{article}
\usepackage{siunitx}
\begin{document}
\subsection{b)}
$2x^3+5x^2-7x+3$\\
$\sisetup{table-format=1.1}
\vspace{2mm}
\begin{array}{S|SSSr[table-format=-1]}
1 & 2 & 5 & \multicolumn{1}{S|}{-7} & \multicolumn{1}{S}{3}\\
& & 2 & \multicolumn{1}{S|}{7}\\
\cline{2-4}
2 & 2 & \multicolumn{1}{S|}{7} & \multicolumn{1}{S}{0} \\
&  & \multicolumn{1}{S|}{4} \\
\cline{2-3}
3 & \multicolumn{1}{S|}{2} &\multicolumn{1}{r}{11} \\
& \multicolumn{1}{S|}{ }\\
\cline{2-2}
\multicolumn{3}{S}{2}
\end{array}$\\
\vspace{2mm}
$\therefore 2x^3+5x^2-7x+3 = 2x(x-1)(x-2) + 11x(x-1)+3$
\end{document}
share|improve this question
up vote 5 down vote accepted

In addition to not passing an option to the r column type (which doesn't take any options), you may want to reorganize and streamline the code of the array environment, say, along the following lines.

enter image description here

\documentclass[12pt]{article}
\usepackage{siunitx} % for 'S' column type
\usepackage{amssymb} % for '\therefore' macro
\begin{document}
\subsection{b)}

$2x^3+5x^2-7x+3$\\
\sisetup{table-format=-1.0}

\medskip\noindent
$\begin{array}{@{}r|SSS|S}
1 & 2 & 5 & -7 & 3\\
  &   & 2 &  7 \\
\cline{2-4}
2 & 2 & \multicolumn{1}{S|}{7} & \multicolumn{1}{S}{0} \\ 
  &   & \multicolumn{1}{S|}{4} \\
\cline{2-3}
3 & \multicolumn{1}{S|}{2} &\multicolumn{1}{r}{11} \\
  & \multicolumn{1}{S|}{}\\
\cline{2-2}
\multicolumn{1}{r}{} & 2
\end{array}$

\medskip\noindent
$\therefore 2x^3+5x^2-7x+3 = 2x(x-1)(x-2) + 11x(x-1)+3$
\end{document}
share|improve this answer

r columns does not take options, S columns do. So move that [....] to after an S column

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.