TransWikia.com

Arrays cutoff in multicol - 2 columns

TeX - LaTeX Asked by Misha Lubich on April 22, 2021

The Problem

Hey, I spent about 3 hours trying to solve this problem with multicol in LaTeX. Hope it would help some people out: arrays cuttoff in LaTeX

So as you could see, my arrays in the align* environment are cut off in the multicol environment that looked fine in the align* environment: Arrays in an align* environment

Here’s my code:

begin{align*}...end{align*} without cut off:

documentclass[11pt]{article}
usepackage{header}
usepackage{pgfplots}
allowdisplaybreaks
renewcommand{arraystretch}{1.5}

begin{document}

begin{align*} 
left[begin{array}{cccc|c} 
0 & 0 & 1 & -frac{5}{6} & -frac{35}{3} 
0 & 1 & 0 & 1 & 2 
0 & 1 & frac{9}{5} & 0 & frac{111}{5} 
1 & 0 & 0 & 0 & 19
end{array}right]  
text{$R_3-frac{9}{5}R_1$} 
left[begin{array}{cccc|c} 
0 & 0 & 1 & -frac{5}{6} & -frac{35}{3} 
0 & 1 & 0 & 1 & 2 
0 & 1 & 0 & frac{3}{2} & frac{216}{5} 
1 & 0 & 0 & 0 & 19
end{array}right]  
text{$R_3-R_1$} 
left[begin{array}{cccc|c} 
0 & 0 & 1 & -frac{5}{6} & -frac{35}{3} 
0 & 1 & 0 & 1 & 2 
0 & 0 & 0 & frac{1}{2} & frac{206}{5} 
1 & 0 & 0 & 0 & 19
end{array}right]  
text{Normalizing $R_3$} 
left[begin{array}{cccc|c} 
0 & 0 & 1 & -frac{5}{6} & -frac{35}{3} 
0 & 1 & 0 & 1 & 2 
0 & 0 & 0 & 1 & frac{412}{5} 
1 & 0 & 0 & 0 & 19
end{array}right]  
text{$R_2-R_3$} 
left[begin{array}{cccc|c} 
0 & 0 & 1 & -frac{5}{6} & -frac{35}{3} 
0 & 1 & 0 & 0 & -frac{402}{5} 
0 & 0 & 0 & 1 & frac{412}{5} 
1 & 0 & 0 & 0 & 19
end{array}right]  
text{$R_1+frac{5}{6}R_3$} 
left[begin{array}{cccc|c} 
0 & 0 & 1 & 0 & frac{171}{3} 
0 & 1 & 0 & 0 & -frac{402}{5} 
0 & 0 & 0 & 1 & frac{412}{5} 
1 & 0 & 0 & 0 & 19
end{array}right]  
text{Rearranging into Row Echelon Form} 
left[begin{array}{cccc|c} 
1 & 0 & 0 & 0 & 19 
0 & 1 & 0 & 0 & -frac{402}{5} 
0 & 0 & 1 & 0 & frac{171}{3} 
0 & 0 & 0 & 1 & frac{412}{5}
end{array}right]  
end{align*}

end{document}

multicol with the cut off:

documentclass[11pt]{article}
usepackage{header}
usepackage{pgfplots}
usepackage{multicol}
allowdisplaybreaks
setlength{columnsep}{0cm} 
setlength{columnseprule}{0.4pt}
renewcommand{arraystretch}{1.5}

begin{document}
begin{multicol*}{2}
begin{align*} 
left[begin{array}{cccc|c} 
0 & 0 & 1 & -frac{5}{6} & -frac{35}{3} 
0 & 1 & 0 & 1 & 2 
0 & 1 & frac{9}{5} & 0 & frac{111}{5} 
1 & 0 & 0 & 0 & 19
end{array}right]  
text{$R_3-frac{9}{5}R_1$} 
left[begin{array}{cccc|c} 
0 & 0 & 1 & -frac{5}{6} & -frac{35}{3} 
0 & 1 & 0 & 1 & 2 
0 & 1 & 0 & frac{3}{2} & frac{216}{5} 
1 & 0 & 0 & 0 & 19
end{array}right]  
text{$R_3-R_1$} 
left[begin{array}{cccc|c} 
0 & 0 & 1 & -frac{5}{6} & -frac{35}{3} 
0 & 1 & 0 & 1 & 2 
0 & 0 & 0 & frac{1}{2} & frac{206}{5} 
1 & 0 & 0 & 0 & 19
end{array}right]  
text{Normalizing $R_3$} 
left[begin{array}{cccc|c} 
0 & 0 & 1 & -frac{5}{6} & -frac{35}{3} 
0 & 1 & 0 & 1 & 2 
0 & 0 & 0 & 1 & frac{412}{5} 
1 & 0 & 0 & 0 & 19
end{array}right]  
text{$R_2-R_3$} 
left[begin{array}{cccc|c} 
0 & 0 & 1 & -frac{5}{6} & -frac{35}{3} 
0 & 1 & 0 & 0 & -frac{402}{5} 
0 & 0 & 0 & 1 & frac{412}{5} 
1 & 0 & 0 & 0 & 19
end{array}right]  
text{$R_1+frac{5}{6}R_3$} 
left[begin{array}{cccc|c} 
0 & 0 & 1 & 0 & frac{171}{3} 
0 & 1 & 0 & 0 & -frac{402}{5} 
0 & 0 & 0 & 1 & frac{412}{5} 
1 & 0 & 0 & 0 & 19
end{array}right]  
text{Rearranging into Row Echelon Form} 
left[begin{array}{cccc|c} 
1 & 0 & 0 & 0 & 19 
0 & 1 & 0 & 0 & -frac{402}{5} 
0 & 0 & 1 & 0 & frac{171}{3} 
0 & 0 & 0 & 1 & frac{412}{5}
end{array}right]  
end{align*}

end{multicol*}

end{document}

The Solution

If your compiled LaTeX solution is to split up the long begin{align*}...end{align*} into a few`begin{align*}…end{align*}’ so you have something like:

begin{multicol}{2}
...
begin{align*}...end{align*}
begin{align*}...end{align*}
begin{align*}...end{align*}
...
end{multicol}

So, correct code:

begin{multicol*}{2}
begin{align*}
text{Simplifying} 
left[begin{array}{cccc|c} 
0 & 0 & 1 & -frac{5}{6} & -frac{35}{3} 
0 & 1 & 0 & 1 & 2 
0 & 1 & frac{9}{5} & 0 & frac{111}{5} 
1 & 0 & 0 & 0 & 19
end{array}right]  
text{$R_3-frac{9}{5}R_1$} 
left[begin{array}{cccc|c} 
0 & 0 & 1 & -frac{5}{6} & -frac{35}{3} 
0 & 1 & 0 & 1 & 2 
0 & 1 & 0 & frac{3}{2} & frac{216}{5} 
1 & 0 & 0 & 0 & 19
end{array}right]  
end{align*}
begin{align*}
text{$R_3-R_1$} 
left[begin{array}{cccc|c} 
0 & 0 & 1 & -frac{5}{6} & -frac{35}{3} 
0 & 1 & 0 & 1 & 2 
0 & 0 & 0 & frac{1}{2} & frac{206}{5} 
1 & 0 & 0 & 0 & 19
end{array}right]  
text{Normalizing $R_3$} 
left[begin{array}{cccc|c} 
0 & 0 & 1 & -frac{5}{6} & -frac{35}{3} 
0 & 1 & 0 & 1 & 2 
0 & 0 & 0 & 1 & frac{412}{5} 
1 & 0 & 0 & 0 & 19
end{array}right]  
text{$R_2-R_3$} 
left[begin{array}{cccc|c} 
0 & 0 & 1 & -frac{5}{6} & -frac{35}{3} 
0 & 1 & 0 & 0 & -frac{402}{5} 
0 & 0 & 0 & 1 & frac{412}{5} 
1 & 0 & 0 & 0 & 19
end{array}right]  
end{align*}
begin{align*}
text{$R_1+frac{5}{6}R_3$} 
left[begin{array}{cccc|c} 
0 & 0 & 1 & 0 & frac{171}{3} 
0 & 1 & 0 & 0 & -frac{402}{5} 
0 & 0 & 0 & 1 & frac{412}{5} 
1 & 0 & 0 & 0 & 19
end{array}right]  
text{Rearranging into Row Echelon Form} 
left[begin{array}{cccc|c} 
1 & 0 & 0 & 0 & 19 
0 & 1 & 0 & 0 & -frac{402}{5} 
0 & 0 & 1 & 0 & frac{171}{3} 
0 & 0 & 0 & 1 & frac{412}{5}
end{array}right]  
end{align*}

end{multicols*}


end{document}

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