[latex3-commits] [git/LaTeX3-latex3-latex2e] clsguide-cleanup: Retain most of 'minimal' part (9728a04d)
Joseph Wright
joseph.wright at morningstar2.co.uk
Sat Jan 14 13:16:52 CET 2023
Repository : https://github.com/latex3/latex2e
On branch : clsguide-cleanup
Link : https://github.com/latex3/latex2e/commit/9728a04dccc6a10ee435e64df14fe8292920e371
>---------------------------------------------------------------
commit 9728a04dccc6a10ee435e64df14fe8292920e371
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Sat Jan 14 12:16:52 2023 +0000
Retain most of 'minimal' part
>---------------------------------------------------------------
9728a04dccc6a10ee435e64df14fe8292920e371
base/doc/clsguide.tex | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/base/doc/clsguide.tex b/base/doc/clsguide.tex
index 96cceae8..78b8d0bd 100644
--- a/base/doc/clsguide.tex
+++ b/base/doc/clsguide.tex
@@ -541,6 +541,30 @@ For example, if the |jane| package file contains:
and an author writes |\usepackage[foo,bar]{jane}|, then they will see the
messages \texttt{Saw foo.} and \texttt{What's bar?}
+\subsection{A minimal class file}
+
+Most of the work of a class or package is in defining new commands, or
+changing the appearance of documents. This is done in the body of the
+package, using commands such as |\newcommand| or |\setlength|.
+
+There are four things that every class file \emph{must} contain: these
+are a definition of |\normalsize|, values for |\textwidth| and
+|\textheight| and a specification for page-numbering. So a minimal
+document class file\footnote {This class is now in the standard
+distribution, as \texttt{minimal.cls}.} looks like this:
+\begin{verbatim}
+ \NeedsTeXFormat{LaTeX2e}
+ \ProvidesClass{minimal}[2022-06-01 Standard LaTeX minimal class]
+ \renewcommand{\normalsize}{\fontsize{10pt}{12pt}\selectfont}
+ \setlength{\textwidth}{6.5in}
+ \setlength{\textheight}{8in}
+ \pagenumbering{arabic} % needed even though this class will
+ % not show page numbers
+\end{verbatim}
+However, this class file will not support footnotes, marginals,
+floats, etc., nor will it provide any of the 2-letter font commands
+such as |\rm|; thus most classes will contain more than this minimum!
+
\subsection{Example: a local letter class}
A company may have its own letter class, for setting letters in the
More information about the latex3-commits
mailing list.