[latex3-commits] [git/LaTeX3-latex3-latex3] xparse: Fix m3cmd04 test (268379b6e)
Joseph Wright
joseph.wright at morningstar2.co.uk
Fri Mar 6 16:57:57 CET 2020
Repository : https://github.com/latex3/latex3
On branch : xparse
Link : https://github.com/latex3/latex3/commit/268379b6e0e84ff2424fad952a2f19249bc3f9c6
>---------------------------------------------------------------
commit 268379b6e0e84ff2424fad952a2f19249bc3f9c6
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Fri Mar 6 15:57:57 2020 +0000
Fix m3cmd04 test
>---------------------------------------------------------------
268379b6e0e84ff2424fad952a2f19249bc3f9c6
l3kernel/testfiles/m3cmd004.luatex.tlg | 533 +++++++++++++++++++--------------
l3kernel/testfiles/m3cmd004.lvt | 12 +-
l3kernel/testfiles/m3cmd004.tlg | 533 +++++++++++++++++++--------------
3 files changed, 622 insertions(+), 456 deletions(-)
diff --git a/l3kernel/testfiles/m3cmd004.luatex.tlg b/l3kernel/testfiles/m3cmd004.luatex.tlg
index 3365de19b..579c1490f 100644
--- a/l3kernel/testfiles/m3cmd004.luatex.tlg
+++ b/l3kernel/testfiles/m3cmd004.luatex.tlg
@@ -227,19 +227,10 @@ l. ... }
> \ArgumentSpecification=.
<recently read> }
l. ... }
-! LaTeX3 Error: Unknown document environment 'fooenv'.
-For immediate help type H <return>.
- ...
-l. ... }
-You have asked for the argument specification for the environment 'fooenv',
-but it is not defined.
-||
-! LaTeX3 Error: Unknown document environment 'fooenv'.
-For immediate help type H <return>.
- ...
+|vD{$}{$}mm|
+> \ArgumentSpecification=vD{$}{$}mm.
+<recently read> }
l. ... }
-You have asked for the argument specification for the environment 'fooenv',
-but it is not defined.
============================================================
============================================================
TEST 10: First argument must be a command
@@ -660,223 +651,17 @@ TEST 13: Defaults referring to other arguments
(1cm,a,1cm,b)
(1cm,a,1cm,b)
(1cm,a,2cm,b)
-! LaTeX3 Error: Deprecated argument type 'G' for the command '\foo' requires
-(LaTeX3) xparse.
-For immediate help type H <return>.
- ...
-l. ... }
-The letter 'G' specifies a known argument type that requires the xparse
-package.
-LaTeX will ignore this entire definition.
-! Undefined control sequence.
-<argument> ...{\exp_not:n {##1|##2|{##3}{##4}|##5|##6}}}\foo
- <\A >_{\B }{\C }\foo {\A }...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...p_not:n {##1|##2|{##3}{##4}|##5|##6}}}\foo <\A
- >_{\B }{\C }\foo {\A }{\B ...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...n {##1|##2|{##3}{##4}|##5|##6}}}\foo <\A >_{\B
- }{\C }\foo {\A }{\B }\foo ...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...1|##2|{##3}{##4}|##5|##6}}}\foo <\A >_{\B }{\C
- }\foo {\A }{\B }\foo {\A }...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...{##3}{##4}|##5|##6}}}\foo <\A >_{\B }{\C }\foo
- {\A }{\B }\foo {\A }[\B ]{...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...}{##4}|##5|##6}}}\foo <\A >_{\B }{\C }\foo {\A
- }{\B }\foo {\A }[\B ]{\C }...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...}|##5|##6}}}\foo <\A >_{\B }{\C }\foo {\A }{\B
- }\foo {\A }[\B ]{\C }\foo ...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...##6}}}\foo <\A >_{\B }{\C }\foo {\A }{\B }\foo
- {\A }[\B ]{\C }\foo ^{\A }...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...}}\foo <\A >_{\B }{\C }\foo {\A }{\B }\foo {\A
- }[\B ]{\C }\foo ^{\A }{\B ...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...o <\A >_{\B }{\C }\foo {\A }{\B }\foo {\A }[\B
- ]{\C }\foo ^{\A }{\B }\foo...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ... >_{\B }{\C }\foo {\A }{\B }\foo {\A }[\B ]{\C
- }\foo ^{\A }{\B }\foo []{\...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ... }{\C }\foo {\A }{\B }\foo {\A }[\B ]{\C }\foo
- ^{\A }{\B }\foo []{\B }\fo...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Missing $ inserted.
-<inserted text>
-$
-l. ... }
-I've inserted a begin-math/end-math symbol since I think
-you left one out. Proceed, with fingers crossed.
-! Undefined control sequence.
-<argument> ... }\foo {\A }{\B }\foo {\A }[\B ]{\C }\foo ^{\A
- }{\B }\foo []{\B }\foo <\A...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...o {\A }{\B }\foo {\A }[\B ]{\C }\foo ^{\A }{\B
- }\foo []{\B }\foo <\A >_{\...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...}{\B }\foo {\A }[\B ]{\C }\foo ^{\A }{\B }\foo
- []{\B }\foo <\A >_{\B }^{\...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...\foo {\A }[\B ]{\C }\foo ^{\A }{\B }\foo []{\B
- }\foo <\A >_{\B }^{\C }{\D...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...\A }[\B ]{\C }\foo ^{\A }{\B }\foo []{\B }\foo
- <\A >_{\B }^{\C }{\D }\Dec...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...[\B ]{\C }\foo ^{\A }{\B }\foo []{\B }\foo <\A
- >_{\B }^{\C }{\D }\Declare...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...\C }\foo ^{\A }{\B }\foo []{\B }\foo <\A >_{\B
- }^{\C }{\D }\DeclareDocume...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...oo ^{\A }{\B }\foo []{\B }\foo <\A >_{\B }^{\C
- }{\D }\DeclareDocumentComm...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...\A }{\B }\foo []{\B }\foo <\A >_{\B }^{\C }{\D
- }\DeclareDocumentCommand {...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
+\A ||{\B }{2}|{\B }{2}\C |\C
+\A |\A |{1}{2}|{1}{2}\B |\B
+\A |\A |{1}{2}|\B |\C
+||{1}{\A }|{1}{\A }\B |\B
+||{1}{2}||\B
+\A ||{\B }{\C }|{\B }{\C }\D |\D
\A
{{\C }{-NoValue-}}{\E }|{\C }{-NoValue-}|\E
{\A }{\E }|{{\A }{\E }}{-NoValue-}|\E
{{\C }{-NoValue-}}{\A }|{\C }{-NoValue-}|\E
{\A }{\B }|{{\A }{\B }}{\D }|\E
-! Missing $ inserted.
-<inserted text>
-$
-l. ... }
-I've inserted something that you may have forgotten.
-(See the <inserted text> above.)
-With luck, this will get me unwedged. But if you
-really didn't forget anything, try typing `2' now; then
-my insertion and my current dilemma will both disappear.
============================================================
============================================================
TEST 14: Test ## in expandable argument specification
@@ -971,4 +756,302 @@ undefined
For immediate help type H <return>.
...
l. ... }
-(That makes 100 errors; please try again.)
+The argument specification for \foo contains a processor function: this is
+only supported for standard robust commands.
+LaTeX will ignore this entire definition.
+undefined
+============================================================
+============================================================
+TEST 17: Optional+mandatory with same delimiter
+============================================================
+LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '['
+(LaTeX3) as a previous optional argument, it will not be possible to
+(LaTeX3) omit all optional arguments when calling this command.
+|a|b|
+LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '['
+(LaTeX3) as a previous optional argument, it will not be possible to
+(LaTeX3) omit all optional arguments when calling this command.
+|a|b|
+LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter ':'
+(LaTeX3) as a previous optional argument, it will not be possible to
+(LaTeX3) omit all optional arguments when calling this command.
+|a:b,c|d|
+LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter ':'
+(LaTeX3) as a previous optional argument, it will not be possible to
+(LaTeX3) omit all optional arguments when calling this command.
+|a:b,c|d|
+LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '['
+(LaTeX3) as a previous optional argument, it will not be possible to
+(LaTeX3) omit all optional arguments when calling this command.
+|-NoValue-|\BooleanTrue |a|
+LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '*'
+(LaTeX3) as a previous optional argument, it will not be possible to
+(LaTeX3) omit all optional arguments when calling this command.
+|\BooleanTrue |a|
+LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '('
+(LaTeX3) as a previous optional argument, it will not be possible to
+(LaTeX3) omit all optional arguments when calling this command.
+|\BooleanTrue |a(b)c|\BooleanTrue |
+LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '_'
+(LaTeX3) as a previous optional argument, it will not be possible to
+(LaTeX3) omit all optional arguments when calling this command.
+|{_}{a}|\BooleanFalse ||
+|{a}{-NoValue-}|\BooleanFalse |abc|
+|{-NoValue-}{-NoValue-}|\BooleanTrue |a|
+============================================================
+============================================================
+TEST 18: par in short expandable
+============================================================
+Runaway argument?
+\ERROR
+! Paragraph ended before \foo (arg 2) was complete.
+<to be read again>
+\par
+l. ... }
+I suspect you've forgotten a `}', causing me to apply this
+control sequence to too much text. How can we recover?
+My plan is to forget the whole thing and hope for the best.
+Runaway argument?
+! Paragraph ended before \foo was complete.
+<to be read again>
+\par
+l. ... }
+I suspect you've forgotten a `}', causing me to apply this
+control sequence to too much text. How can we recover?
+My plan is to forget the whole thing and hope for the best.
+|\BooleanFalse |\par |a|
+|\BooleanFalse |a|b|
+\par
+\par
+============================================================
+============================================================
+TEST 19: Environments and expansion
+============================================================
+\A \B \C
+\A \B \C
+============================================================
+============================================================
+TEST 20: Expandable r type
+============================================================
+LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '['
+(LaTeX3) as a previous optional argument, it will not be possible to
+(LaTeX3) omit all optional arguments when calling this command.
+|a|b|
+|a|b|
+============================================================
+============================================================
+TEST 21: Expandable e-type argument definitions
+============================================================
+({-NoValue-}{-NoValue-})(\the re)
+({\u p}{-NoValue-})(\he re)
+({-NoValue-}{\do wn})(\he re)
+({\u p}{\do wn})(\he re)
+({\U P}{-NoValue-})(\the re)
+({\u p}{-NoValue-})(\he re)
+({\U P}{\do wn})(\he re)
+({\u p}{\do wn})(\he re)
+({\U P}{\DO WN})(\the re)
+({\u p}{\DO WN})(\he re)
+({\U P}{\do wn})(\he re)
+({\u p}{\do wn})(\he re)
+({##}{\DO WN})(##)(\A )
+({\A }{\DO WN})(\A )(\B )
+({\A }{\DO WN})(\B )(\C )
+({##}{\A })(##)(\B )
+({\B }{\A })(\C )(\D )
+============================================================
+============================================================
+TEST 22: Long status of t-type ignored
+============================================================
+|\BooleanTrue |\BooleanTrue |\par |\par |
+|\BooleanFalse |\BooleanTrue |-NoValue-|\par \A |
+Runaway argument?
+! Paragraph ended before \foo was complete.
+<to be read again>
+\par
+l. ... }
+I suspect you've forgotten a `}', causing me to apply this
+control sequence to too much text. How can we recover?
+My plan is to forget the whole thing and hope for the best.
+\par
+|\BooleanFalse |\BooleanTrue |[\A ]|\B |
+============================================================
+============================================================
+TEST 23: Same expandable command with/without defaults
+============================================================
+|a|b|{c}
+|b|c|
+============================================================
+============================================================
+TEST 24: Wrongly undefining an xparse command
+============================================================
+LaTeX3 Warning: The command '\foo' was undefined but not the associated
+(LaTeX3) commands '\foo code' and/or '\foo defaults'. Maybe you tried
+(LaTeX3) using \let. This may lead to an infinite loop.
+============================================================
+============================================================
+TEST 25: NoValue passed to another command
+============================================================
+|-NoValue-|B|C|
+============================================================
+============================================================
+TEST 26: Two processors
+============================================================
+Defining \CountArg on line ...
+|2|{5}|
+============================================================
+============================================================
+TEST 27: Non-character token delimiters
+============================================================
+abc
+def
+LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '\('
+(LaTeX3) as a previous optional argument, it will not be possible to
+(LaTeX3) omit all optional arguments when calling this command.
+abc/def
+abc/def
+abc/-NoValue-
+-NoValue-/something
+============================================================
+============================================================
+TEST 28: Non-character delimiters: delimiters with the same definition
+============================================================
+(abc)
+(-NoValue-)
+Removed: (\)abc\))
+(abc)
+(-NoValue-)
+Removed: (abc\){})
+(\BooleanTrue )
+(\BooleanFalse )
+(l|-NoValue-)
+(-NoValue-|r)
+(l|-NoValue-)
+Removed: (\({l})
+(-NoValue-|r)
+Removed: (\){r})
+(l|r)
+(l|r)
+============================================================
+============================================================
+TEST 29: Non-character delimiters: delimiters \let to the same token
+============================================================
+(abc)
+(-NoValue-)
+Removed: (\)abc\))
+(abc)
+(-NoValue-)
+Removed: (abc\){})
+(\BooleanTrue )
+(\BooleanFalse )
+(l|-NoValue-)
+(-NoValue-|r)
+(l|-NoValue-)
+Removed: (\({l})
+(-NoValue-|r)
+Removed: (\){r})
+(l|r)
+(l|r)
+============================================================
+============================================================
+TEST 30: Non-character delimiters: forbidden delimiters
+============================================================
+! LaTeX3 Error: Argument delimiter '\(' for the command '\foo' is not allowed.
+For immediate help type H <return>.
+ ...
+l. ... }
+The argument specification provided was not valid: the implicit begin-group
+token '\(' is not allowed as an argument delimiter.
+LaTeX will ignore this entire definition.
+! LaTeX3 Error: Argument delimiter '\(' for the command '\foo' is not allowed.
+For immediate help type H <return>.
+ ...
+l. ... }
+The argument specification provided was not valid: the implicit begin-group
+token '\(' is not allowed as an argument delimiter.
+LaTeX will ignore this entire definition.
+! LaTeX3 Error: Argument delimiter '\)' for the command '\foo' is not allowed.
+For immediate help type H <return>.
+ ...
+l. ... }
+The argument specification provided was not valid: the implicit end-group
+token '\)' is not allowed as an argument delimiter.
+LaTeX will ignore this entire definition.
+! LaTeX3 Error: Argument delimiter '\)' for the command '\foo' is not allowed.
+For immediate help type H <return>.
+ ...
+l. ... }
+The argument specification provided was not valid: the implicit end-group
+token '\)' is not allowed as an argument delimiter.
+LaTeX will ignore this entire definition.
+! LaTeX3 Error: Argument delimiter '\(' for the command '\foo' is not allowed.
+For immediate help type H <return>.
+ ...
+l. ... }
+The argument specification provided was not valid: the implicit begin-group
+token '\(' is not allowed as an argument delimiter.
+LaTeX will ignore this entire definition.
+! LaTeX3 Error: Argument delimiter '\)' for the command '\foo' is not allowed.
+For immediate help type H <return>.
+ ...
+l. ... }
+The argument specification provided was not valid: the implicit end-group
+token '\)' is not allowed as an argument delimiter.
+LaTeX will ignore this entire definition.
+! LaTeX3 Error: Argument delimiter '\(' for the command '\foo' is not allowed.
+For immediate help type H <return>.
+ ...
+l. ... }
+The argument specification provided was not valid: the implicit begin-group
+token '\(' is not allowed as an argument delimiter.
+LaTeX will ignore this entire definition.
+(abc)
+(abc)
+(abc)
+(abc)
+============================================================
+============================================================
+TEST 31: IfBoolean multi token
+============================================================
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+ Invalid use \IfBooleanTF {}
+l. ... }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+ Invalid use \IfBooleanTF {}
+l. ... }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+FALSE
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+ Invalid use \IfBooleanTF {\ERROR \ERROR }
+l. ... }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+FALSE
+============================================================
+============================================================
+TEST 32: Processor spaces
+============================================================
+|{a}{bcd}|
+> \box_wd:N \l_tmpa_box =0.0pt.
+============================================================
+============================================================
+TEST 33: Processor depending on other argument
+============================================================
+|{a}{bcd;e}|1|
+|{a,bcd}{e}|1|
+============================================================
diff --git a/l3kernel/testfiles/m3cmd004.lvt b/l3kernel/testfiles/m3cmd004.lvt
index eed9a394d..26d642c22 100644
--- a/l3kernel/testfiles/m3cmd004.lvt
+++ b/l3kernel/testfiles/m3cmd004.lvt
@@ -162,7 +162,7 @@
\DeclareDocumentCommand { \null } { } { }
\DeclareDocumentCommand { \foo } { >{\SplitList{;}} m +o +m } { }
\DeclareDocumentEnvironment { nullenv } { } { } { }
- \DeclareDocumentEnvironment { fooenv } { v D{$}{$} l u{!} } { } { }
+ \DeclareDocumentEnvironment { fooenv } { v D{$}{$} m m } { } { }
\TIMO
\GetDocumentCommandArgSpec { \null } \TYPE { | \ArgumentSpecification | }
\ShowDocumentCommandArgSpec { \null }
@@ -258,14 +258,14 @@
\margins {a} [1cm] {b}
\margins [1cm] {a} [2cm] {b}
\DeclareDocumentCommand {\foo}
- { D<>{#2} G{#5#1} E{_^}{{1}{2}} O{{#3}{#4}#6} m }
+ { D<>{#2} m E{_^}{{1}{2}} O{{#3}{#4}#6} m }
{ \TYPE { \exp_not:n { #1 | #2 | {#3}{#4} | #5 | #6 } } }
- \foo<\A>_{\B}{\C}
+ \foo<\A>{}_{\B}{\C}
\foo{\A}{\B}
\foo{\A}[\B]{\C}
- \foo ^{\A}{\B}
- \foo[]{\B}
- \foo<\A>_{\B}^{\C}{\D}
+ \foo {}^{\A}{\B}
+ \foo{}[]{\B}
+ \foo<\A>{}_{\B}^{\C}{\D}
\DeclareDocumentCommand {\foo}
{ O{#2} O{#3} O{#4} O{#5} O{#6} O{#7} O{#8} O{#9} m }
{ \TYPE { \exp_not:n {#1} } }
diff --git a/l3kernel/testfiles/m3cmd004.tlg b/l3kernel/testfiles/m3cmd004.tlg
index 66731a27d..12efa1cc2 100644
--- a/l3kernel/testfiles/m3cmd004.tlg
+++ b/l3kernel/testfiles/m3cmd004.tlg
@@ -227,19 +227,10 @@ l. ... }
> \ArgumentSpecification=.
<recently read> }
l. ... }
-! LaTeX3 Error: Unknown document environment 'fooenv'.
-For immediate help type H <return>.
- ...
-l. ... }
-You have asked for the argument specification for the environment 'fooenv',
-but it is not defined.
-||
-! LaTeX3 Error: Unknown document environment 'fooenv'.
-For immediate help type H <return>.
- ...
+|vD{$}{$}mm|
+> \ArgumentSpecification=vD{$}{$}mm.
+<recently read> }
l. ... }
-You have asked for the argument specification for the environment 'fooenv',
-but it is not defined.
============================================================
============================================================
TEST 10: First argument must be a command
@@ -660,223 +651,17 @@ TEST 13: Defaults referring to other arguments
(1cm,a,1cm,b)
(1cm,a,1cm,b)
(1cm,a,2cm,b)
-! LaTeX3 Error: Deprecated argument type 'G' for the command '\foo' requires
-(LaTeX3) xparse.
-For immediate help type H <return>.
- ...
-l. ... }
-The letter 'G' specifies a known argument type that requires the xparse
-package.
-LaTeX will ignore this entire definition.
-! Undefined control sequence.
-<argument> ... {##1|##2|{##3}{##4}|##5|##6}}}\foo
- <\A >_{\B }{\C }\foo {\A }...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...1|##2|{##3}{##4}|##5|##6}}}\foo <\A
- >_{\B }{\C }\foo {\A }{\B ...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...{##3}{##4}|##5|##6}}}\foo <\A >_{\B
- }{\C }\foo {\A }{\B }\foo ...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...{##4}|##5|##6}}}\foo <\A >_{\B }{\C
- }\foo {\A }{\B }\foo {\A }...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...##5|##6}}}\foo <\A >_{\B }{\C }\foo
- {\A }{\B }\foo {\A }[\B ]{...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...##6}}}\foo <\A >_{\B }{\C }\foo {\A
- }{\B }\foo {\A }[\B ]{\C }...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...}\foo <\A >_{\B }{\C }\foo {\A }{\B
- }\foo {\A }[\B ]{\C }\foo ...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...<\A >_{\B }{\C }\foo {\A }{\B }\foo
- {\A }[\B ]{\C }\foo ^{\A }...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...>_{\B }{\C }\foo {\A }{\B }\foo {\A
- }[\B ]{\C }\foo ^{\A }{\B ...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ... }{\C }\foo {\A }{\B }\foo {\A }[\B
- ]{\C }\foo ^{\A }{\B }\foo...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ... }\foo {\A }{\B }\foo {\A }[\B ]{\C
- }\foo ^{\A }{\B }\foo []{\...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ... {\A }{\B }\foo {\A }[\B ]{\C }\foo
- ^{\A }{\B }\foo []{\B }\fo...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Missing $ inserted.
-<inserted text>
- $
-l. ... }
-I've inserted a begin-math/end-math symbol since I think
-you left one out. Proceed, with fingers crossed.
-! Undefined control sequence.
-<argument> ...}{\B }\foo {\A }[\B ]{\C }\foo ^{\A
- }{\B }\foo []{\B }\foo <\A...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...}\foo {\A }[\B ]{\C }\foo ^{\A }{\B
- }\foo []{\B }\foo <\A >_{\...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...{\A }[\B ]{\C }\foo ^{\A }{\B }\foo
- []{\B }\foo <\A >_{\B }^{\...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...\B ]{\C }\foo ^{\A }{\B }\foo []{\B
- }\foo <\A >_{\B }^{\C }{\D...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...C }\foo ^{\A }{\B }\foo []{\B }\foo
- <\A >_{\B }^{\C }{\D }\Dec...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...foo ^{\A }{\B }\foo []{\B }\foo <\A
- >_{\B }^{\C }{\D }\Declare...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...\A }{\B }\foo []{\B }\foo <\A >_{\B
- }^{\C }{\D }\DeclareDocume...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...B }\foo []{\B }\foo <\A >_{\B }^{\C
- }{\D }\DeclareDocumentComm...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
-! Undefined control sequence.
-<argument> ...oo []{\B }\foo <\A >_{\B }^{\C }{\D
- }\DeclareDocumentCommand {...
-l. ... }
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.
+\A ||{\B }{2}|{\B }{2}\C |\C
+\A |\A |{1}{2}|{1}{2}\B |\B
+\A |\A |{1}{2}|\B |\C
+||{1}{\A }|{1}{\A }\B |\B
+||{1}{2}||\B
+\A ||{\B }{\C }|{\B }{\C }\D |\D
\A
{{\C }{-NoValue-}}{\E }|{\C }{-NoValue-}|\E
{\A }{\E }|{{\A }{\E }}{-NoValue-}|\E
{{\C }{-NoValue-}}{\A }|{\C }{-NoValue-}|\E
{\A }{\B }|{{\A }{\B }}{\D }|\E
-! Missing $ inserted.
-<inserted text>
- $
-l. ... }
-I've inserted something that you may have forgotten.
-(See the <inserted text> above.)
-With luck, this will get me unwedged. But if you
-really didn't forget anything, try typing `2' now; then
-my insertion and my current dilemma will both disappear.
============================================================
============================================================
TEST 14: Test ## in expandable argument specification
@@ -971,4 +756,302 @@ undefined
For immediate help type H <return>.
...
l. ... }
-(That makes 100 errors; please try again.)
+The argument specification for \foo contains a processor function: this is
+only supported for standard robust commands.
+LaTeX will ignore this entire definition.
+undefined
+============================================================
+============================================================
+TEST 17: Optional+mandatory with same delimiter
+============================================================
+LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '['
+(LaTeX3) as a previous optional argument, it will not be possible to
+(LaTeX3) omit all optional arguments when calling this command.
+|a|b|
+LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '['
+(LaTeX3) as a previous optional argument, it will not be possible to
+(LaTeX3) omit all optional arguments when calling this command.
+|a|b|
+LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter ':'
+(LaTeX3) as a previous optional argument, it will not be possible to
+(LaTeX3) omit all optional arguments when calling this command.
+|a:b,c|d|
+LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter ':'
+(LaTeX3) as a previous optional argument, it will not be possible to
+(LaTeX3) omit all optional arguments when calling this command.
+|a:b,c|d|
+LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '['
+(LaTeX3) as a previous optional argument, it will not be possible to
+(LaTeX3) omit all optional arguments when calling this command.
+|-NoValue-|\BooleanTrue |a|
+LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '*'
+(LaTeX3) as a previous optional argument, it will not be possible to
+(LaTeX3) omit all optional arguments when calling this command.
+|\BooleanTrue |a|
+LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '('
+(LaTeX3) as a previous optional argument, it will not be possible to
+(LaTeX3) omit all optional arguments when calling this command.
+|\BooleanTrue |a(b)c|\BooleanTrue |
+LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '_'
+(LaTeX3) as a previous optional argument, it will not be possible to
+(LaTeX3) omit all optional arguments when calling this command.
+|{_}{a}|\BooleanFalse ||
+|{a}{-NoValue-}|\BooleanFalse |abc|
+|{-NoValue-}{-NoValue-}|\BooleanTrue |a|
+============================================================
+============================================================
+TEST 18: par in short expandable
+============================================================
+Runaway argument?
+\ERROR
+! Paragraph ended before \foo (arg 2) was complete.
+<to be read again>
+ \par
+l. ... }
+I suspect you've forgotten a `}', causing me to apply this
+control sequence to too much text. How can we recover?
+My plan is to forget the whole thing and hope for the best.
+Runaway argument?
+! Paragraph ended before \foo was complete.
+<to be read again>
+ \par
+l. ... }
+I suspect you've forgotten a `}', causing me to apply this
+control sequence to too much text. How can we recover?
+My plan is to forget the whole thing and hope for the best.
+|\BooleanFalse |\par |a|
+|\BooleanFalse |a|b|
+\par
+\par
+============================================================
+============================================================
+TEST 19: Environments and expansion
+============================================================
+\A \B \C
+\A \B \C
+============================================================
+============================================================
+TEST 20: Expandable r type
+============================================================
+LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '['
+(LaTeX3) as a previous optional argument, it will not be possible to
+(LaTeX3) omit all optional arguments when calling this command.
+|a|b|
+|a|b|
+============================================================
+============================================================
+TEST 21: Expandable e-type argument definitions
+============================================================
+({-NoValue-}{-NoValue-})(\the re)
+({\u p}{-NoValue-})(\he re)
+({-NoValue-}{\do wn})(\he re)
+({\u p}{\do wn})(\he re)
+({\U P}{-NoValue-})(\the re)
+({\u p}{-NoValue-})(\he re)
+({\U P}{\do wn})(\he re)
+({\u p}{\do wn})(\he re)
+({\U P}{\DO WN})(\the re)
+({\u p}{\DO WN})(\he re)
+({\U P}{\do wn})(\he re)
+({\u p}{\do wn})(\he re)
+({##}{\DO WN})(##)(\A )
+({\A }{\DO WN})(\A )(\B )
+({\A }{\DO WN})(\B )(\C )
+({##}{\A })(##)(\B )
+({\B }{\A })(\C )(\D )
+============================================================
+============================================================
+TEST 22: Long status of t-type ignored
+============================================================
+|\BooleanTrue |\BooleanTrue |\par |\par |
+|\BooleanFalse |\BooleanTrue |-NoValue-|\par \A |
+Runaway argument?
+! Paragraph ended before \foo was complete.
+<to be read again>
+ \par
+l. ... }
+I suspect you've forgotten a `}', causing me to apply this
+control sequence to too much text. How can we recover?
+My plan is to forget the whole thing and hope for the best.
+\par
+|\BooleanFalse |\BooleanTrue |[\A ]|\B |
+============================================================
+============================================================
+TEST 23: Same expandable command with/without defaults
+============================================================
+|a|b|{c}
+|b|c|
+============================================================
+============================================================
+TEST 24: Wrongly undefining an xparse command
+============================================================
+LaTeX3 Warning: The command '\foo' was undefined but not the associated
+(LaTeX3) commands '\foo code' and/or '\foo defaults'. Maybe you tried
+(LaTeX3) using \let. This may lead to an infinite loop.
+============================================================
+============================================================
+TEST 25: NoValue passed to another command
+============================================================
+|-NoValue-|B|C|
+============================================================
+============================================================
+TEST 26: Two processors
+============================================================
+Defining \CountArg on line ...
+|2|{5}|
+============================================================
+============================================================
+TEST 27: Non-character token delimiters
+============================================================
+abc
+def
+LaTeX3 Warning: Since the mandatory argument 'R/r' has the same delimiter '\('
+(LaTeX3) as a previous optional argument, it will not be possible to
+(LaTeX3) omit all optional arguments when calling this command.
+abc/def
+abc/def
+abc/-NoValue-
+-NoValue-/something
+============================================================
+============================================================
+TEST 28: Non-character delimiters: delimiters with the same definition
+============================================================
+(abc)
+(-NoValue-)
+Removed: (\)abc\))
+(abc)
+(-NoValue-)
+Removed: (abc\){})
+(\BooleanTrue )
+(\BooleanFalse )
+(l|-NoValue-)
+(-NoValue-|r)
+(l|-NoValue-)
+Removed: (\({l})
+(-NoValue-|r)
+Removed: (\){r})
+(l|r)
+(l|r)
+============================================================
+============================================================
+TEST 29: Non-character delimiters: delimiters \let to the same token
+============================================================
+(abc)
+(-NoValue-)
+Removed: (\)abc\))
+(abc)
+(-NoValue-)
+Removed: (abc\){})
+(\BooleanTrue )
+(\BooleanFalse )
+(l|-NoValue-)
+(-NoValue-|r)
+(l|-NoValue-)
+Removed: (\({l})
+(-NoValue-|r)
+Removed: (\){r})
+(l|r)
+(l|r)
+============================================================
+============================================================
+TEST 30: Non-character delimiters: forbidden delimiters
+============================================================
+! LaTeX3 Error: Argument delimiter '\(' for the command '\foo' is not allowed.
+For immediate help type H <return>.
+ ...
+l. ... }
+The argument specification provided was not valid: the implicit begin-group
+token '\(' is not allowed as an argument delimiter.
+LaTeX will ignore this entire definition.
+! LaTeX3 Error: Argument delimiter '\(' for the command '\foo' is not allowed.
+For immediate help type H <return>.
+ ...
+l. ... }
+The argument specification provided was not valid: the implicit begin-group
+token '\(' is not allowed as an argument delimiter.
+LaTeX will ignore this entire definition.
+! LaTeX3 Error: Argument delimiter '\)' for the command '\foo' is not allowed.
+For immediate help type H <return>.
+ ...
+l. ... }
+The argument specification provided was not valid: the implicit end-group
+token '\)' is not allowed as an argument delimiter.
+LaTeX will ignore this entire definition.
+! LaTeX3 Error: Argument delimiter '\)' for the command '\foo' is not allowed.
+For immediate help type H <return>.
+ ...
+l. ... }
+The argument specification provided was not valid: the implicit end-group
+token '\)' is not allowed as an argument delimiter.
+LaTeX will ignore this entire definition.
+! LaTeX3 Error: Argument delimiter '\(' for the command '\foo' is not allowed.
+For immediate help type H <return>.
+ ...
+l. ... }
+The argument specification provided was not valid: the implicit begin-group
+token '\(' is not allowed as an argument delimiter.
+LaTeX will ignore this entire definition.
+! LaTeX3 Error: Argument delimiter '\)' for the command '\foo' is not allowed.
+For immediate help type H <return>.
+ ...
+l. ... }
+The argument specification provided was not valid: the implicit end-group
+token '\)' is not allowed as an argument delimiter.
+LaTeX will ignore this entire definition.
+! LaTeX3 Error: Argument delimiter '\(' for the command '\foo' is not allowed.
+For immediate help type H <return>.
+ ...
+l. ... }
+The argument specification provided was not valid: the implicit begin-group
+token '\(' is not allowed as an argument delimiter.
+LaTeX will ignore this entire definition.
+(abc)
+(abc)
+(abc)
+(abc)
+============================================================
+============================================================
+TEST 31: IfBoolean multi token
+============================================================
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+ Invalid use \IfBooleanTF {}
+l. ... }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+ Invalid use \IfBooleanTF {}
+l. ... }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+FALSE
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+ Invalid use \IfBooleanTF {\ERROR \ERROR }
+l. ... }
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+FALSE
+============================================================
+============================================================
+TEST 32: Processor spaces
+============================================================
+|{a}{bcd}|
+> \box_wd:N \l_tmpa_box =0.0pt.
+============================================================
+============================================================
+TEST 33: Processor depending on other argument
+============================================================
+|{a}{bcd;e}|1|
+|{a,bcd}{e}|1|
+============================================================
More information about the latex3-commits
mailing list.