这里Manfred Sauter 要求在列表中第一个标签前留出适当的间距。但是,如果第一个标签前没有文本,则第一个标签根本不会缩进。如何\advance\itemindent-\parindent
更改行,以便在没有前面的文本的情况下使第一个标签缩进(与第二个、第三个等标签一样多)?
问题可以在这里看到(我从引用的问题中更改了示例):
\documentclass[twocolumn]{amsart}
\usepackage{enumitem}
\usepackage{etoolbox}
\makeatletter
\newenvironment{proofenum}
{\enumerate[wide]%
\edef\sauter@saveditemindent{\the\itemindent}%
\advance\itemindent-\parindent
\patchcmd{\@item}{\ignorespaces}{\sauter@restoreitemindent\ignorespaces}{}{}}
{\endenumerate}
\newcommand\sauter@restoreitemindent{%
\itemindent=\sauter@saveditemindent
\def\sauter@restoreitemindent{}}
\makeatother
\begin{document}
This looks good:
\begin{proof}
\begin{proofenum}
\item One.
\item Abc
\item[XYZ] Def
\item \label{XXX} Two.\qedhere
\end{proofenum}
\end{proof}
\begin{proof} But we have text here.
\begin{proofenum}
\item It would be nice to have this first line indented automatically, just like Number 2 and 3.
\item Number 2.
\item Number 3. \qedhere
\end{proofenum}
\end{proof}
\end{document}