[latex3-commits] [git/LaTeX3-latex3-latex2e] rawoptions: testfiles and news for rawoptions issue #85 (a0e3742f)
David Carlisle
d.p.carlisle at gmail.com
Mon Feb 22 01:17:03 CET 2021
Repository : https://github.com/latex3/latex2e
On branch : rawoptions
Link : https://github.com/latex3/latex2e/commit/a0e3742ff92dec7339e7db791eb6b2227732cbcd
>---------------------------------------------------------------
commit a0e3742ff92dec7339e7db791eb6b2227732cbcd
Author: David Carlisle <d.p.carlisle at gmail.com>
Date: Mon Feb 22 00:17:03 2021 +0000
testfiles and news for rawoptions issue #85
>---------------------------------------------------------------
a0e3742ff92dec7339e7db791eb6b2227732cbcd
base/doc/ltnews33.tex | 31 +++++++++++++++++++++-
base/testfiles/github-0085-1.lvt | 15 +++++++++++
.../{tlb-article-0000.tlg => github-0085-1.tlg} | 2 ++
base/testfiles/github-0085-2.lvt | 15 +++++++++++
.../{tlb-article-0000.tlg => github-0085-2.tlg} | 2 ++
5 files changed, 64 insertions(+), 1 deletion(-)
diff --git a/base/doc/ltnews33.tex b/base/doc/ltnews33.tex
index e8cf7dfc..3a1f64e4 100644
--- a/base/doc/ltnews33.tex
+++ b/base/doc/ltnews33.tex
@@ -331,7 +331,36 @@ been changed.
\subsection{Providing the raw option list of packages or documentclass to key/value handlers}
-\emph{to be written}
+\LaTeXe{} has always normalized space in option lists so\\
+\verb|\documentclass[ a4paper , 12pt ]{article}|\\
+processed the intended options \texttt{a4paper} and \texttt{12pt}.
+
+Unfortunately the mechanism used was designed for the simple option
+names of the standard option processing. Many classes and packages
+now use extended \emph{keyval} processing, however this white space
+normalisation makes this difficult:
+\verb|[bb=1 2 3 4]|
+which might be expected to pass a bounding box of four numbers is
+normalised to \texttt{bb=1234} and
+\verb|[bb={1 2 3 4}]|\\
+which might be expected to quote the spaces results in low level \TeX{}
+parsing errors.
+
+
+For compatibility reasons, the standard option processing has not been
+changed however the original un-normalised class and option lists
+are now saved. they are not used in the standard processing, however
+extended package option systems may use these ``raw'' option list
+macros if they are defined.
+
+The one change affecting the standard processing is that the low level
+error mentioned above is now avoided as values (any tokens to the
+right of an = sign) are removed from consideration from the ``unused
+option list'' In this release \texttt{clip=true}` and
+`\texttt{clip=false}` both contribute \texttt{clip} to the list of
+options that have been used.
+
+
%
\githubissue{85}
diff --git a/base/testfiles/github-0085-1.lvt b/base/testfiles/github-0085-1.lvt
new file mode 100644
index 00000000..dcc7d7ca
--- /dev/null
+++ b/base/testfiles/github-0085-1.lvt
@@ -0,0 +1,15 @@
+\input{test2e}
+% space in value lost in option list
+% preserved in new raw option list
+% no error on loading even in old formats
+
+\START
+
+\documentclass[a b, bb= 1 2 3 4 ]{article}
+
+\makeatletter
+
+\typeout{\meaning\@classoptionslist}
+\typeout{\meaning\@raw at classoptionslist}
+
+\END
\ No newline at end of file
diff --git a/base/testfiles/tlb-article-0000.tlg b/base/testfiles/github-0085-1.tlg
similarity index 92%
copy from base/testfiles/tlb-article-0000.tlg
copy to base/testfiles/github-0085-1.tlg
index b96e3f6a..4fcccf2e 100644
--- a/base/testfiles/tlb-article-0000.tlg
+++ b/base/testfiles/github-0085-1.tlg
@@ -17,3 +17,5 @@ File: size10.clo ....-..-.. v... Standard LaTeX file (size option)
\belowcaptionskip=\skip...
\bibindent=\dimen...
)
+macro:->ab,bb=1234
+macro:->a b, bb= 1 2 3 4
diff --git a/base/testfiles/github-0085-2.lvt b/base/testfiles/github-0085-2.lvt
new file mode 100644
index 00000000..44bec2e5
--- /dev/null
+++ b/base/testfiles/github-0085-2.lvt
@@ -0,0 +1,15 @@
+\input{test2e}
+% Low level unrecoverable error in old formats
+% unused option list drops values
+% (also drops spaces as based on original option list)
+% ab and x here.
+
+\START
+
+\documentclass[a b, x={x,y} ]{article}
+
+\makeatletter
+\typeout{\meaning\@classoptionslist}
+\typeout{\meaning\@raw at classoptionslist}
+
+\END
\ No newline at end of file
diff --git a/base/testfiles/tlb-article-0000.tlg b/base/testfiles/github-0085-2.tlg
similarity index 92%
copy from base/testfiles/tlb-article-0000.tlg
copy to base/testfiles/github-0085-2.tlg
index b96e3f6a..feeaeff3 100644
--- a/base/testfiles/tlb-article-0000.tlg
+++ b/base/testfiles/github-0085-2.tlg
@@ -17,3 +17,5 @@ File: size10.clo ....-..-.. v... Standard LaTeX file (size option)
\belowcaptionskip=\skip...
\bibindent=\dimen...
)
+macro:->ab,x={x,y}
+macro:->a b, x={x,y}
More information about the latex3-commits
mailing list.