33.2 Newline and Vspace

Latex uses vrule for vertical spaces within paragraph. In orser not to break paragraphs, we put line breaks. So, for instance, centered paragraphs retain their shapes.

\\[...]’ and \\*[...], in normal mode, are implied from \@xnewline, and in turn on ‘\newline’ and \vspace. More recent definitions of latex rely on \@gnewline.

\documentclass{article} 
\begin{document} 
 
Try \\[1mm]| this. 
 
\end{document} 

<..latex 1999..>
 \ifx \@gnewline\:UnDef
    \append:def\newline{\ifhmode \a:newline\fi}
    \def\@newline[#1]{\ifhmode\unskip
           \tmp:dim=#1\relax
           \ifdim \tmp:dim>0.98\smallskipamount \a:newline\fi
       \fi\vspace{#1}\newline}
 \else
    \let\:tempc\@gnewline
    \pend:defI\:tempc{\ht:special{t4ht@[}}
    \append:defI\:tempc{\ht:special{t4ht@]}\ifhmode \a:newline\fi}
    \HLet\@gnewline\:tempc
    \def\:temp[#1]{{\ifhmode\unskip
           \tmp:dim=#1\relax
           \ifdim \tmp:dim>0\smallskipamount \a:newline\fi
           \let\a:newline=\empty
       \fi\vspace{#1}\o:@newline:[#1]}}
    \HLet\@newline=\:temp
 \fi
 -_-_-

The recent latex.ltx file introduced the code

   \global\let\if@newlist\@@if@newlist 

at the end of the \@outputpage macro. In the case of plain latex, I suspect, the task of this code is to avoid extra vertical space before a list which starts at the top of a page. This effect is achieved by having the \if@newlist changing to false from true at the page break.

In the case of tex4ht, the side effect of loosing the list header caused also the loss of the code <ul>.

Latex 200 introduces ‘\global\let\if@newlist\@@if@newlist’ at the end of the \@outputpage routine. Without the following, we loose start of new lists at top of pages.

<..latex 2000..>
 \ifx \@@if@newlist\:UnDef \else
   \pend:def\@outputpage{\expandafter\global \expandafter\let
       \expandafter\@@if@newlist\csname if@newlist\endcsname}
 \fi
 -_-_-

<..config latex.ltx utilities..>+
 \NewConfigure{newline}{1}
 -_-_-

We can’t play with the following because we may get extra <BR>s for paragraph breaks <P>.

    \let\:vspace|=\@vspace 
    \let\:vspacer|=\@vspacer 
    \def\@vspace#1{\vsp:br{#1}\:vspace{#1}} 
    \def\@vspacer#1{\vsp:br{#1}\:vspacer{#1}} 
    \def\vsp:br#1{\ifhmode 
          \ifdim #1>0.98\smallskipamount \HCode{<BR>}\fi 
       \fi }