[latex3-commits] [git/LaTeX3-latex3-latex2e] clsguide-cleanup: Add section 'misc' (07a6f816)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Jan 12 14:23:31 CET 2023


Repository : https://github.com/latex3/latex2e
On branch  : clsguide-cleanup
Link       : https://github.com/latex3/latex2e/commit/07a6f816a79f62e1198b8497159ad5aabc9dc585

>---------------------------------------------------------------

commit 07a6f816a79f62e1198b8497159ad5aabc9dc585
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu Jan 12 13:23:31 2023 +0000

    Add section 'misc'
    
    This completes copy-pasting from the historic
    version.


>---------------------------------------------------------------

07a6f816a79f62e1198b8497159ad5aabc9dc585
 base/doc/clsguide.tex | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 83 insertions(+)

diff --git a/base/doc/clsguide.tex b/base/doc/clsguide.tex
index 2589a3ee..406989dd 100644
--- a/base/doc/clsguide.tex
+++ b/base/doc/clsguide.tex
@@ -1083,6 +1083,89 @@ command from expanding; |\MessageBreak| causes a line-break; and |\space|
 prints a space. Also, these should not end with a full stop as one is
 automatically added.
 
+\section{Miscellaneous commands, etc.}
+\label{Sec:commands.misc}
+
+\subsection{Layout parameters}
+
+\begin{decl}
+|\paperheight|\\
+|\paperwidth|
+\end{decl}
+These two parameters are usually set by the class to be the size of the paper
+being used. This should be actual paper size, unlike |\textwidth| and
+|\textheight| which are the size of the main text body within the margins.
+
+
+\subsection{Case changing}
+\label{sec:case}
+
+\begin{decl}
+  |\MakeUppercase| \arg{text} \\
+  |\MakeLowercase| \arg{text} \\
+  |\MakeTitlecase| \arg{text} \\
+\end{decl}
+
+As described in \texttt{usrguide}, case changing for text should be carried out
+using the commands \cs{MakeUppercase}, \cs{MakeLowercase} and
+\cs{MakeTitlecase}. If you need to change the cae of programmatic material, the
+team strongly suggest using the L3 programming layer commands in the
+\texttt{str} module. If you do not wish to do this, you should use the \TeX{}
+\cs{uppercase} and \cs{lowercase} primitives \emph{in this situation only}.
+
+\subsection{Better user-defined math display environments}
+
+\begin{decl}
+  |\ignorespacesafterend|
+\end{decl}
+
+Suppose that you want to define an environment for displaying text that is
+numbered as an equation. A straightforward way to do this is as follows:
+\begin{verbatim}
+  \newenvironment{texteqn}
+    {\begin{equation}
+       \begin{minipage}{0.9\linewidth}}
+      {\end{minipage}
+     \end{equation}}
+\end{verbatim}
+However, if you have tried this then you will probably have noticed that it
+does not work perfectly when used in the middle of a paragraph because an
+inter-word space appears at the beginning of the first line after the
+environment.
+
+You can to avoid this problem using \cs{ignorespacesafterend}; it should be
+inserted as shown here:
+\begin{verbatim}
+  \newenvironment{texteqn}
+    {\begin{equation}
+       \begin{minipage}{0.9\linewidth}}
+      {\end{minipage}
+     \end{equation}
+     \ignorespacesafterend}
+\end{verbatim}
+
+This command may also have other uses.
+
+\subsection{Normalising spacing}
+
+\begin{decl}
+  |\normalsfcodes|
+\end{decl}
+
+This command should be used to restore the normal settings of the
+parameters that affect spacing between words, sentences, etc.
+
+An important use of this feature is to correct a problem, reported by Donald
+Arseneau, that punctuation in page headers has always (in all known \TeX{}
+formats) been potentially wrong whenever a page break happens while a local
+setting of the space codes is in effect. These space codes are changed by, for
+example, the command \verb|\frenchspacing|) and the \textsf{verbatim}
+environment.
+
+It is normally given the correct definition automatically in |\begin{document}|
+and so need not be explicitly set; however, if it is explicitly made non-empty
+in a class file then automatic default setting will be over-ridden.
+
 \section{Deprecated commands in wide use}
 
 A small number of commands were introduced as part of \LaTeXe{} in the





More information about the latex3-commits mailing list.