問題
multicol
嘿,我花了大約 3 個小時試圖用LaTeX解決這個問題。希望它能幫助一些人:LaTeX 中的陣列截斷
正如您所看到的,我在環境中的數組在環境中看起來很好的環境中\align*
被切斷:multicol
\align*
align*
環境中的數組
這是我的程式碼:
\begin{align*}...\end{align*}
沒有切斷:
\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
與切斷:
\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}
解決方案
如果你編譯的 LaTeX 解決方案是將 long 分成\begin{align*}...\end{align*}
幾個“\begin{align*}...\end{align*}”,那麼你會得到類似的東西:
\begin{multicol}{2}
...
\begin{align*}...\end{align*}
\begin{align*}...\end{align*}
\begin{align*}...\end{align*}
...
\end{multicol}
所以,正確的程式碼:
\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}