summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/normalcolor/normalcolor.sty
blob: bb602c5b58f9ed195274ba935bd3b1c263abf434 (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
92
93
94
95
96
97
%%
%% This is file `normalcolor.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% normalcolor.dtx  (with options: `package')
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% Any modified versions of this file must be renamed
%% with new filenames distinct from normalcolor.sty.
%% 
%% For distribution of the original source see the terms
%% for copying and modification in the file normalcolor.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.)
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\begingroup
  \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
  \filedate$Date: 2016-03-22 08:55:35 +0100 (Di, 22 M^^c3^^a4r 2016) $
  \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
  \filerevision$Revision: 11 $
\endgroup
\ProvidesPackage{normalcolor}[%
  \filedate \space\filerevision\space
  simple (x)color extension package]
\ProcessOptions\relax
\DeclareRobustCommand*{\resetnormalcolor}{\AtBeginDocument{\resetnormalcolor}}
\AtBeginDocument{%
  \let\resetnormalcolor\relax
  \DeclareRobustCommand*{\resetnormalcolor}{%
    \ifdefined\default@color
      \ifdefined\current@color
        \let\default@color\current@color
      \fi
    \fi
  }%
}
\DeclareRobustCommand*{\setnormalcolor}{%
  \@ifnextchar [%]
    \@@setnormalcolor\@setnormalcolor
}
\newcommand*{\@@setnormalcolor}[2][]{%
  \AtBeginDocument{%
    \begingroup\expandafter\expandafter\expandafter\endgroup
    \expandafter\ifx\csname color\endcsname\relax\else
      \color[{#1}]{#2}\let\default@color\current@color
    \fi
  }%
}
\newcommand*{\@setnormalcolor}[1]{%
  \AtBeginDocument{%
    \begingroup\expandafter\expandafter\expandafter\endgroup
    \expandafter\ifx\csname color\endcsname\relax\else
      \color{#1}\let\default@color\current@color
    \fi
  }%
}
\AtBeginDocument{%
  \begingroup\expandafter\expandafter\expandafter\endgroup
  \expandafter\ifx\csname color\endcsname\relax
    \renewcommand*{\@@setnormalcolor}[2][]{}%
    \let\@setnormalcolor\@gobble
  \else
    \renewcommand*{\@@setnormalcolor}[2][]{%
      \begingroup
        \color[{#1}]{#2}%
        \edef\reserved@a{%
          \noexpand\endgroup
          \noexpand\def\noexpand\default@color{%
            \unexpanded\expandafter{\current@color}%
          }%
        }%
      \reserved@a
    }%
    \renewcommand*{\@setnormalcolor}[1]{%
      \begingroup
        \color{#1}%
        \edef\reserved@a{%
          \noexpand\endgroup
          \noexpand\def\noexpand\default@color{%
            \unexpanded\expandafter{\current@color}%
          }%
        }%
      \reserved@a
    }%
  \fi
}
\endinput
%%
%% End of file `normalcolor.sty'.