summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bigfoot/suffix.sty
blob: f78ef43636b7e094cccf7ac8c57eb142d9b6d604 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
%%
%% This is file `suffix.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% suffix.dtx  (with options: `style')
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% Any modified versions of this file must be renamed
%% with new filenames distinct from suffix.sty.
%% 
%% For distribution of the original source see the terms
%% for copying and modification in the file suffix.dtx.
%% 
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%%
%% perpage is part of the bigfoot bundle for critical typesetting
%% Copyright 2002, 03, 04, 05, 06  David Kastrup <dak@gnu.org>
%%
\def\next$#1: #2 #3${#2}
\edef\next{\noexpand
  \ProvidesPackage{suffix}[\next$Date: 2006/07/15 21:24:56 $
  \next$Revision: 1.5 $ Variant command support]}
\next
\ifcase\ifx\eTeXversion\@undefined \@ne\fi
  \ifnum\eTeXversion<\tw@ \@ne\fi\z@
\else
  \PackageError{suffix}{This package requires eTeX version 2}%
  {You might try to use the `elatex' command.}%
\fi
\def\WithSuffix{\@temptokena{}\let\WSF@global\relax
  \WSF@sfx}
\long\def\WSF@sfx#1#2{\WSF@append{#1}\def\reserved@a{#2}%
  \afterassignment\WSF@decsuff \WSF@gobblenext}

\def\WSF@append#1{\@temptokena\expandafter{\the\@temptokena#1}}

\def\WSF@gobblenext{\let\reserved@b= }
\long\def\SuffixName#1{WSF:\string#1 \meaning}
\def\NoSuffixName{WSF:\string}
\def\WSF@decsuff{\ifcsname
    \expandafter\NoSuffixName\reserved@a\endcsname
  \else
    \WSF@global\expandafter\let\csname
       \expandafter\NoSuffixName\reserved@a
      \expandafter\endcsname \reserved@a
    \long\def\reserved@c##1{\WSF@global\protected\def
      ##1{\WSF@suffixcheck##1}}%
    \expandafter\reserved@c\reserved@a
  \fi
  \WSF@global
    \the\expandafter\@temptokena\csname
    \expandafter \SuffixName
    \reserved@a\reserved@b\endcsname}
\def\WSF@suffixcheck#1{\begingroup\def\reserved@a{#1}%
  \futurelet\reserved@b\WSF@suffixcheckii}
\def\WSF@suffixcheckii{\ifcsname \expandafter\SuffixName
    \reserved@a\reserved@b\endcsname
      \expandafter
      \WSF@suffixcheckiii
    \else
      \expandafter
      \WSF@suffixcheckiv
    \fi}
\def\WSF@suffixcheckiii{%
  \afterassignment\endgroup
  \expandafter\aftergroup
    \csname \expandafter \SuffixName\reserved@a\reserved@b\endcsname
    \WSF@gobblenext}

\def\WSF@suffixcheckiv{%
    \expandafter\endgroup
    \csname \expandafter\NoSuffixName\reserved@a\endcsname}
\WithSuffix\def\WSF@sfx\long{\WSF@append\long\WSF@sfx}
\WithSuffix\def\WSF@sfx\global{\let\WSF@global\global\WSF@sfx}
\WithSuffix\def\WSF@sfx\protected{\WSF@append\protected\WSF@sfx}
\WithSuffix\def\WSF@sfx\expandafter{\expandafter\WSF@sfx\expandafter}
\WithSuffix\edef\WSF@sfx\gdef{\let\WSF@global\global
  \expandafter\noexpand\csname\NoSuffixName\WSF@sfx\endcsname\def}
\WithSuffix\edef\WSF@sfx\xdef{\let\WSF@global\global
  \expandafter\noexpand\csname\NoSuffixName\WSF@sfx\endcsname\edef}
\endinput
%%
%% End of file `suffix.sty'.