使用表格环境对齐第一列的右括号

使用表格环境对齐第一列的右括号

我正在尝试使用 tabular 环境对齐表格中的右括号。列表中的项目标记为“i.)”、“ii.)”和“iii.)”。

我确信使用 tablists 包可以更轻松地完成此操作,但我想使用表格环境。

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage[utf8]{inputenc}
\usepackage{mathtools,array}


\setlength{\oddsidemargin}{0.0in}
\setlength{\evensidemargin}{0.0in} \setlength{\textwidth}{6.1in}
\setlength{\topmargin}{0.0in} \setlength{\textheight}{9in}



\begin{document}

\noindent {\em $R$ is an integral domain.} \vskip1.25mm
\noindent\hspace{0.75em}
\begin{tabular}{@{}r@{}l}
\textbf{i.) }   &   {\em $r$ in a nonzero element of $R$ that is not a unit. It is \textbf{irreducible} in $R$ if, and only if, for} \\
                &   {\em every pair of elements $a$ and $b$ in $R$ such that $r = ab$, either $a$ or $b$ is a unit. It is \textbf{reduc-}} \\
                &   {\em \textbf{ible} in $R$ if, and only if, it is not irreducible.} \\
\textbf{ii.) }  &   {\em $p$ is a nonzero element of $R$ that is not a unit. It is \textbf{prime} in $R$ if, and only if, for every} \\
                &   {\em pair of elements $a$ and $b$ in $R$ such that $p \mid ab$, either $p \mid a$ or $p \mid b$.} \\
\textbf{iii.) } &   {\em $a$ and $b$ are \textbf{associates} in $R$ if, and only if, there is a unit $u \in R$ such that $a = ub$.}
\end{tabular}


\end{document}

答案1

您需要的是列表,而不是表格。

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{mathtools,array}
\usepackage{enumitem}


\begin{document}

\emph{$R$ is an integral domain.}

\begin{enumerate}[label=\bfseries\roman*.)]
\item $r$ in a nonzero element of $R$ that is not a unit. It is \textbf{irreducible} in $R$ if,
  and only if, for every pair of elements $a$ and $b$ in $R$ such that $r = ab$, either $a$ or
  $b$ is a unit. It is \textbf{reducible} in $R$ if, and only if, it is not irreducible.

\item $p$ is a nonzero element of $R$ that is not a unit. It is \textbf{prime} in $R$ if,
  and only if, for every pair of elements $a$ and $b$ in $R$ such that $p \mid ab$, either
  $p \mid a$ or $p \mid b$.

\item $a$ and $b$ are \textbf{associates} in $R$ if, and only if, there is a unit $u \in R$
  such that $a = ub$.
\end{enumerate}

\end{document}

我不会将整个内容设置为斜体,但这是您的文档。

在此处输入图片描述

我不确定你为什么坚持要有额外的边距。不过,你可以这样做。我必须警告你,从印刷的角度来看,我发现这很有争议。

长段斜体文本难以阅读;标签无需使用粗体;在我看来,额外的边距毫无用处。我的出发点是,如果某件事在 LaTeX 中需要太多技巧才能实现,那么它很可能是印刷错误。

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{mathtools,array}
\usepackage{enumitem}

\setlength{\oddsidemargin}{0.0in}
\setlength{\evensidemargin}{0.0in} \setlength{\textwidth}{6.1in}
\setlength{\topmargin}{0.0in} \setlength{\textheight}{9in}


\begin{document}

\section{Your output}

\noindent {\em $R$ is an integral domain.} \vskip1.25mm
\noindent\hspace{0.75em}
\begin{tabular}{@{}r@{}l}
\textbf{i.) }   &   {\em $r$ in a nonzero element of $R$ that is not a unit. It is \textbf{irreducible} in $R$ if, and only if, for} \\
                &   {\em every pair of elements $a$ and $b$ in $R$ such that $r = ab$, either $a$ or $b$ is a unit. It is \textbf{reduc-}} \\
                &   {\em \textbf{ible} in $R$ if, and only if, it is not irreducible.} \\
\textbf{ii.) }  &   {\em $p$ is a nonzero element of $R$ that is not a unit. It is \textbf{prime} in $R$ if, and only if, for every} \\
                &   {\em pair of elements $a$ and $b$ in $R$ such that $p \mid ab$, either $p \mid a$ or $p \mid b$.} \\
\textbf{iii.) } &   {\em $a$ and $b$ are \textbf{associates} in $R$ if, and only if, there is a unit $u \in R$ such that $a = ub$.}
\end{tabular}

\section{My output}

\noindent\emph{$R$ is an integral domain.}

\begin{enumerate}[label=\normalfont\bfseries\roman*.),topsep=1.25mm]
\setlength{\leftskip}{0.75em}\em
\item $r$ in a nonzero element of $R$ that is not a unit. It is \textbf{irreducible} in $R$ if, 
  and only if, for every pair of elements $a$ and $b$ in $R$ such that $r = ab$, either $a$ or 
  $b$ is a unit. It is \textbf{reducible} in $R$ if, and only if, it is not irreducible.

\item $p$ is a nonzero element of $R$ that is not a unit. It is \textbf{prime} in $R$ if,
  and only if, for every pair of elements $a$ and $b$ in $R$ such that $p \mid ab$, either
  $p \mid a$ or $p \mid b$.

\item $a$ and $b$ are \textbf{associates} in $R$ if, and only if, there is a unit $u \in R$ 
  such that $a = ub$.
\end{enumerate}


\end{document}

在此处输入图片描述

相关内容