diff options
author | Karl Berry <karl@freefriends.org> | 2007-05-22 17:46:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-05-22 17:46:23 +0000 |
commit | f4eb27d3314d15838f674a3872000159d029f88b (patch) | |
tree | 6e9ab33c5a2d702912b4a969ade4e4e2ac586d62 /Master/texmf-dist/tex/latex/expl3/l3expan.sty | |
parent | 14af3f447439750920f754792b89f113d019076a (diff) |
update expl3
git-svn-id: svn://tug.org/texlive/trunk@4335 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.sty | 118 |
1 files changed, 95 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/latex/expl3/l3expan.sty b/Master/texmf-dist/tex/latex/expl3/l3expan.sty index 3632bb179d1..f6e65f0ade6 100644 --- a/Master/texmf-dist/tex/latex/expl3/l3expan.sty +++ b/Master/texmf-dist/tex/latex/expl3/l3expan.sty @@ -15,28 +15,68 @@ %% Do not distribute a modified version of this file. %% %% -%% File: l3expan.dtx Copyright (C) 1990-1998 LaTeX3 project -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{l3expan} - [1998/04/20 v1.0e L3 Experimental Argument Expansion module] -\RequirePackage{l3basics} +%% File: l3expan.dtx Copyright (C) 1990-2006 LaTeX3 project +%% +%% It may be distributed and/or modified under the conditions of the +%% LaTeX Project Public License (LPPL), either version 1.3c of this +%% license or (at your option) any later version. The latest version +%% of this license is in the file +%% +%% http://www.latex-project.org/lppl.txt +%% +%% This file is part of the ``expl3 bundle'' (The Work in LPPL) +%% and all files in that bundle must be distributed together. +%% +%% The released version of this bundle is available from CTAN. +%% +%% ----------------------------------------------------------------------- +%% +%% The development version of the bundle can be found at +%% +%% http://www.latex-project.org/cgi-bin/cvsweb.cgi/ +%% +%% for those people who are interested. +%% +%%%%%%%%%%% +%% NOTE: %% +%%%%%%%%%%% +%% +%% Snapshots taken from the repository represent work in progress and may +%% not work or may contain conflicting material! We therefore ask +%% people _not_ to put them into distributions, archives, etc. without +%% prior consultation with the LaTeX Project Team. +%% +%% ----------------------------------------------------------------------- +\RequirePackage{l3names} +\GetIdInfo$Id: l3expan.dtx 573 2006-08-21 20:59:37Z morten $ + {L3 Experimental Argument Expansion module} \RequirePackage{l3tlp} \tlp_new:Nn\l_exp_tlp{} -\def_new:Npn\exp_arg_next:nnn#1#2#3{% - #2\:::{#3#1}} -\def_new:Npn\::n#1\:::#2#3{% - #1\:::{#2{#3}}} -\def_new:Npn\::N#1\:::#2#3{% - #1\:::{#2#3}} -\def_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{% - \exp_after:NN\exp_arg_next:nnn\exp_after:NN{\exp_after:NN{#3}}{#1}{#2}} -\def_new:Npn\::x#1\:::#2#3{% - \tlp_set:Nx\l_exp_tlp{{{#3}}}% +\def_new:Npn\exp_arg_next:nnn#1#2#3{ + #2\:::{#3#1} +} +\def_new:Npn\::n#1\:::#2#3{ + #1\:::{#2{#3}} +} +\def_new:Npn\::N#1\:::#2#3{ + #1\:::{#2#3} +} +\def_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{ + \exp_after:NN\exp_arg_next:nnn\exp_after:NN{\exp_after:NN{#3}}{#1}{#2} +} +\def_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\::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 { @@ -48,10 +88,39 @@ {#1} } } +\def:Npn\::E#1\:::#2#3{ + \exp_after:NN\exp_arg_next:nnn \exp_after:NN{#3}{#1}{#2} +} +\def:Npn\::e#1\:::#2#3{ + \exp_after:NN\exp_arg_next:nnn \exp_after:NN{#3}{#1}{#2} +} +\def: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} +} +\let:NN \exp_args:NE \exp_after:NN +\def:Npn \exp_args:NNE #1{\exp_args:NE#1\exp_args:NE} +\def:Npn \exp_args:NNNE #1#2{\exp_args:NE#1\exp_args:NE#2\exp_args:NE} +\def:Npn \exp_args:NEE #1{\exp_args:NE\exp_args:NE\exp_args:NE#1\exp_args:NE} +\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:NcNc {\::c\::N\::c\:::} +\def:Npn \exp_args:NcNo {\::c\::N\::o\:::} +\def:Npn \exp_args:Ncco {\::c\::c\::o\:::} +\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:Nnno {\::n\::n\::o\:::} \def:Npn \exp_args:Nnnx {\::n\::n\::x\:::} \def:Npn \exp_args:Nno {\::n\::o\:::} @@ -64,7 +133,10 @@ \def:Npn \exp_args:Nx {\::x\:::} \def:Npn \exp_args:Nxo {\::x\::o\:::} \def:Npn \exp_args:Nxx {\::x\::x\:::} -\def_new:Npn\exp_not:o{\exp_after:NN\exp_not:N} +\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_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 @@ -73,6 +145,8 @@ \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 \exp_after:NN{#3}} +\def_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 \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 @@ -106,20 +180,18 @@ #1:#2 \cs_end: } - \cs_free:cT + \cs_if_free:cT {exp_args:N#3} {\def:cpx {exp_args:N#3} {\exp_args_form_x:w #3 :} } } \def_new:Npn\exp_args_form_x:w #1 { - \exp_after:NN \exp_not:N \cs:w ::#1 \cs_end: + \exp_not:c{::#1} \if_meaning:NN #1 : \else: \exp_after:NN\exp_args_form_x:w \fi:} - - %% %% %% End of file `l3expan.sty'. |