[Tex/LaTex] Using vertical line column separator in tabular between JUST TWO cells

rulestables

I'm trying to do long division using tabular environment. Here is the code:

\documentclass[11pt]{book}
\usepackage{multirow}
\begin{document}
\begin{center}
\begin{tabular}{c@{} c@{} c@{} c@{} c@{} c@{} c@{} c@{} c@{} c@{} c@{} c@{}}
\multirow{2}{*}{$-$}&1&5&7&{\huge,}&5&&&5&{\color{white}1}&{\color{white}1}&    {\color{white}1}\\
\cline{9-12}
&1&5&&&&{\color{white}1}&{\color{white}1}&3&1&&\\
\cline{2-6}
\multirow{2}{*}{$-$}&&&7&&&&&&&&\\
&&&5&&&&&&&&\\
\cline{2-6}
&&&2&&&&&&&&\\
\end{tabular}
\end{center}
\end{document}

I'm trying to achieve long division layout which is used in my country. It is very similar to the one used in France with the exception of the vertical line that exists only in the first row and does not go all the way down.

To achieve this, I create my table without any vertical separators between the columns and want to add it only in the first row, before the number "5".

What I'm trying to achieve

The code above yields the second picture. Is it possible to somehow insert that single vertical line?

Best Answer

For example

\documentclass[11pt]{book}
\usepackage{color}
\usepackage{multirow}
\begin{document}
\begin{center}
\begin{tabular}{c@{} c@{} c@{} c@{} c@{} c@{} c@{} c@{} c@{} c@{} c@{} c@{}}
%\multirow{2}{*}{$-$}&1&5&7&{\huge,}&5&&&5&{\color{white}1}&{\color{white}1}&    {\color{white}1}\\
\multirow{2}{*}{$-$}&1&5&7&{\huge,}&5&&&\vline\,5&{\color{white}1}&{\color{white}1}&    {\color{white}1}\\
\cline{9-12}
&1&5&&&&{\color{white}1}&{\color{white}1}&3&1&&\\
\cline{2-6}
\multirow{2}{*}{$-$}&&&7&&&&&&&&\\
&&&5&&&&&&&&\\
\cline{2-6}
&&&2&&&&&&&&\\
\end{tabular}
\end{center}
\end{document}

enter image description here

Related Question