0

This question already has an answer here:

To subdivide longer proofs of theorems, I use two list environments defined using enumitem: pfsteps for numbered steps and pfparts for labeled parts.

Horizontal space problems

1) In the pfsteps enumerate list, there seems to be a bit too much horizontal space after the colon that follows the step number — more space than would follow a colon in ordinary text.
2) In both the pfsteps enumerate list and the pfparts description list, there is definitely too much horizontal space between "Proof" and the first label of the list.

Questions

Problem 1) can be fixed by using something like the commented-out line \hspace{-1pt} after the colon in the definition of label for pfsteps. But is there a nicer way to decrease this space?

How can Problem 2) be fixed, for both the pfsteps and the pfparts list environments.

Sample source

\documentclass[12pt]{memoir}

\usepackage{amsthm}

% Indent ``Proof.''
\usepackage{xpatch}
\newlength{\normalparindent}
\AtBeginDocument{\setlength{\normalparindent}{\parindent}}
\xpatchcmd{\proof}{\hskip\labelsep}{\hskip\labelsep\hskip\normalparindent}{}{}

\let\oldproofname=\proofname
\renewcommand{\proofname}{\sffamily\bfseries{\oldproofname}}


\usepackage{enumitem}

\newlist{pfsteps}{enumerate}{3}
\setlist[pfsteps,1]{%
  %label=\sffamily{Step {\arabic*}:\hspace{-1pt}},
  label=\sffamily{Step {\arabic*}:},
  ref=\normalfont{\arabic**},
  wide,itemsep=0pt,topsep=0pt
}

\newlist{pfparts}{description}{1}
\setlist[pfparts,1]{%
  font=\normalfont\textsf,
  itemindent=0pt,
  wide,
  itemsep=0pt,topsep=2pt,
}

\begin{document}

Proof using \verb!pfsteps! enumerate list.

\begin{proof}

\begin{pfsteps}

\item do this first. The way to begin is to start at the very beginning and use the definitions involved to get going.

\item do this next. After the initial step, we proceed by showing something interesting next.

\item conclude with this. That's it! \qedhere

\end{pfsteps}

\end{proof}

\bigskip

Proof using \verb!pfparts! description list.

\begin{proof}

\begin{pfparts}

\item[Sufficiency.] First we show that the stated condition is sufficient for the conclusion to hold.

\item[Necessity.] To conclude the proof we show that the stated condition is a necessary condition for the conclusion. \qedhere

\end{pfparts}

\end{proof}

\bigskip

For comparison, a proof that is not divided into steps or parts.

\begin{proof}

Here is the proof of the main result.
%
\end{proof}


\end{document}

Output

In the output shown below, the red arrows point to excessive space. (And for comparison, the green arrow points to the normal space after a "Proof."

Excessive horizontal space in lists

marked as duplicate by barbara beeton, Stefan Pinnow, Zarko, CarLaTeX, Werner lists Jan 15 '17 at 21:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • In my opinion you should use an empty line after the the begin of the proof environment. The indented Step leaves an disrupted look of the text – user31729 Jan 15 '17 at 17:21
  • @Christian Hupfer: You're probably right about that style, but how achieve the empty line? Is there a more graceful way than inserting, say, \mbox{} after \begin{proof}? – murray Jan 15 '17 at 17:34
  • this has been dealt with before. i'm looking for possibilities. is this any help: tex.stackexchange.com/q/319717/579 ? or this: tex.stackexchange.com/a/348472/579 ? – barbara beeton Jan 15 '17 at 19:50
  • this one really should be considered a dupe: How to change the (horizontal) distance between “Proof” and the first enumeration symbol?. it has been closed as a dupe to a question that asks about theorems, but proof goes by the same rules. – barbara beeton Jan 15 '17 at 20:03
  • Method at tex.stackexchange.com/questions/17449/… to use leftmargin=* with my defined enumitem environments unfortunately destroys the normal indentation of my labels, due I think to the necessary (I think) inclusion of the wide setting. The extra space preceding the label that needs to be removed should only affect the label of the first item in the list. – murray Jan 15 '17 at 20:13
2

The space before the label item (Step) is controlled with labelindent and the space between label and text is controlled with labelsep -- choose some values appropiate for you, my given values are just guesses.

\documentclass[12pt]{memoir}

\usepackage{amsthm}

% Indent ``Proof.''
\usepackage{xpatch}
\newlength{\normalparindent}
\AtBeginDocument{\setlength{\normalparindent}{\parindent}}
\xpatchcmd{\proof}{\hskip\labelsep}{\hskip\labelsep\hskip\normalparindent}{}{}

\let\oldproofname=\proofname
\renewcommand{\proofname}{\sffamily\bfseries{\oldproofname}}


\usepackage{enumitem}

\newlist{pfsteps}{enumerate}{3}
\setlist[pfsteps,1]{%
  %label=\sffamily{Step {\arabic*}:\hspace{-1pt}},
  label=\sffamily{Step {\arabic*}:},
  ref=\normalfont{\arabic**},
  wide,itemsep=0pt,topsep=0pt,
  labelindent=0pt,
  labelsep=0.5ex,
}

\newlist{pfparts}{description}{1}
\setlist[pfparts,1]{%
  font=\normalfont\textsf,
  itemindent=0pt,
  wide,
  itemsep=0pt,topsep=2pt,
  labelindent=0pt,
  labelsep=0.5ex,
}

\begin{document}

Proof using \verb!pfsteps! enumerate list.

\begin{proof}

\begin{pfsteps}

\item do this first. The way to begin is to start at the very beginning and use the definitions involved to get going.

\item do this next. After the initial step, we proceed by showing something interesting next.

\item conclude with this. That's it! \qedhere

\end{pfsteps}

\end{proof}

\bigskip

Proof using \verb!pfparts! description list.

\begin{proof}

\begin{pfparts}

\item[Sufficiency.] First we show that the stated condition is sufficient for the conclusion to hold.

\item[Necessity.] To conclude the proof we show that the stated condition is a necessary condition for the conclusion. \qedhere

\end{pfparts}

\end{proof}

\bigskip

For comparison, a proof that is not divided into steps or parts.

\begin{proof}

Here is the proof of the main result.
%
\end{proof}


\end{document}
  • Including labelsep is good, thanks. But including labelindent does not work: with it, every label except the first in the list is now flush left; all labels after the first should be given normal indents -- as my output shows (and in case the list does not begin immediately after "Proof", then the first label should be given a normal indent, too!). – murray Jan 15 '17 at 17:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.