TeX - LaTeX Asked on April 22, 2021
documentclass[10pt,a4paper]{article}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{graphicx}
begin{document}
A+B
C+D
D+E
vdots
Y+Z
end{document}
I want the output like the dots should be placed below the plus sign.
But i am getting the dots aligned to the left, how can I fix it.
Can someone please help me out?
Here's a way to this :
begin{document}
$begin{array}{l@{~}c@{~}l}
A &+ &B
C &+ &D
&vdots&
E &+ &F
end{array}$
end{document}
Correct answer by mxnc baud on April 22, 2021
One way is use matrix
as defined in amsmath
package:
documentclass{article}
usepackage{amsmath}
begin{document}
[
begin{matrix}
A + B
B + C
vdots [3pt]
Y + Z
end{matrix}
]
end{document}
or with array
(based on the last solution stolen from deleted @campa answer):
documentclass{article}
begin{document}
[
begin{array}[t]{r@{:}c@{:}l}
A & + & B
B & + & C
& vdots & [3pt]
Y & + & Z
end{array}
]
end{document}
Result is in this particular case similar as before, however, now terms on left and right from + can have different lengths but math expressions are still centered at + sign.
Answered by Zarko on April 22, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP