在 Latex 中编写格式良好的漂亮公式

在 Latex 中编写格式良好的漂亮公式

我想在论文中以专业的方式写出 4 个方程式,但又不占用太多空间。这是我的方程式当前的屏幕截图,下面是这 4 个方程式的代码。我怎样才能让这些方程式更美观?此外,我写的内容收到了很多 latex 错误。

在此处输入图片描述

\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


None^{Callers} \Or None^{Callees}$=$0\\
Low^{Callers} \Or Low^{Callees}$=$1\\
1$<${Medium^{Callers} \Or Medium^{Callees}}$<=$5\\
5$<${High^{Callers} \Or High^{Callees}}






\end{document}

答案1

请注意,“ Min”MWE表示最小。

以下内容适合您吗?

\documentclass[a4paper,12pt]{article}
\usepackage{mathtools}

\newcommand{\vn}[1]{\mathit{#1}} % or: \mathrm{#1}
\newcommand{\Or}{\mathrel{\big\Vert}}


\newcommand{\Callers}{\mathrm{Callers}}
\newcommand{\Callees}{\mathrm{Callees}}
\newcommand{\None}{\mathrm{None}}
\newcommand{\Low}{\mathrm{Low}}
\newcommand{\Medium}{\mathrm{Medium}}
\newcommand{\High}{\mathrm{High}}
\begin{document}
\begin{align*}
\None^{\Callers} &\Or \None^{\Callees}=0\\
\Low^{\Callers} &\Or \Low^{\Callees}=1\\
1< \Medium^{\Callers} &\Or \Medium^{\Callees} \leq 5\\
5 < \High^{\Callers}  &\Or \High^{\Callees}
\end{align*}
\end{document} 

在此处输入图片描述

答案2

我会使用单一gather*环境。

在此处输入图片描述

\documentclass{article}
\usepackage{amsmath}
\newcommand\Or{\mathbin{\Vert}}
\newcommand\vn[1]{\mathit{#1}}
\begin{document}
\begin{gather*}
\vn{None}^{\vn{Callers}} \Or \vn{None}^{\vn{Callees}}=0\\
\vn{Low}^{\vn{Callers}} \Or \vn{Low}^{\vn{Callees}}=1\\
1<{\vn{Medium}^{\vn{Callers}} \Or \vn{Medium}^{Callees}}\le5\\
5<{\vn{High}^{\vn{Callers}} \Or \vn{High}^{Callees}}
\end{gather*}
\end{document}

相关内容