我遇到了与此类似的对齐问题问题。但使用分栏符并没有解决我的问题,就像在这个问题中一样。
我想我可以尝试对齐,但用这种新格式重写所有内容会很烦人。有没有办法调整此代码以确保对齐是可接受的?
以下是一些示例代码:
\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}