summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/xpackages/ldcsetup.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/xpackages/ldcsetup.dtx')
-rw-r--r--Master/texmf-dist/source/latex/xpackages/ldcsetup.dtx51
1 files changed, 26 insertions, 25 deletions
diff --git a/Master/texmf-dist/source/latex/xpackages/ldcsetup.dtx b/Master/texmf-dist/source/latex/xpackages/ldcsetup.dtx
index 7d2d729d622..09e37c55cb3 100644
--- a/Master/texmf-dist/source/latex/xpackages/ldcsetup.dtx
+++ b/Master/texmf-dist/source/latex/xpackages/ldcsetup.dtx
@@ -1,6 +1,6 @@
% \iffalse
%% File: ldcsetup.dtx (C) Copyright 1999 Frank Mittelbach, Chris Rowley, David Carlisle
-%% (C) Copyright 2004-2007 Frank Mittelbach, LaTeX3 Project
+%% (C) Copyright 2004-2009 Frank Mittelbach, 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
@@ -34,10 +34,10 @@
%% -----------------------------------------------------------------------
%%
%<*driver|package>
-\RequirePackage{l3names}
+\RequirePackage{expl3}
%</driver|package>
%\fi
-\GetIdInfo$Id: ldcsetup.dtx 636 2007-09-12 20:03:06Z mittelba $
+\GetIdInfo$Id: ldcsetup.dtx 1295 2009-05-06 08:32:25Z will $
{coding conventions and stuff}
%\iffalse
%<*driver>
@@ -73,7 +73,8 @@
{\filename}{\filedate}{\fileversion}{\filedescription}
% \end{macrocode}
% \begin{macrocode}
-\RequirePackage{keyval,l3calc}
+\RequirePackage{keyval}
+\RequirePackage{expl3}
\ExplSyntaxOff
% \end{macrocode}
%
@@ -127,7 +128,7 @@
% this needs further work, don't think it is working
\ifx\InternalSyntaxOff\relax
\expandafter\def\expandafter\InternalSyntaxOff\expandafter
- {\@tempa\let\InternalSyntaxOff\relax}%
+ {\@tempa\let\InternalSyntaxOff\relax}%
\fi
\ifx\@currname\@empty
\expandafter\AtBeginDocument\expandafter{\@tempa}%
@@ -155,12 +156,12 @@
% \section{KV fixes}
% Allow\footnote{Not needed now?} key names to start with |\|.
% \begin{macrocode}
-\def\define@key#1#2{%
+\cs_set_nopar:Npn \define@key#1#2{%
\@ifnextchar[
{\KV@def{#1}{\string#2}}
{\@namedef{KV@#1@\string#2}####1}}
-\def\setkeys#1#2{%
- \def\KV@prefix{KV@#1@\expandafter\string}%
+\cs_set_nopar:Npn \setkeys#1#2{%
+ \cs_set_nopar:Npn \KV@prefix{KV@#1@\expandafter\string}%
\KV@do#2,\relax,}
% \end{macrocode}
%
@@ -173,7 +174,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\def\KV@@sp@c#1\@nil#2\relax#3{\KV@toks{#1}\edef#3{\the\KV@toks}}
+\cs_set_nopar:Npn \KV@@sp@c#1\@nil#2\relax#3{\KV@toks{#1}\cs_set_nopar:Npx #3{\the\KV@toks}}
% \end{macrocode}
%
% Generate error messages on missing `,'.
@@ -181,15 +182,15 @@
% More exactly if two `=' appear after a key generate an error.
% The current KV just silently ignores everything after the second `='.
% \begin{macrocode}
-\def\KV@equal{=}
+\cs_set_nopar:Npn \KV@equal{=}
% \end{macrocode}
%
% \begin{macrocode}
-\def\KV@split#1=#2=#3\relax{%
+\cs_set_nopar:Npn \KV@split#1=#2=#3\relax{%
\KV@@sp@def\@tempa{#1}%
- \def\@tempd{#3}%
+ \cs_set_nopar:Npn \@tempd{#3}%
\ifx\@tempa\@empty\else
- \expandafter\let\expandafter\@tempc
+ \expandafter\cs_set_eq:NN \expandafter\@tempc
\csname\KV@prefix\@tempa\endcsname
\ifx\@tempc\relax
\KV@error{\@tempa\space \expandafter\@gobbletwo\string\@undefined}\@eha
@@ -209,18 +210,18 @@
% \end{macrocode}
%
% \begin{macrocode}
-\def\KV@erry{\expandafter\KV@errx\meaning\@tempd\relax ignored\MessageBreak
+\cs_set_nopar:Npn \KV@erry{\expandafter\KV@errx\meaning\@tempd\relax ignored\MessageBreak
missing~comma~in~`\expandafter\strip@prefix\meaning\@tempb'~?}
% \end{macrocode}
%
% \begin{macrocode}
-\def\KV@errx#1>#2==\relax{%
+\cs_set_nopar:Npn \KV@errx#1>#2==\relax{%
`#2' }
% \end{macrocode}
%
% \begin{macrocode}
-\def\KV@default{%
- \expandafter\let\expandafter\@tempb
+\cs_set_nopar:Npn \KV@default{%
+ \expandafter\cs_set_eq:NN \expandafter\@tempb
\csname\KV@prefix\@tempa @default\endcsname
\ifx\@tempb\relax
\KV@error{No value specified for \@tempa}\@eha
@@ -231,7 +232,7 @@
%
% \LaTeX\ style error message.
% \begin{macrocode}
-\def\KV@error#1#2{\PackageError{keyval}{#1}{#2}}
+\cs_set_nopar:Npn \KV@error#1#2{\PackageError{keyval}{#1}{#2}}
% \end{macrocode}
%
% Instead of doing a full KV parse, and evaluating all the keys,
@@ -247,21 +248,21 @@
% up) the two |\KV|\ldots|@elt| commands must be defined as appropriate.
%
% \begin{macrocode}
-\def\KV@parse#1{
+\cs_set_nopar:Npn \KV@parse#1{
\begingroup
% \end{macrocode}
%
% Locally fudge |\KV@@def| to just add to a token register
% rather than make a definition.
% \begin{macrocode}
-\def\KV@@sp@c##1\@nil##2\relax##3{\addto@hook##3{{##1}}}
+\cs_set_nopar:Npn \KV@@sp@c##1\@nil##2\relax##3{\addto@hook##3{{##1}}}
% \end{macrocode}
%
% Locally fudge |\KV@split| to just add to a token register
% rather than execute the code for the found keys.
% \begin{macrocode}
-\def\KV@split##1=##2=##3\relax{%
- \def\@tempd{##3}%
+\cs_set_nopar:Npn \KV@split##1=##2=##3\relax{%
+ \cs_set_nopar:Npn \@tempd{##3}%
\expandafter\ifx\expandafter=\@firstofone##1=\else
\ifx\@tempd\@empty
\addto@hook\KV@toks\KV@default@elt
@@ -298,8 +299,8 @@
% Count Register assignments via calc. Here we also provide some
% global versions since a normal global prefix won't have any effect.
% \begin{macrocode}
-\let:NN \SetInternalCounter \calc_int_set:Nn
-\let:NN \GSetInternalCounter\calc_int_gset:Nn
+\cs_set_eq:NN \SetInternalCounter \calc_int_set:Nn
+\cs_set_eq:NN \GSetInternalCounter\calc_int_gset:Nn
% \end{macrocode}
%
%
@@ -314,7 +315,7 @@
% longer. Of course this doesn't free the hash table but at least
% the space gets reclaimed.
% \begin{macrocode}
-\def\UndeclareRobustCommand#1{%
+\cs_set_nopar:Npn \UndeclareRobustCommand#1{%
\cs_gundefine:N #1
\exp_args:Nc \cs_gundefine:N {\cs_to_str:N #1~}
}