[latex3-commits] [git/LaTeX3-latex3-latex2e] keyval-detect: Clarify docs further (ee10fe2c)
Joseph Wright
joseph.wright at morningstar2.co.uk
Wed Aug 31 08:27:16 CEST 2022
Repository : https://github.com/latex3/latex2e
On branch : keyval-detect
Link : https://github.com/latex3/latex2e/commit/ee10fe2cf15fbf9aa80d4a05d349edfc25fd66c1
>---------------------------------------------------------------
commit ee10fe2cf15fbf9aa80d4a05d349edfc25fd66c1
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Fri Aug 26 14:31:58 2022 +0100
Clarify docs further
>---------------------------------------------------------------
ee10fe2cf15fbf9aa80d4a05d349edfc25fd66c1
base/doc/ltnews36.tex | 3 ++-
base/doc/usrguide3.tex | 11 +++++++----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/base/doc/ltnews36.tex b/base/doc/ltnews36.tex
index 7405faad..4677b36e 100644
--- a/base/doc/ltnews36.tex
+++ b/base/doc/ltnews36.tex
@@ -224,7 +224,8 @@ pair with the key name \texttt{short-text}.
Arguments which begin with \texttt{=,} are always interpreted as
keyvals even if they do not contain further \texttt{=} signs.
-Any \texttt{=} signs within math mode are ignored, meaning that
+Any \texttt{=} signs enclosed within \verb|$...$| or \verb|\(...\)|,
+i.e.~in inline math mode, are ignored, meaning that
only \texttt{=} outside of math mode will generally cause
interpretation as keyval material.
diff --git a/base/doc/usrguide3.tex b/base/doc/usrguide3.tex
index caed4356..56b5861c 100644
--- a/base/doc/usrguide3.tex
+++ b/base/doc/usrguide3.tex
@@ -546,13 +546,16 @@ and
(A much longer and more detailed text for demonstration purposes)
\end{verbatim}
-Interpretation as keyval form is determinded by the presence of \texttt{=}
-characters within the argument. Those in math mode (inside \verb|$...$| or
-\verb|\(...\)|) are ignored. An argument can be forced to be read as keyvals by
-including an empty entry at the start
+Interpretation as keyval form is determined by the presence of \texttt{=}
+characters within the argument. Those in inline math mode (enclosed within
+\verb|$...$| or \verb|\(...\)|) are ignored. An argument can be forced to be
+read as keyvals by including an empty entry at the start
\begin{verbatim}
\caption[=,This is now a keyval]%
+% ...
+\caption[This is not $=$ keyval]%
\end{verbatim}
+
This empty entry is \emph{not} passed to the underlying code, so will not lead
to issues with keyval parsers that do not allow an empty key name. Any text-mode
\texttt{=} signs will need to be braced to avoid being misinterpreted: this
More information about the latex3-commits
mailing list.