[latex3-commits] [latex3/latex2e] develop: More docs for \DeclareUnknownKeyHanlder (c4e69ace)
github at latex-project.org
github at latex-project.org
Sun Oct 15 22:00:29 CEST 2023
Repository : https://github.com/latex3/latex2e
On branch : develop
Link : https://github.com/latex3/latex2e/commit/c4e69acea149bd4a868fa47b4649850df1c04c4c
>---------------------------------------------------------------
commit c4e69acea149bd4a868fa47b4649850df1c04c4c
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Sun Oct 15 21:00:29 2023 +0100
More docs for \DeclareUnknownKeyHanlder
>---------------------------------------------------------------
c4e69acea149bd4a868fa47b4649850df1c04c4c
base/changes.txt | 5 +++++
base/doc/clsguide.tex | 8 +++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/base/changes.txt b/base/changes.txt
index 6823cca2..aa1ba3d4 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,11 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
================================================================================
+2023-10-14 Joseph Wright <Joseph.Wright at latex-project.org>
+ * clsguide.tex:
+ Additional documentation
+
+
2023-10-14 Joseph Wright <Joseph.Wright at latex-project.org>
* clsguide.tex:
Add that \CurrentOption is available in \DeclareUnknownKeyHandler
diff --git a/base/doc/clsguide.tex b/base/doc/clsguide.tex
index 68e0a9a3..9223fc69 100644
--- a/base/doc/clsguide.tex
+++ b/base/doc/clsguide.tex
@@ -877,7 +877,13 @@ an undefined key is encountered. The \m{code} will receive the unknown key name
as |#1| and the value as |#2|. These can then be processed as appropriate,
e.g.~by forwarding to another package. The entire option is available as
\cs{CurrentOption}, should it be necessary to pass on options which may or
-may not contain an |=|~sign.
+may not contain an |=|~sign. For example, this may be used to pass an
+unknown option on to a non-keyval class such as \pkg{article}:
+\begin{verbatim}
+\DeclareUnknownKeyHandler{%
+ \PassOptionsToClass{\CurrentOption}{article}
+}
+\end{verbatim}
\begin{decl}
|\ProcessKeyOptions| \oarg{family}
More information about the latex3-commits
mailing list.