# How to do Three column Addition?

I want to write a primary school sheet of exercices (additions in columns) with big digits in LaTeX. When i want to do two columns, it is easy with xlop, but i can't to do three columns!

How to do Three column Additions? Like this:

(source: amsi.org.au)

I only need format it, it isn't necessary to solved it.

• Do you need LaTeX to calculate the answer, or merely format it? – Steven B. Segletes Aug 11 '14 at 12:14
• I only need format it. I edit the question... thanks – norbux Aug 11 '14 at 12:19

Try this:

\documentclass{article}
\usepackage[table]{xcolor}
\begin{document}
\arrayrulecolor{blue!25}% specifies the \hline colour using xcolor

$\begin{array}{*4r} &{}^11&{}^16&3\\ &5 &4 &9\\ &2 &7 &6\\ \hline +&9 &8 &8\\ \hline \end{array}$

\end{document}


This yields:

The colours are slightly gratuitous:)

EDIT Actually, I don't like this as the columns have different widths. Using the array we can fix this:

\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{array}
\begin{document}
\newcolumntype{C}{>{\hfill$}p{1em}<{$\hfill}}
\arrayrulecolor{blue!25}
$\begin{array}{cCCC} &{}^11&{}^16&3\\ &5 &4 &9\\ &2 &7 &6\\ \hline +&9 &8 &8\\ \hline \end{array}$

\end{document}


Now we have:

It's a bit of a hack. Hopefully some one else will contribute a more elegant solution.