\documentclass{article}
\usepackage{lipsum}
\usepackage{multicol}
\usepackage{nccmath}
\begin{document}
\setlength{\columnseprule}{0.4pt}
\begin{multicols}{2}
\begin{equation} a = a \end{equation}
\columnbreak % why does this columnbreak insert vspace?
\begin{equation} a = a \end{equation}
\end{multicols}
\begin{multicols}{2}
\begin{equation} a = a \end{equation}
\begin{equation} a = a \end{equation}
\end{multicols}
\end{document}
答案1
您可以在本地将其设置\multicolsep
为 0pt。但是,使用起来会更简单tabularx
:我建议在方程环境中自动定义一个带有单元格内容的新列类型,从而使输入变得非常简单:
\documentclass{article}
\usepackage{lipsum}
\usepackage{multicol}
\usepackage{nccmath}
\usepackage{tabularx}
\makeatletter
\newcommand*{\compress}{\@minipagetrue}
\makeatother
\newcolumntype{E}{@{}>{\compress\equation}X<{\endequation}@{}}
\begin{document}
\lipsum[11]
\setlength{\columnseprule}{0.4pt}
{\setlength{\multicolsep}{0pt}
\begin{multicols}{2}
\begin{equation} a = a \end{equation}
\columnbreak % why does this columnbreak insert vspace?
\begin{equation} a = a \end{equation}
\end{multicols}
\begin{multicols}{2}
\begin{equation} a = a \end{equation}
\begin{equation} a = a \end{equation}
\end{multicols}
}
\vspace{4ex}
{\centering\belowdisplayskip=0pt
\begin{tabularx}{\textwidth}{@{}E@{\enspace}|@{\enspace}E@{}}
a = a & a = a \\[-1ex]
a = a & a = a
\end{tabularx}
}
\end{document}
答案2
在前面插入一个空行\columnbreak
会使其看起来相同。