Displaying Sums in Column Format with Latex
Due to My Disability, I Cannot Write Without the Use of a Computer. When Working with Numbers It Is Often Helpful to Write Arithmetic Problems in Column...
Due to my disability, I cannot write without the use of a computer. When working with numbers it is often helpful to write arithmetic problems in column format, e.g.
I have never been able to do this without assistance from an able-bodied person.
I recently began looking for a solution to this issue and found LaTeX. Is it possible to write a sum in column format in LaTeX, or is there some other more appropriate tool for this?
Note that I'm not interested in solving the sums with software, I just need to display them in a way which makes them easier for me to work with.
2 Answers
I use LaTeX regularly to write papers. It is a very powerful piece of software, but I'm not sure how useful it would be for your needs. Here is the minimum amount of code to write your example:
\documentclass[]{article}
\begin{document}
\begin{tabular}{r}
5 \\
+ 12 \\
\hline
17
\end{tabular}
\end{document}
And the (cropped from A4/Letter) output:
There are some WYSIWYG editors for LaTeX such as LyX which might make it easier.
Another option is to use the multirow package:
\documentclass[]{article}
\usepackage{multirow}
\begin{document}
\begin{tabular}{rr}
\multirow{2}{*}{+} & $5$ \\
& $12$ \\
\cline{2-2}
& 17
\end{tabular}
\end{document}
which produces: