Use of Latex - II

chijioke

Full Member
Joined
Jul 27, 2022
Messages
352
Please I need help with this. I need to show collumn subtraction in Latex.
 

Attachments

  • IMG_20220828_120216.jpg
    IMG_20220828_120216.jpg
    495.7 KB · Views: 4
Please I need help with this. I need to show collumn subtraction in Latex.
I'm not quite sure what you are asking? You know how to do the arrays. The only new thing is the superscripts on the numbers in the top row. The coding would be ^{11}2, giving [imath]^{11}2[/imath].

-Dan
 
Let me try.
\(\displaystyle \begin{array}^{4}5~^{11}2~^{1}5~9 \\
-~3~4~9~7 \\
\overline{1~7~6~2 } \\
\end{array}
\)
I am finding difficult. I can only do the array in table environment. This one does not be involve table so I still need help.
 
Last edited:
Let me try.
\(\displaystyle \begin{array}^{4}5~^{11}2~^{1}5~9 \\
-~3~4~9~7 \\
\overline{1~7~6~2 } \\
\end{array}
\)
I am finding difficult. I can only do the array in table environment. This one does not be involve table so I still need help.
Review your arrays again.

\begin{array}{rrrrr}
& ^{4}5 & ^{11}2 & ^{1}5 & 9 \\
- & 3 & 4 & 9 & 7 \\
\hline
& 1 & 7 & 6 & 2 \\
\end{array}

[imath] \begin{array}{rrrrr} & ^{4}5 & ^{11}2 & ^{1}5 & 9 \\ - & 3 & 4 & 9 & 7 \\ \hline & 1 & 7 & 6 & 2 \\ \end{array} [/imath]

Also, for this I'd consider the use of the \cancel{.} operator:
[imath] \begin{array}{rrrrr} & ^{4} \cancel{5} & ^{11} \cancel{2} & ^{1}5 & 9 \\ - & 3 & 4 & 9 & 7 \\ \hline & 1 & 7 & 6 & 2 \\ \end{array} [/imath]

-Dan
 
What if I need to have the thousand collumn ringed. Like

[imath] \begin{array}{rrrrr} & Th & H & T & U \\ & ^{4}5 & ^{11}2 & ^{1}5 & 9 \\ - & 3 & 4 & 9 & 7 \\ \hline & 1 & 7 & 6 & 2 \\ \end{array} [/imath]
 

Attachments

  • IMG_20220828_145241.jpg
    IMG_20220828_145241.jpg
    796.1 KB · Views: 1
What if I need to have the thousand collumn ringed. Like

[imath] \begin{array}{rrrrr} & Th & H & T & U \\ & ^{4}5 & ^{11}2 & ^{1}5 & 9 \\ - & 3 & 4 & 9 & 7 \\ \hline & 1 & 7 & 6 & 2 \\ \end{array} [/imath]
Ringing columns sounds rather exotic to me, but humble vertical lines often work for me:
[imath] \begin{array}{r|r|rrr} & Th & H & T & U \\ & ^{4}5 & ^{11}2 & ^{1}5 & 9 \\ - & 3 & 4 & 9 & 7 \\ \hline & 1 & 7 & 6 & 2 \\ \end{array} [/imath]
 
What if I need to have the thousand collumn ringed. Like

[imath] \begin{array}{rrrrr} & Th & H & T & U \\ & ^{4}5 & ^{11}2 & ^{1}5 & 9 \\ - & 3 & 4 & 9 & 7 \\ \hline & 1 & 7 & 6 & 2 \\ \end{array} [/imath]
I don't know that this is possible in LaTeX. Why would you feel the need for that? Maybe there is another way.

-Dan
 
I don't know that this is possible in LaTeX. Why would you feel the need for that? Maybe there is another way.

-Dan
I do know a way but it's not supported on the forum. Alternatively, try colour instead to draw attention.
\red{^{4}5} \purple{^{4}5} \green{^{4}5} \pink{^{4}5} \blue{^{4}5}

[math]\red{^{4}5}\\ \purple{^{4}5}\\ \green{^{4}5}\\ \pink{^{4}5}\\ \blue{^{4}5}\\[/math]
or \bold{^{4}5}
[math]\bold{^{4}5}[/math]
or both...
\red{\bold{^{4}5}}
[math]\red{\bold{^{4}5}}[/math]
 
Last edited:
Ringing columns sounds rather exotic to me, but humble vertical lines often work for me:
[imath] \begin{array}{r|r|rrr} & Th & H & T & U \\ & ^{4}5 & ^{11}2 & ^{1}5 & 9 \\ - & 3 & 4 & 9 & 7 \\ \hline & 1 & 7 & 6 & 2 \\ \end{array} [/imath]
That's interesting. Could you please explain how you succeeded in having the thousand collumn to go within the vertical lines? Am asking this because what if the case comes where I need to have other columns other than the thousand collumn to be in the vertical lines. Say I want only the unit collumn or maybe all the columns to be in vertical lines, how do I go about that?
 
That's interesting. Could you please explain how you succeeded in having the thousand collumn to go within the vertical lines? Am asking this because what if the case comes where I need to have other columns other than the thousand collumn to be in the vertical lines. Say I want only the unit collumn or maybe all the columns to be in vertical lines, how do I go about that?
Hit "reply" to his post. Note the {r|r|rr}.

-Dan
 
Top