在乳胶中写方程式时不要占用太多空间,如果方程式太长,也不要强制换行,并且方程式要保持对齐

在乳胶中写方程式时不要占用太多空间,如果方程式太长,也不要强制换行,并且方程式要保持对齐

我正在我的乳胶纸上写下以下方程式。问题是这些方程式占用了我论文中的太多空间,这是一个问题,因为我的空间有限。另外,我强制换行,这并不方便。我更希望自动换行。此外,我希望我的所有方程式都向左对齐。

    \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}}
% Copyright
%\setcopyright{none}
\setcopyright{acmcopyright}
%\setcopyright{acmlicensed}
%\setcopyright{rightsretained}
%\setcopyright{usgov}
%\setcopyright{usgovmixed}
%\setcopyright{cagov}
%\setcopyright{cagovmixed}

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

%
% The code below should be generated by the tool at
% http://dl.acm.org/ccs.cfm
% Please copy and paste the code instead of the example below. 
%
\begin{CCSXML}
<ccs2012>
 <concept>
  <concept_id>10010520.10010553.10010562</concept_id>
  <concept_desc>Computer systems organization~Embedded systems</concept_desc>
  <concept_significance>500</concept_significance>
 </concept>
 <concept>
  <concept_id>10010520.10010575.10010755</concept_id>
  <concept_desc>Computer systems organization~Redundancy</concept_desc>
  <concept_significance>300</concept_significance>
 </concept>
 <concept>
  <concept_id>10010520.10010553.10010554</concept_id>
  <concept_desc>Computer systems organization~Robotics</concept_desc>
  <concept_significance>100</concept_significance>
 </concept>
 <concept>
  <concept_id>10003033.10003083.10003095</concept_id>
  <concept_desc>Networks~Network reliability</concept_desc>
  <concept_significance>100</concept_significance>
 </concept>
</ccs2012>  
\end{CCSXML}

\ccsdesc[500]{Computer systems organization~Embedded systems}
\ccsdesc[300]{Computer systems organization~Redundancy}
\ccsdesc{Computer systems organization~Robotics}
\ccsdesc[100]{Networks~Network reliability}


\keywords{ACM proceedings, \LaTeX, text tagging}


\maketitle

\begin{gather*}
\vn{NoCallersU} + \vn{NoCalleesU}=\vn{None}^{\vn{Callers}} 
  \And \vn{None}^{\vn{Callees}} \\[1ex]
\begin{aligned}
\vn{LowCombination}
&=\bigl(\vn{Low}^{\vn{Callers}} \And (\vn{Low}^{\vn{Callees}} 
  \Or \vn{None}^{\vn{Callees}})\bigr) \\
&\qquad \Or\bigl( \vn{None}^{\vn{Callers}} \And \vn{Low}^{\vn{Callees}} \bigr) \\[1ex]
\vn{MediumCombination}
&=\bigl(\vn{Medium}^{\vn{Callers}}\And(\vn{Medium}^{\vn{Callees}} \Or \\ 
&\qquad \vn{Low}^{\vn{Callees}}  \Or \vn{None}^{\vn{Callees}}) \bigr) \Or \\
&\qquad \bigl(( \vn{None}^{\vn{Callers}} \Or \vn{Low}^{\vn{Callers}} ) 
 \And \vn{Medium}^{\vn{Callees}}\bigr)\\[1ex]
 \vn{HighCombination}
&=\bigl(\vn{High}^{\vn{Callers}}\And(\vn{High}^{\vn{Callees}} \Or\vn{Medium}^{\vn{Callees}} \Or \\ 
&\qquad \vn{Low}^{\vn{Callees}}  \Or \vn{None}^{\vn{Callees}}) \bigr) \Or \\
&\qquad \bigl(\vn{High}^{\vn{Callers}}\And(\vn{Medium}^{\vn{Callees}} \Or \\ 
&\qquad \vn{Low}^{\vn{Callees}}  \Or \vn{None}^{\vn{Callees}}) \bigr)\\[1ex]
\end{aligned}
\end{gather*}



\end{document}

以下是方程式写入论文时的截图: 在此处输入图片描述

答案1

使方程式适合窄列的一种方法是(a)在之后立即引入新的换行符\vn{HighCombination}\vn{HighCombination}以及\vn{HighCombination}(b)将后续行的对齐点放在更左侧。

顺便说一句,我会不是加载lmodern包,因为文档类sigconf的选项acmart指定了另一种数学和文本字体——这可能不应该被加载所覆盖lmodern。我肯定会不是加载该fixltx2e包,除非我的 TeX 发行版至少有五年历史了(幸运的是,事实并非如此)。

在此处输入图片描述

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


% Copyright
%\setcopyright{none}
\setcopyright{acmcopyright}
%\setcopyright{acmlicensed}
%\setcopyright{rightsretained}
%\setcopyright{usgov}
%\setcopyright{usgovmixed}
%\setcopyright{cagov}
%\setcopyright{cagovmixed}

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

%
% The code below should be generated by the tool at
% http://dl.acm.org/ccs.cfm
% Please copy and paste the code instead of the example below. 
%
\begin{CCSXML}
<ccs2012>
 <concept>
  <concept_id>10010520.10010553.10010562</concept_id>
  <concept_desc>Computer systems organization~Embedded systems</concept_desc>
  <concept_significance>500</concept_significance>
 </concept>
 <concept>
  <concept_id>10010520.10010575.10010755</concept_id>
  <concept_desc>Computer systems organization~Redundancy</concept_desc>
  <concept_significance>300</concept_significance>
 </concept>
 <concept>
  <concept_id>10010520.10010553.10010554</concept_id>
  <concept_desc>Computer systems organization~Robotics</concept_desc>
  <concept_significance>100</concept_significance>
 </concept>
 <concept>
  <concept_id>10003033.10003083.10003095</concept_id>
  <concept_desc>Networks~Network reliability</concept_desc>
  <concept_significance>100</concept_significance>
 </concept>
</ccs2012>  
\end{CCSXML}

\ccsdesc[500]{Computer systems organization~Embedded systems}
\ccsdesc[300]{Computer systems organization~Redundancy}
\ccsdesc{Computer systems organization~Robotics}
\ccsdesc[100]{Networks~Network reliability}


\keywords{ACM proceedings, \LaTeX, text tagging}


\maketitle

% \allowdisplaybreaks  % optional, to allow page breaks
\begin{gather*}
\vn{NoCallersU} + \vn{NoCalleesU}
=\vn{None}^{\vn{Callers}} 
  \And \vn{None}^{\vn{Callees}} \\[1ex]
\begin{aligned}
\vn{Low}&\vn{Combination} \\
&=\bigl(\vn{Low}^{\vn{Callers}} \And (\vn{Low}^{\vn{Callees}} 
  \Or \vn{None}^{\vn{Callees}})\bigr) \\
&\quad \Or\bigl( \vn{None}^{\vn{Callers}} \And \vn{Low}^{\vn{Callees}} \bigr) \\[1ex]
\vn{Medium}&\vn{Combination}\\
&=\bigl(\vn{Medium}^{\vn{Callers}}\And(\vn{Medium}^{\vn{Callees}} \\ 
&\quad \Or \vn{Low}^{\vn{Callees}}  \Or \vn{None}^{\vn{Callees}}) \bigr) \\
&\quad \Or \bigl(( \vn{None}^{\vn{Callers}} \Or \vn{Low}^{\vn{Callers}} ) 
 \And \vn{Medium}^{\vn{Callees}}\bigr)\\[1ex]
\vn{High}&\vn{Combination}\\
&=\bigl(\vn{High}^{\vn{Callers}}\And(\vn{High}^{\vn{Callees}} \Or\vn{Medium}^{\vn{Callees}} \\ 
&\quad \Or \vn{Low}^{\vn{Callees}}  \Or \vn{None}^{\vn{Callees}}) \bigr) \\
&\quad\Or \bigl(\vn{High}^{\vn{Callers}}\And(\vn{Medium}^{\vn{Callees}} \\ 
&\quad \Or \vn{Low}^{\vn{Callees}}  \Or \vn{None}^{\vn{Callees}}) \bigr)
\end{aligned}
\end{gather*}

\end{document}

相关内容