TransWikia.com

Placing arrays side by side

TeX - LaTeX Asked on December 20, 2020

I want to place three arrays side by side. They all should be aligned by their top line. How can I do that with the following arrays:

[
begin{array}{c c | c}
p   &   q   &   p   land   q    hline
1   &   1   &   1 
1   &   0   &   0 
0   &   1   &   0 
0   &   0   &   0 
end{array}
]

[
begin{array}{c c | c}
p   &   q   &   p   lor    q    hline
1   &   1   &   1 
1   &   0   &   1 
0   &   1   &   1 
0   &   0   &   0 
end{array}
]

[
begin{array}{c | c}
p   &   lnot p  hline
1   &   0 
0   &   1 
end{array}
]

One Answer

documentclass{article}

begin{document}
[
begin{array}[t]{c c | c}
p   &   q   &   p   land   q    hline
1   &   1   &   1 
1   &   0   &   0 
0   &   1   &   0 
0   &   0   &   0 
end{array}
qquad
begin{array}[t]{c c | c}
p   &   q   &   p   lor    q    hline
1   &   1   &   1 
1   &   0   &   1 
0   &   1   &   1 
0   &   0   &   0 
end{array}
qquad
begin{array}[t]{c | c}
p   &   lnot p  hline
1   &   0 
0   &   1 
end{array}
]

enter image description here

or if you remove arrays' positioning options [t] in above MWE, you will get:

enter image description here

Correct answer by Zarko on December 20, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP