Skip to content

Commit

Permalink
Re-wrap paragraphs
Browse files Browse the repository at this point in the history
No text changes: just tidying up after 33a2a0.
  • Loading branch information
josephwright committed Mar 27, 2024
1 parent d154216 commit 05b9b35
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions base/doc/usrguide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -804,29 +804,27 @@ \subsection{Using the verbatim argument types}

When grabbing a \texttt{v}-type argument, \LaTeX{} first uses the kernel
command \cs{dospecials} to turn off the \enquote{special} nature of characters.
It then makes both spaces and tabs \enquote{active}, so that they can be given a
custom definition. Any other characters are grabbed as-is: this means that if
It then makes both spaces and tabs \enquote{active}, so that they can be given
a custom definition. Any other characters are grabbed as-is: this means that if
any characters have been made \enquote{special} and are not listed in
\cs{dospecials}, an error will arise (see below).

The characters that are grabbed as the argument are all those between two identical:
in contrast to \cs{verb}, the
characters \texttt{\textbackslash}, |{|, |}| and |%| \emph{cannot} be used as the
delimiter character. If
any of the grabbed tokens have \enquote{special} meaning, an error will be
issued.

For the \texttt{+v}-type argument, which allows line breaks within the argument,
newline characters are converted into \cs{obeyedline} commands. The standard
definition of \cs{obeyedline} is simple |\par|, thus allowing the grabbed tokens
to be used directly in typesetting. A local
redefinition of \cs{obeyedline} can be used to achieve other outputs. For
example, to retain blank lines whilst typesetting, one could use
The characters that are grabbed as the argument are all those between two
identical: in contrast to \cs{verb}, the characters \texttt{\textbackslash},
|{|, |}| and |%| \emph{cannot} be used as the delimiter character. If any of
the grabbed tokens have \enquote{special} meaning, an error will be issued.

For the \texttt{+v}-type argument, which allows line breaks within the
argument, newline characters are converted into \cs{obeyedline} commands. The
standard definition of \cs{obeyedline} is simple |\par|, thus allowing the
grabbed tokens to be used directly in typesetting. A local redefinition of
\cs{obeyedline} can be used to achieve other outputs. For example, to retain
blank lines whilst typesetting, one could use
\begin{verbatim}
\renewcommand*\obeyedline{\mbox{}\par}
\end{verbatim}
More information about using these arguments in typesetting is in the following
subsection.
subsection.

Some additional details that may be useful for those with more \TeX{}
knowledge: do not worry if this does not make sense to you! Spaces and tabs are
Expand All @@ -840,14 +838,14 @@ \subsection{Typesetting verbatim-like material}
In contrast to \cs{verb}, the \texttt{(+)v}-type argument is only about
\emph{grabbing} the argument, not \emph{typesetting} it. As such, features that
users often associate with \enquote{verbatim} are not automatically activated,
e.g., selecting a monospaced font. Material grabbed by the \texttt{v}-type argument does
not automatically suppress ligatures: with modern \TeX{} engines, this largely
can be done without the token manipulation which \cs{verb} uses. (In \cs{verb},
ligatures are suppressed by making characters active and inserting a zero-width
kern before the character itself.)

The \cs{verb} command also selects a monospaced font: this is not intrinsic
to verbatim material, so will need to be set up using for example \cs{ttfamily}.
e.g., selecting a monospaced font. Material grabbed by the \texttt{v}-type
argument does not automatically suppress ligatures: with modern \TeX{} engines,
this largely can be done without the token manipulation which \cs{verb} uses.
(In \cs{verb}, ligatures are suppressed by making characters active and
inserting a zero-width kern before the character itself.)

The \cs{verb} command also selects a monospaced font: this is not intrinsic to
verbatim material, so will need to be set up using for example \cs{ttfamily}.
Similarly, the \texttt{verbatim} environment sets up the meaning of \cs{par}
suitable for breaking lines.

Expand Down

0 comments on commit 05b9b35

Please sign in to comment.