使用具有多列的收集時的對齊問題

使用具有多列的收集時的對齊問題

我有一個與此類似的對齊問題問題。但是使用分欄符號並沒有像在這個問題中那樣解決我的問題。

我想我可以嘗試對齊,但是用這種新格式重寫所有內容會很煩人。有沒有辦法調整此程式碼以確保對齊是可以接受的?

這是一些範例程式碼:

\documentclass{article}
\usepackage[utf8]{inputenc}

\usepackage{multicol}
\usepackage{amsmath}

\begin{document}

\begin{multicols}{2}
\subsubsection*{Omaha}
\begin{gather*}
F = FB \neq \textbf{MB = MBS} \\
M = \textbf{MZ = MBD }\neq FZ \\
B = MZS = FBS \neq FZS \\
Z = MZD = FBD \neq FZD 
\end{gather*}
\columnbreak
\subsubsection*{Crow}
\begin{gather*}
F = \textbf{FB = FZS} \neq MB \\
M = MZ \neq \textbf{FZ = FZD} \\
B = FBS = MZS \neq MBS \\
Z = FBD = MZD \neq MBD 
\end{gather*}
\end{multicols}

\end{document}

答案1

使用tabularx表格而不是multicol環境:

在此輸入影像描述

(紅線顯示文字邊框)

\documentclass{article}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\usepackage{tabularx}
\usepackage{amsmath}

\begin{document}

\noindent%
\begin{tabularx}{\linewidth}{@{} X @{} X @{}}
\subsubsection*{Omaha}
\begin{gather*}
F = FB \neq \mathbf{MB = MBS} \\
M = \mathbf{MZ = MBD }\neq FZ \\
B = MZS = FBS \neq FZS \\
Z = MZD = FBD \neq FZD
\end{gather*}
    &
\subsubsection*{Crow}
\begin{gather*}
F = \mathbf{FB = FZS} \neq MB \\
M = MZ \neq \mathbf{FZ = FZD} \\
B = FBS = MZS \neq MBS \\
Z = FBD = MZD \neq MBD
\end{gather*}
\end{tabularx}
or

\noindent%
\begin{tabularx}{\linewidth}{@{} X @{} X @{}}
\subsubsection*{Omaha}
\[\begin{aligned}
F & = FB \neq \mathbf{MB = MBS} \\
M & = \mathbf{MZ = MBD }\neq FZ \\
B & = MZS = FBS \neq FZS \\
Z & = MZD = FBD \neq FZD
\end{aligned}\]
    &
\subsubsection*{Crow}
\[\begin{aligned}
F & = \mathbf{FB = FZS} \neq MB \\
M & = MZ \neq \mathbf{FZ = FZD} \\
B & = FBS = MZS \neq MBS \\
Z & = FBD = MZD \neq MBD
\end{aligned}\]
\end{tabularx}

\end{document}

答案2

您也許可以使用帶有一些小型頁面的表格環境,如下所示:

\begin{tabular}{p{.5\textwidth}p{.5\textwidth}}
    \begin{minipage}{1\textwidth}
        \subsubsection*{Omaha}
        $
        F = FB \neq \textbf{MB = MBS} \\
        M = \textbf{MZ = MBD }\neq FZ \\
        B = MZS = FBS \neq FZS \\
        Z = MZD = FBD \neq FZD 
        $
    \end{minipage}
    &
    \begin{minipage}{1\textwidth}
        \subsubsection*{Crow}
        $
        F = \textbf{FB = FZS} \neq MB \\
        M = MZ \neq \textbf{FZ = FZD} \\
        B = FBS = MZS \neq MBS \\
        Z = FBD = MZD \neq MBD 
        $
    \end{minipage}  
\end{tabular}

相關內容