我想使用数组构造枚举;也就是说,我想要
\begin{enumerate}[i]
\begin{array} {lr}
\item $a \sim a$ & (reflexivity)
\item $a \sim b$ then $b \sim a$ & (symmetry)
\item $if a \sim b and b \sim c then a \sim c$ & (transitivity)
\end{array}
\end{enumerate}
看起来像
a ~ a (reflexivity)
a ~ b then b ~ a (symmetry)
if a ~ b and b ~ c then a ~ c (transitivity)
答案1
稍微可定制的环境;我会避免将标签一直推到右边距,因为眼睛不擅长在白色背景上保持方向。
\documentclass{article}
\usepackage{lipsum}
\newcounter{axiomlist}
\newenvironment{axiomlist}[1][\arabic*.]
{\flushleft
\setcounter{axiomlist}{0}%
\setaxiomlistcount{#1}%
\noindent
\begin{tabular}{@{}ll@{}}}
{\end{tabular}
\endflushleft}
\def\setaxiomlistcount#1{\setaxiomlistcountaux#1\setaxiomlistcountaux}
\def\setaxiomlistcountaux#1*#2\setaxiomlistcountaux{%
\renewcommand\theaxiomlist{#1{axiomlist}#2}%
\def\item{%
\refstepcounter{axiomlist}
\makebox[\leftmargini][r]{\theaxiomlist}\hspace{\labelsep}%
}%
}
\begin{document}
\lipsum[2]
\begin{axiomlist}[(\roman*)]
\item $a\sim a$ & (reflexivity) \\
\item if $a\sim b$, then $b\sim a$ & (symmetry) \\
\item if $a\sim b$ and $b\sim c$, then $a\sim c$ & (transitivity)
\end{axiomlist}
\lipsum[3]
\begin{axiomlist}
\item $a\sim a$ & (reflexivity) \\
\item if $a\sim b$, then $b\sim a$ & (symmetry) \\
\item if $a\sim b$ and $b\sim c$, then $a\sim c$ & (transitivity)
\end{axiomlist}
\lipsum[4]
\end{document}
可选参数(默认\arabic*.
)必须包含*
代表计数器的。
答案2
如果你真的需要一个带有 的版本array
,就可以了。但是,似乎tabular
会更有用,而且enumerate
——没用。(原始代码在更改时进行了注释,以便清晰起见)。
\documentclass{article}
\begin{document}
%\begin{enumerate}[i] % what for -- PS
% \begin{array} {lr}
\begin{tabular}{l@{\qquad}l}
% \item
$a \sim a$ & (reflexivity)\\
% \item
$a \sim b$ then $b \sim a$ & (symmetry)\\
% \item
%$if a \sim b and b \sim c then a \sim c$ & (transitivity)
if $a \sim b$ and $b \sim c$ then $a \sim c$ & (transitivity)
\end{tabular}
% \end{array}
%\end{enumerate}
\end{document}
仍需要对间距进行一些修正。