summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/expl3/l3expan.sty
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-07-29 11:23:34 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-07-29 11:23:34 +0000
commitef285e6a49a93af098150d0b3125a34d3477ba55 (patch)
tree124a55595390d358e0cda8ae26f78e9a263e9a21 /Master/texmf-dist/tex/latex/expl3/l3expan.sty
parente7477f362711cc9d05dfa1ee71301fb34cce2d94 (diff)
expl3 update (2008/06/20)
git-svn-id: svn://tug.org/texlive/trunk@9869 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/expl3/l3expan.sty')
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3expan.sty109
1 files changed, 65 insertions, 44 deletions
diff --git a/Master/texmf-dist/tex/latex/expl3/l3expan.sty b/Master/texmf-dist/tex/latex/expl3/l3expan.sty
index f6e65f0ade6..4e8ee86603e 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3expan.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3expan.sty
@@ -48,38 +48,50 @@
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3names}
-\GetIdInfo$Id: l3expan.dtx 573 2006-08-21 20:59:37Z morten $
+\GetIdInfo$Id: l3expan.dtx 735 2008-01-14 22:31:02Z morten $
{L3 Experimental Argument Expansion module}
+\ProvidesExplPackage
+ {\filename}{\filedate}{\fileversion}{\filedescription}
\RequirePackage{l3tlp}
\tlp_new:Nn\l_exp_tlp{}
-\def_new:Npn\exp_arg_next:nnn#1#2#3{
+\def_long_new:Npn\exp_arg_next:nnn#1#2#3{
#2\:::{#3#1}
}
-\def_new:Npn\::n#1\:::#2#3{
+\def_long_new:Npn\::n#1\:::#2#3{
#1\:::{#2{#3}}
}
-\def_new:Npn\::N#1\:::#2#3{
+\def_long_new:Npn\::N#1\:::#2#3{
#1\:::{#2#3}
}
-\def_new:Npn\::c#1\:::#2#3{
+\def_long_new:Npn\::c#1\:::#2#3{
\exp_after:NN\exp_arg_next:nnn\cs:w #3\cs_end:{#1}{#2}
}
-\def_new:Npn\::o#1\:::#2#3{
+\def_long_new:Npn\::o#1\:::#2#3{
\exp_after:NN\exp_arg_next:nnn\exp_after:NN{\exp_after:NN{#3}}{#1}{#2}
}
-\def_new:Npn\::f#1\:::#2#3{
+\def_long_new:Npn\::f#1\:::#2#3{
\exp_after:NN\exp_arg_next:nnn
\exp_after:NN{\exp_after:NN{\int_to_roman:w -`0 #3}}
{#1}{#2}
}
-\def_new:Npn\::x#1\:::#2#3{
- \tlp_set:Nx\l_exp_tlp{{{#3}}}
- \exp_after:NN\exp_arg_next:nnn\l_exp_tlp{#1}{#2}}
-\def_new:Npn\:::#1{#1}
-\def_new:Npn\::C#1\:::#2#3{
+\def_new:Npn \exp_stop_f: {~}
+\let_new:NN \exp_arg:x \expanded % Move eventually.
+\cs_if_free:NTF\exp_arg:x{
+ \def_long_new:Npn\::x#1\:::#2#3{
+ % \tlp_set:Nx\l_exp_tlp{{{#3}}}
+ \def:Npx \l_exp_tlp{{{#3}}}
+ \exp_after:NN\exp_arg_next:nnn\l_exp_tlp{#1}{#2}}
+}
+{
+ \def_long_new:Npn\::x#1\:::#2#3{
+ \exp_after:NN\exp_arg_next:nnn
+ \exp_after:NN{\exp_arg:x{{#3}}}{#1}{#2}
+ }
+}
+\def_long_new:Npn\:::#1{#1}
+\def_long_new:Npn\::C#1\:::#2#3{
\exp_after:NN\exp_C_aux:nnn\cs:w #3\cs_end:{#1}{#2}}
-\def_new:Npn\exp_C_aux:nnn #1
- {
+\def_long_new:Npn\exp_C_aux:nnn #1{
\exp_after:NN
\exp_arg_next:nnn
\exp_after:NN
@@ -87,14 +99,14 @@
\exp_after:NN
{#1}
}
- }
-\def:Npn\::E#1\:::#2#3{
+}
+\def_long_new:Npn\::E#1\:::#2#3{
\exp_after:NN\exp_arg_next:nnn \exp_after:NN{#3}{#1}{#2}
}
-\def:Npn\::e#1\:::#2#3{
+\def_long_new:Npn\::e#1\:::#2#3{
\exp_after:NN\exp_arg_next:nnn \exp_after:NN{#3}{#1}{#2}
}
-\def:Npn\::d#1\:::#2#3{
+\def_long_new:Npn\::d#1\:::#2#3{
\exp_after:NN\exp_after:NN\exp_after:NN\exp_arg_next:nnn
\exp_after:NN\exp_after:NN\exp_after:NN{
\exp_after:NN\exp_after:NN\exp_after:NN{#3}}{#1}{#2}
@@ -106,26 +118,31 @@
\def:Npn \exp_args:NcE #1#2{\exp_after:NN #1\cs:w #2\exp_after:NN\cs_end:}
\def:Npn \exp_args:Nd {\::d\:::}
\def:Npn \exp_args:NNd {\::N\::d\:::}
+
\def:Npn \exp_args:NC {\::C\:::}
-\def:Npn \exp_args:Ncx {\::c\::x\:::}
-\def:Npn \exp_args:Ncco {\::c\::c\::o\:::}
-\def:Npn \exp_args:Nccx {\::c\::c\::x\:::}
-\def:Npn \exp_args:Ncnx {\::c\::n\::x\:::}
+\def:Npn \exp_args:NNC {\::N\::C\:::}
+\def:Npn \exp_args:NNf {\::N\::f\:::}
+\def:Npn \exp_args:NNno {\::N\::n\::o\:::}
+\def:Npn \exp_args:NNnx {\::N\::n\::x\:::} % new
+\def:Npn \exp_args:NNoo {\::N\::o\::o\:::} % new
+\def:Npn \exp_args:NNox {\::N\::o\::x\:::} % new
+\def:Npn \exp_args:NNx {\::N\::x\:::}
\def:Npn \exp_args:NcNc {\::c\::N\::c\:::}
\def:Npn \exp_args:NcNo {\::c\::N\::o\:::}
\def:Npn \exp_args:Ncco {\::c\::c\::o\:::}
+\def:Npn \exp_args:Ncco {\::c\::c\::o\:::}
+\def:Npn \exp_args:Nccx {\::c\::c\::x\:::}
+\def:Npn \exp_args:Ncnx {\::c\::n\::x\:::}
+\def:Npn \exp_args:Ncx {\::c\::x\:::}
\def:Npn \exp_args:Nf {\::f\:::}
-\def:Npn \exp_args:NNf {\::N\::f\:::}
\def:Npn \exp_args:Nfo{\::f\::o\:::}
\def:Npn \exp_args:Nnf {\::n\::f\:::}
-\def:Npn \exp_args:NNno {\::N\::n\::o\:::}
-%% Strange one this next one...
-\def:Npn \exp_args:NnnN {\::n\::n\::N\:::}
+\def:Npn \exp_args:NnnN {\::n\::n\::N\:::} %% Strange one this one...
+\def:Npn \exp_args:Nnnc {\::n\::n\::c\:::}
\def:Npn \exp_args:Nnno {\::n\::n\::o\:::}
\def:Npn \exp_args:Nnnx {\::n\::n\::x\:::}
\def:Npn \exp_args:Nno {\::n\::o\:::}
\def:Npn \exp_args:Nnox {\::n\::o\::x\:::}
-\def:Npn \exp_args:NNx {\::N\::x\:::}
\def:Npn \exp_args:Nnx {\::n\::x\:::}
\def:Npn \exp_args:Noo {\::o\::o\:::}
\def:Npn \exp_args:Noox {\::o\::o\::x\:::}
@@ -133,35 +150,39 @@
\def:Npn \exp_args:Nx {\::x\:::}
\def:Npn \exp_args:Nxo {\::x\::o\:::}
\def:Npn \exp_args:Nxx {\::x\::x\:::}
-\def:Npn \exp_args:NNC {\::N\::C\:::}
-\def:Npn \exp_args:Nnnc {\::n\::n\::c\:::}
-\def_new:Npn\exp_not:o#1{\exp_not:n\exp_after:NN{#1}}
+\def_long_new:Npn\exp_not:o#1{\exp_not:n\exp_after:NN{#1}}
+\def_long_new:Npn\exp_not:d#1{
+ \exp_not:n\exp_after:NN\exp_after:NN\exp_after:NN{#1}
+}
+\def_long_new:Npn\exp_not:f#1{
+ \exp_not:n\exp_after:NN{\int_to_roman:w -`0 #1}
+}
\def_new:Npn\exp_not:E{\exp_after:NN\exp_not:N}
-\def_new:Npn\exp_not:c#1{\exp_after:NN\exp_not:N\cs:w#1\cs_end:}
-\def_new:Npn \exp_args:No #1#2{\exp_after:NN#1\exp_after:NN{#2}}
-\def_new:Npn \exp_args:NOo #1#2#3{\exp_after:NN\exp_args:No \exp_after:NN#1
+\def_long_new:Npn\exp_not:c#1{\exp_after:NN\exp_not:N\cs:w#1\cs_end:}
+\def_long_new:Npn \exp_args:No #1#2{\exp_after:NN#1\exp_after:NN{#2}}
+\def_long_new:Npn \exp_args:NOo #1#2#3{\exp_after:NN\exp_args:No \exp_after:NN#1
\exp_after:NN#2\exp_after:NN{#3}}
-\def_new:Npn \exp_args:NOOo #1#2#3#4{\exp_after:NN\exp_args:NOo
+\def_long_new:Npn \exp_args:NOOo #1#2#3#4{\exp_after:NN\exp_args:NOo
\exp_after:NN#1\exp_after:NN#2\exp_after:NN#3\exp_after:NN{#4}}
-\def_new:Npn \exp_args:NNo #1#2#3{\exp_after:NN#1\exp_after:NN#2
+\def_long_new:Npn \exp_args:NNo #1#2#3{\exp_after:NN#1\exp_after:NN#2
\exp_after:NN{#3}}
-\def_new:Npn \exp_args:NNO #1#2#3 {\exp_after:NN#1
+\def_long_new:Npn \exp_args:NNO #1#2#3 {\exp_after:NN#1
\exp_after:NN#2 #3}
-\def_new:Npn \exp_args:NNOo #1#2#3#4{\exp_after:NN\exp_args:NNo
+\def_long_new:Npn \exp_args:NNOo #1#2#3#4{\exp_after:NN\exp_args:NNo
\exp_after:NN#1\exp_after:NN#2\exp_after:NN#3\exp_after:NN{#4}}
-\def_new:Npn \exp_args:NNNo #1#2#3#4{\exp_after:NN#1\exp_after:NN#2
+\def_long_new:Npn \exp_args:NNNo #1#2#3#4{\exp_after:NN#1\exp_after:NN#2
\exp_after:NN#3\exp_after:NN{#4}}
-\def_new:Npn \exp_args:Nc #1#2{\exp_after:NN#1\cs:w#2\cs_end:}
-\def_new:Npn \exp_args:NNc #1#2#3{\exp_after:NN#1\exp_after:NN#2
+\def_long_new:Npn \exp_args:Nc #1#2{\exp_after:NN#1\cs:w#2\cs_end:}
+\def_long_new:Npn \exp_args:NNc #1#2#3{\exp_after:NN#1\exp_after:NN#2
\cs:w#3\cs_end:}
-\def_new:Npn \exp_args:NOc#1#2#3{\exp_after:NN\exp_args:No\exp_after:NN
+\def_long_new:Npn \exp_args:NOc#1#2#3{\exp_after:NN\exp_args:No\exp_after:NN
#1\exp_after:NN#2\cs:w#3\cs_end:}
-\def_new:Npn \exp_args:Ncc #1#2#3{\exp_after:NN#1
+\def_long_new:Npn \exp_args:Ncc #1#2#3{\exp_after:NN#1
\cs:w#2\exp_after:NN\cs_end:\cs:w#3\cs_end:}
-\def_new:Npn \exp_args:Nccc #1#2#3#4{\exp_after:NN#1
+\def_long_new:Npn \exp_args:Nccc #1#2#3#4{\exp_after:NN#1
\cs:w#2\exp_after:NN\cs_end:\cs:w#3\exp_after:NN
\cs_end:\cs:w #4\cs_end:}
-\def_new:Npn \exp_args:Nco #1#2#3{\exp_after:NN#1\cs:w#2\exp_after:NN
+\def_long_new:Npn \exp_args:Nco #1#2#3{\exp_after:NN#1\cs:w#2\exp_after:NN
\cs_end:\exp_after:NN{#3}}
\def:Npn\exp_def_form:nnn#1#2#3{
\exp_after:NN