0

I am writing a 2 column paper and I would like to organize my formulas into a table with 2 columns with the cells of the left column containing the left side of the equation and the cells in the right column containing the right side of the equation.

I would like to achieve this with the right side of each equation inside each of the cells of the right columns.

enter image description here

Here is what my equations currently look like:

enter image description here

Here is the source code I am using:

    \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 Answer 1

1

Like this?

enter image description here

For this you not need a table, Just use align* math environment defined in the amsmathpackage:

\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}

Edit (1): In two column document you equation in form as is, is to wide that can be fit in one column, You need to reorganize it for example as follows:

\[
\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}
\]

enter image description here

Edit (2): After your editing of question, the desired presentation of your equation can be as:

enter image description here

\[
\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}
\]

Note, your MWE still produce one column document (not two column as you mentioned in comment). Please, clarify this par of your question too.

3
  • this overflows to the right column, I am writing a 2 column paper and I need the formulas to not overflow to the right . Also, I would like a real table with lines drawn and cells appearing with solid lines Sep 11, 2020 at 5:34
  • @user3406764, sorry, from your MWE follows, that you have one column article. Of course, in two column version your equations in desired form are to wide. Please edit your question and make it more clear, i.e. correct your MWE accordingly (that it will generate two column document).
    – Zarko
    Sep 11, 2020 at 5:47
  • 2
    @user3406764, see edited answer. Anyway, please rewrite your MWE so, that it will generate two column document.
    – Zarko
    Sep 11, 2020 at 6:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .