Given A, B, C any string or maths code, given + any operation of my choice, I would like to display a really simple calculation – here addition. On below the result I would like to obtain :
A
+B
__
C
I can't do it here, but please see the underline as right under B (not my above ugly displaying). A, B and C should be aligned. The operator is displayed on the left of B.
Actually, I am wondering if there is a package for that, to perform this simply ?
Best Answer
What you can do is use the
tabular
environment:By using the
S
column of thesiunitx
package, you are able to set everything accordingly to their value (unidades, decenas, centenas, etc.)Now, regarding the line... I'm sorry, but I don't know what is the best approach. The result of the code mentioned above is:
I just realized that you could use
\hline
or\bottomrule
if using thebooktabs
package and get something decent:This would be the result: