From c28ad83142982e8543d1895e73a769edf84c110d Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 17 Jul 2012 15:36:01 +0200 Subject: [PATCH] [doc] In PDF output, assure correct layout for `itemize' environment. The old definition of \@item within a `description' environment inserted a line break even if there was no description. --- doc/template.tex | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/template.tex b/doc/template.tex index f6a39f4..cb3b795 100644 --- a/doc/template.tex +++ b/doc/template.tex @@ -127,9 +127,7 @@ $endif$ \setlength{\parskip}{6pt plus 2pt minus 1pt} \setlength{\emergencystretch}{3em} % prevent overfull lines -% We want a break after the description label. Alas, it is necessary to -% copy the whole definition of \@item and the `description' environemnt just -% to insert `\\'... +% We want a break after the description label (if there is one). \makeatletter \let\original@item\@item @@ -192,8 +190,14 @@ $endif$ \box\@tempboxa \else \hbox to\labelwidth {\unhbox\@tempboxa}% - \fi}% + \fi + \hskip \labelsep}% + \def\reserved@a{#1}% + \def\reserved@b{\@itemlabel}% + \ifx\reserved@a \reserved@b + \else \leavevmode\\ + \fi \ignorespaces} \renewenvironment{description}{% -- 2.11.4.GIT