显示短信

显示短信

我想知道什么是最好的方式(最自然,最规范)来显示这样的内容在此处输入图片描述

也许对齐?

答案1

在我看来,逐项列表才是规范的。我这样说是因为数学都是内联的……align如果没有周围文本,数学显示样式可能比较合适,但在本例中不是这样。

\documentclass[a4paper]{article}
\usepackage{enumitem}
\begin{document}
\noindent the fibre or fibre category...
\begin{itemize}[leftmargin=1.2in,labelsep=.2in]
\item[\bfseries objects] $X \in\mathcal{E}$ with $pX = I$
\item[\bfseries morphisms] $x\rightarrow Y$ in $\mathcal{E}_f$ are morphisms 
  in $f: X\rightarrow Y$ in $\mathcal{E}$ for which $pf$ is the identity map 
  on $I$ in $\mathcal{B}$.
\end{itemize}
An object ...
\end{document}

在此处输入图片描述

如果您确实想要左对齐标签,则可以使用选项itemizealign=left我还将其归零itemsep,以便项目间的垂直间隙更小。

\documentclass[a4paper]{article}
\usepackage{enumitem}
\begin{document}
\noindent the fibre or fibre category...
\begin{itemize}[leftmargin=1.2in,labelwidth=.8in,labelsep=.2in,itemsep=0pt,align=left]
\item[\bfseries objects] $X \in\mathcal{E}$ with $pX = I$
\item[\bfseries morphisms] $x\rightarrow Y$ in $\mathcal{E}_f$ are morphisms 
  in $f: X\rightarrow Y$ in $\mathcal{E}$ for which $pf$ is the identity map 
  on $I$ in $\mathcal{B}$.
\end{itemize}
An object ...
\end{document}

在此处输入图片描述

答案2

假设您有以下几个描述,则可以方便地定义合适的环境:

\documentclass[a4paper]{article}
\usepackage{amsmath,amssymb}

\newlength{\categorywd}

\newenvironment{category}
 {%
  \settowidth{\categorywd}{\textbf{morphisms}}%
  \addtolength{\categorywd}{2em}%
  \begin{list}{}{%
    \setlength{\leftmargin}{\categorywd}%
    \setlength{\labelwidth}{\categorywd}%
    \setlength{\labelsep}{0pt}%
    \setlength{\itemsep}{0pt}%
  }%
 }
 {\end{list}}

\newcommand{\objects}{\categorytype{objects}}
\newcommand{\morphisms}{\categorytype{morphisms}}
\newcommand{\categorytype}[1]{%
  \item[{\makebox[\categorywd][l]{\quad\textbf{#1}}}]%
}


\begin{document}

\noindent
the \textbf{fibre} or \textbf{fibre category} $\mathbb{E}_f=p^{-1}(I)$ over~$I$
is the category with
\begin{category}
\objects $X \in\mathbb{E}$ with $pX = I$.

\morphisms $X\rightarrow Y$ in $\mathbb{E}_f$ are morphisms 
  $f\colon X\rightarrow Y$ in $\mathbb{E}$ for which $pf$ is the identity map 
  on $I$ in $\mathbb{B}$.
\end{category}
An object blah blah

\end{document}

在此处输入图片描述

答案3

环境tabularx是另一种解决方案:

\documentclass[a4paper]{article}
\usepackage{tabularx}

\begin{document}

\noindent the \textbf{fibre} or \textbf{fibre category}… \medskip

\noindent\begin{tabularx}{\linewidth}{@{\quad} >{\bfseries}rX@{}}%
 objects & $X \in\mathcal{E}$ with $pX = I$ \\
 morphisms & $x\rightarrow Y$ in $\mathcal{E}_f$ are morphisms
  in $f: X\rightarrow Y$ in $\mathcal{E}$ for which $pf$ is the identity map
  on $I$ in $\mathcal{B}$.
\end{tabularx}
An object ...\bigskip

\noindent\begin{tabularx}{\linewidth}{@{\quad}>{\bfseries}lX@{}}%
 objects & $X \in\mathcal{E}$ with $pX = I$ \\
 morphisms & $x\rightarrow Y$ in $\mathcal{E}_f$ are morphisms
  in $f: X\rightarrow Y$ in $\mathcal{E}$ for which $pf$ is the identity map
  on $I$ in $\mathcal{B}$.
\end{tabularx}

\end{document}

在此处输入图片描述

相关内容