![枚举并在右侧对齐解释列](https://linux22.com/image/304173/%E6%9E%9A%E4%B8%BE%E5%B9%B6%E5%9C%A8%E5%8F%B3%E4%BE%A7%E5%AF%B9%E9%BD%90%E8%A7%A3%E9%87%8A%E5%88%97.png)
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\renewcommand{\labelenumii}{\theenumii}
\renewcommand{\theenumii}{\theenumi.\arabic{enumii}.}
\begin{document}
\begin{enumerate}
\item $p \vdash p \lor q $ explanation
\begin{enumerate}
\item $p \Rightarrow q$ explanation
\end{enumerate}
\item $p \Rightarrow p \lor q$ explanation
\end{enumerate}
\end{document}
我试图将这三个解释向右对齐,就像使用表格环境一样,但我选择不使用表格,因为我无法弄清楚如何让枚举与它一起工作,也无法在证明中看到第 1.1 行的漂亮缩进
答案1
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\renewcommand{\labelenumii}{\theenumii}
\renewcommand{\theenumii}{\theenumi.\arabic{enumii}.}
\newcommand\explanation[1]{%
\ifhmode\unskip\fi\hspace*{1em plus 1fill}%
\parbox[t]{6cm}{#1}}
\begin{document}
\begin{enumerate}
\item $p \vdash p \lor q $ \explanation{
zz z z z z zzz blah balah
zz z z z z zzz blah balah
zz z z z z zzz blah balah}
\begin{enumerate}
\item $p \Rightarrow q$ \explanation{zzzz}
\end{enumerate}
\item $p \Rightarrow p \lor q$ \explanation{yet more comments
yet more comments yet more comments yet more comments}
\end{enumerate}
\end{document}