我正在写一篇两列的论文,我想将我的公式组织到一个两列的表格中,其中左列的单元格包含等式的左边,右列的单元格包含等式的右边。
我希望通过右列每个单元格内每个等式的右边来实现这一点。
以下是我的方程式目前的样子:
以下是我正在使用的源代码:
\documentclass[sigconf]{acmart}
\usepackage{booktabs} % For formal tables
\usepackage{algorithmic}
\usepackage{fixltx2e}
\usepackage{algorithm}
\usepackage{enumitem}
\usepackage{multirow}
\usepackage{hhline}
\usepackage{amsmath}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\newcommand\vn[1]{\mathit{#1}} % or: \mathrm{#1}
\newcommand\Or{\mathrel{\big\Vert}}
\setcopyright{acmcopyright}
% DOI
\acmDOI{xx.xxx/xxx_x}
% ISBN
\acmISBN{978-1-4503-8104-8/21/03}
%Conference
\acmConference[SAC'21]{ACM SAC Conference}{March 22-March 26, 2021}{Gwangju, South Korea}
\acmYear{2021}
\copyrightyear{2021}
%\thispagestyle{plain}
\acmArticle{4}
\acmPrice{15.00}
\pagestyle{plain}
\settopmatter{printfolios=true}
\begin{document}
\title{test}
\author{Anonymous Author(s)}
\begin{abstract}
abstract
\end{abstract}
\maketitle
\begin{gather*}
\vn{NoCallersU} + \vn{NoCalleesU}
=\vn{Callers}^{\vn{N}}
\And \vn{Callees}^{\vn{N}} \\[1ex]
\begin{aligned}
\vn{Low}&\vn{Combination} \\
&=\bigl(\vn{Callers}^{\vn{L}} \And \bigl(\vn{Callees}^{\vn{L}}
\Or \vn{Callees}^{\vn{N}})\bigr)\bigr) \\
&\quad \Or\bigl( \vn{Callers}^{\vn{N}} \And \vn{Callees}^{\vn{L}} \bigr) \\[1ex]
\vn{Medium}&\vn{Combination}\\
&=\bigl(\vn{Callers}^{\vn{M}}\And\bigl(\vn{Callees}^{\vn{M}} \\
&\quad \Or \vn{Callees}^{\vn{L}} \Or \vn{Callees}^{\vn{N}}\bigr) \bigr) \\
&\quad \Or \bigl(( \vn{Callers}^{\vn{N}} \Or \bigl(\vn{Callers}^{\vn{L}} )
\And \vn{Callees}^{\vn{M}}\bigr)\bigr)\\[1ex]
\vn{High}&\vn{Combination}\\
&=\bigl(\vn{Callers}^{\vn{H}}\And\bigl(\vn{Callees}^{\vn{H}} \Or\vn{Callees}^{\vn{M}} \\
&\quad \Or \vn{Callees}^{\vn{L}} \Or \vn{Callees}^{\vn{N}}\bigr) \bigr) \\
&\quad\Or \bigl(\vn{Callers}^{\vn{H}}\And\bigl(\vn{Callees}^{\vn{M}} \\
&\quad \Or \vn{Callees}^{\vn{L}} \Or \vn{Callees}^{\vn{N}}) \bigr)\bigr)
\end{aligned}
\end{gather*}
\end{document}
答案1
像这样?
为此,您不需要表格,只需使用包align*
中定义的数学环境amsmath
:
\documentclass[sigconf]{acmart}
%\usepackage{booktabs, hhline, multirow} % For formal tables
%\usepackage{algorithmic}
%\usepackage{fixltx2e}
%\usepackage{algorithm}
%\usepackage{enumitem}
\usepackage{amsmath}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\newcommand\vn[1]{\mathit{#1}} % or: \mathrm{#1}
\newcommand\Or{\mathrel{\big\Vert}}
\begin{document}
\begin{align*}
\vn{NoCallersU} + \vn{NoCalleesU}
& = \vn{Callers}^{\vn{N}} \And \vn{Callees}^{\vn{N}} \\[1ex]
%
\vn{Low}\vn{Combination}
& = \bigl(\vn{Callers}^{\vn{L}} \And \bigl(\vn{Callees}^{\vn{L}}
\Or \vn{Callees}^{\vn{N}})\bigr)\bigr) \\
&\quad \Or\bigl( \vn{Callers}^{\vn{N}} \And \vn{Callees}^{\vn{L}} \bigr) \\[1ex]
%
\vn{Medium}\vn{Combination}
& = \bigl(\vn{Callers}^{\vn{M}}\And\bigl(\vn{Callees}^{\vn{M}} \\
&\quad \Or \vn{Callees}^{\vn{L}} \Or \vn{Callees}^{\vn{N}}\bigr) \bigr) \\
&\quad \Or \bigl(( \vn{Callers}^{\vn{N}} \Or \bigl(\vn{Callers}^{\vn{L}} ) \And \vn{Callees}^{\vn{M}}\bigr)\bigr)\\[1ex]
%
\vn{High}\vn{Combination}
& = \bigl(\vn{Callers}^{\vn{H}}\And\bigl(\vn{Callees}^{\vn{H}} \Or\vn{Callees}^{\vn{M}} \\
&\quad \Or \vn{Callees}^{\vn{L}} \Or \vn{Callees}^{\vn{N}}\bigr) \bigr) \\
&\quad\Or \bigl(\vn{Callers}^{\vn{H}}\And\bigl(\vn{Callees}^{\vn{M}} \\
&\quad \Or \vn{Callees}^{\vn{L}} \Or \vn{Callees}^{\vn{N}}) \bigr)\bigr)
\end{align*}
\end{document}
编辑(1): 在两列文档中,您按原样格式化方程式,因为它太宽,无法放在一列中,您需要重新组织它,例如如下所示:
\[
\begin{aligned}
\vn{NoCallersU} + \vn{NoCalleesU}
& = \vn{Callers}^{\vn{N}} \And \vn{Callees}^{\vn{N}} \\[1ex]
%
\vn{Low}\vn{Combination}
& = \bigl(\vn{Callers}^{\vn{L}} \And \bigl(\vn{Callees}^{\vn{L}}\\
&\quad \Or \vn{Callees}^{\vn{N}})\bigr)\bigr) \\
&\quad \Or\bigl( \vn{Callers}^{\vn{N}} \And \vn{Callees}^{\vn{L}} \bigr) \\[1ex]
%
\vn{Medium}\vn{Combination}
& = \bigl(\vn{Callers}^{\vn{M}}\And\bigl(\vn{Callees}^{\vn{M}} \\
&\quad \Or \vn{Callees}^{\vn{L}} \Or \vn{Callees}^{\vn{N}}\bigr) \bigr) \\
&\quad \Or \bigl(( \vn{Callers}^{\vn{N}} \Or \bigl(\vn{Callers}^{\vn{L}} ) \\
&\quad\And \vn{Callees}^{\vn{M}}\bigr)\bigr)\\[1ex]
%
\vn{High}\vn{Combination}
& = \bigl(\vn{Callers}^{\vn{H}}\And\bigl(\vn{Callees}^{\vn{H}} \\
&\quad \Or\vn{Callees}^{\vn{M}} \\
&\quad \Or \vn{Callees}^{\vn{L}} \Or \vn{Callees}^{\vn{N}}\bigr) \bigr) \\
&\quad\Or \bigl(\vn{Callers}^{\vn{H}}\And\bigl(\vn{Callees}^{\vn{M}} \\
&\quad \Or \vn{Callees}^{\vn{L}} \Or \vn{Callees}^{\vn{N}}) \bigr)\bigr)
\end{aligned}
\]
编辑(2):编辑问题后,方程的期望表示形式可以是:
\[
\begin{array}{|l|l|}
\hline
\text{combination}
& \text{definition} \\
\hline
\vn{NoCallersU} + \vn{NoCalleesU}
& \vn{Callers}^{\vn{N}} \And \vn{Callees}^{\vn{N}} \\[1ex]
\hline
\vn{Low}\vn{Combination}
& \bigl(\vn{Callers}^{\vn{L}} \And \bigl(\vn{Callees}^{\vn{L}}\\
& \Or \vn{Callees}^{\vn{N}})\bigr)\bigr) \\
& \Or\bigl( \vn{Callers}^{\vn{N}} \And \vn{Callees}^{\vn{L}} \bigr) \\[1ex]
\hline
\vn{Medium}\vn{Combination}
& \bigl(\vn{Callers}^{\vn{M}}\And\bigl(\vn{Callees}^{\vn{M}} \\
& \Or \vn{Callees}^{\vn{L}} \Or \vn{Callees}^{\vn{N}}\bigr) \bigr) \\
& \Or \bigl(( \vn{Callers}^{\vn{N}} \Or \bigl(\vn{Callers}^{\vn{L}} ) \\
&\quad\And \vn{Callees}^{\vn{M}}\bigr)\bigr)\\[1ex]
\hline
\vn{High}\vn{Combination}
& \bigl(\vn{Callers}^{\vn{H}}\And\bigl(\vn{Callees}^{\vn{H}} \\
& \Or\vn{Callees}^{\vn{M}} \\
& \Or \vn{Callees}^{\vn{L}} \Or \vn{Callees}^{\vn{N}}\bigr) \bigr) \\
& \Or \bigl(\vn{Callers}^{\vn{H}}\And\bigl(\vn{Callees}^{\vn{M}} \\
& \Or \vn{Callees}^{\vn{L}} \Or \vn{Callees}^{\vn{N}}) \bigr)\bigr) \\
\hline
\end{array}
\]
请注意,您的 MWE 仍然生成单列文档(而不是您在评论中提到的双列文档)。请也澄清一下您问题的这一部分。