I need to make equations like this with 'check'. Here is my example with strange spacing.
The long division is from PageMaker. I am making excel tables then I copy them in Pagemaker but its very hard to do.
Asked
Active
Viewed 199 times
1
Simeon Simeonov
- 819
- 5
- 11
1 Answers
2
Here is a way, if you prefer to retain column gaps:
\documentclass{article}
\usepackage[TABcline]{tabstackengine}
\TABstackMath
\renewcommand\stackalignment{l}
\newcommand\lminus{\llap{$-$}}
{\catcode`-=\active
\gdef -{\lminus}}
\newcommand\minusactive{\phantom{-}\catcode`-=\active}
\setstacktabbedgap{3pt}
\begin{document}
$
\minusactive
\tabbedShortunderstack[r]{
&3&7&0&5&:5=741\\
-&3&5& &&\\
\TABcline{2,3}
& &2&0&&\\
&-&2&0&&\\
\TABcline{3,4}
& & & &5&\\
& & &-&5&\\
\TABcline{5}
& & & &0&
}
$
\end{document}
Naturally, the method works inside a tabular:
\documentclass{article}
\usepackage[TABcline]{tabstackengine}
\TABstackMath
\renewcommand\stackalignment{l}
\newcommand\lminus{\llap{$-$}}
{\catcode`-=\active
\gdef -{\lminus}}
\newcommand\minusactive{\phantom{-}\catcode`-=\active}
\setstacktabbedgap{3pt}
\begin{document}
\begin{tabular}{ll@{\hspace{10ex}}c}
1)&
$
\minusactive
\tabbedShortunderstack[r]{
&3&7&0&5&:5=741\\
-&3&5& &&\\
\TABcline{2,3}
& &2&0&&\\
&-&2&0&&\\
\TABcline{3,4}
& & & &5&\\
& & &-&5&\\
\TABcline{5}
& & & &0&
}
$
&
$741\cdot5 = 3705$\\
\end{tabular}
\end{document}
Steven B. Segletes
- 237,551
-
-
1@SapharKoshet Not sure what you mean. I just was demonstrating how to build the division. There are various ways (using
tabularfor example) to array them in rows by columns format. – Steven B. Segletes Nov 15 '18 at 16:02 -
And, that you've done, and quickly. In the example given, there's the stack segment (on the left), and what appears to be additional answer-checking in a "right column." Didn't know whether you wanted also to include that or not. – Saphar Koshet Nov 15 '18 at 16:06
-
@SapharKoshet Please see revision to see how it can be done. – Steven B. Segletes Nov 15 '18 at 16:07
-
Yes. That's the "right column" info. It's possible the whole of the code you provided wasn't absorbed by the web page when the note came in. – Saphar Koshet Nov 15 '18 at 16:09
-
Thank you! I have 4-5 hours on latex since yesterday and you helped me a lot! – Simeon Simeonov Nov 15 '18 at 16:09


longdivision, with it you can do\longdivision{402}{3}, but I personally dislike the output of that package. Another example would bepolynomwhich adds\longdiv. – Skillmon Nov 15 '18 at 15:23