4

In the TeXbook (page 100), \narrower is described and the following example provided, which works fine in plain TeX.

{\narrower\smallskip\noindent
This paragraph will have narrower lines than
the surrounding paragraphs do, because it
uses the ``narrower'' feature of plain \TeX.
The former margins will be restored after
this group ends.\smallskip}

However, this does not work in LaTeX. An additional \par at the end of the \narrower paragraph remedies the situation.

\documentclass{article}

\begin{document}\makeatletter

This is a normal paragraph.

{\narrower\smallskip\noindent
  This should be a narrower paragraph.
  It was created using plain \TeX's ``narrower'' feature as described in the \TeX book.
  However, it does not really appear to be narrower.
  \smallskip
}

{\narrower\smallskip\noindent
  This is a narrower paragraph.
  It was created using plain \TeX's ``narrower'' feature with a trailing \verb|\par|.
  Nowadays, you should use a \LaTeX\ environment, though.
  \par\smallskip
}

This is a normal paragraph again.
Let's make it a bit longer, in order to see its right margin.

\end{document}

MWE output

Why is that? Shouldn't the \smallskip end the paragraph, even without the \par (as it does in plain TeX)?

  • @campa Ah, should have read more carefully. You are absolutely right. Feel free to post an answer. Do you know why this change was made? After all, the name \smallskip indicates a skip.. – schtandard Oct 26 at 14:20
  • 1
    @schtandard \vspace is LaTeX's standard interface for vertical spacing, so this ensures that they behave the same as normal LaTeX commands for vertical skips. Especially this allows \smallskip to be used to adjust spacing in paragraphs. – Marcel Krüger Oct 26 at 14:28
8

The difference is in the definition of \smallskip (and the same for \medskip and \bigskip). Plain TeX defines

\def\smallskip{\vskip\smallskipamount}

while LaTeX does

\def\smallskip{\vspace\smallskipamount}

Now, \vskip is a TeX primitive which ends the current paragraph when issued in (unrestricted) horizontal mode. On the other end, \vspace is a LaTeX macro which expands on \vskip when in vertical mode, and in \vadjust otherwise. The paragraph in your first example is therefore not ended before the group is closed.

| improve this answer | |
4

The fact that \narrower is defined in LaTeX is incidental and should not be relied upon. It stems from the fact that the original LaTeX format was based on a slightly modified version of plain.tex in order to ease transition from plain TeX documents to LaTeX ones.

campa has already explained the reason why \smallskip works differently in LaTeX than in plain TeX. But the real solution is to define your own environment using LaTeX features such as \addvspace, so two consecutive environments will not add twice the space and you don't need to manually add or remove \smallskip in case.

\documentclass{article}

\newenvironment{latexnarrower}
  {\par\addvspace{\smallskipamount}\narrower\noindent\ignorespaces}
  {\par\addvspace{\smallskipamount}}

\begin{document}

This is a normal paragraph.

{\smallskip\narrower\noindent
  This should be a narrower paragraph.
  It was created using plain \TeX's ``narrower'' feature as described in the \TeX book.
  but corrected for \LaTeX{} usage. And you see that it is indeed narrower, because
  we added \verb|\par| at the end.\par\smallskip
}

{\smallskip\narrower\noindent
  This should be a narrower paragraph.
  It was created using plain \TeX's ``narrower'' feature as described in the \TeX book.
  but corrected for \LaTeX{} usage. And you see that it is indeed narrower, because
  we added \verb|\par| at the end.\par\smallskip
}

This is a normal paragraph, long enough to wrap across lines. Let's just make it
long enough. Perhaps this does the job.

\begin{latexnarrower}
  This is a narrower paragraph.
  It was created using a proper \LaTeX{} environment. Which is surely a better
  way to do the job.
\end{latexnarrower}

\begin{latexnarrower}
  This is a narrower paragraph.
  It was created using a proper \LaTeX{} environment. Which is surely a better
  way to do the job.
\end{latexnarrower}

This is a normal paragraph, long enough to wrap across lines. Let's just make it
long enough. Perhaps this does the job.

\end{document}

enter image description here

Can you spot the difference?

Even better you can use a list so you can use other LaTeX features.

\documentclass{article}

\newenvironment{latexnarrower}
 {\list{}{\topsep=\smallskipamount\leftmargin=\parindent\rightmargin=\parindent}\item}
 {\endlist}

\begin{document}

This is a normal paragraph.

{\smallskip\narrower\noindent
  This should be a narrower paragraph.
  It was created using plain \TeX's ``narrower'' feature as described in the \TeX book.
  but corrected for \LaTeX{} usage. And you see that it is indeed narrower, because
  we added \verb|\par| at the end.\par\smallskip
}

{\smallskip\narrower\noindent
  This should be a narrower paragraph.
  It was created using plain \TeX's ``narrower'' feature as described in the \TeX book.
  but corrected for \LaTeX{} usage. And you see that it is indeed narrower, because
  we added \verb|\par| at the end.\par\smallskip
}

This is a normal paragraph, long enough to wrap across lines. Let's just make it
long enough. Perhaps this does the job.

\begin{latexnarrower}
  This is a narrower paragraph.
  It was created using a proper \LaTeX{} environment. Which is surely a better
  way to do the job.
\end{latexnarrower}

\begin{latexnarrower}
  This is a narrower paragraph.
  It was created using a proper \LaTeX{} environment. Which is surely a better
  way to do the job.
\end{latexnarrower}

This is a normal paragraph, long enough to wrap across lines. Let's just make it
long enough. Perhaps this does the job.

\begin{latexnarrower}
  This is a narrower paragraph.
  It was created using a proper \LaTeX{} environment. Which is surely a better
  way to do the job.
\end{latexnarrower}
This is a normal paragraph, long enough to wrap across lines. Let's just make it
long enough. You see it has no indentation, because there was no blank line
between \verb|\end{latexnarrower}| and the following text.

\end{document}

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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