summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgfplots/libs/pgfplotslibrary.code.tex
blob: 06bade77b9e1c12635768052be5097d3f194fe8a (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
% Copyright 2006 by Till Tantau
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
% Comment: This file has been modified to utilize libraries in the pgfplots package.
% Edited by Nick Papior Andersen



% Loading further libraries

% Include a library file.
%
% #1 = List of names of library file.
%  
% Description:
%
% This command includes a list of pgfplots library files. For each file X in the
% list, the file tikzlibrarypgfplots.X.code.tex is included, provided this has
% not been done earlier. 
%
% For the convenience of Context users, both round and square brackets
% are possible for the argument.
%
% Example:
%
% \usepgfplotslibrary{units}
% \usepgfplotslibrary[units,dateplot]

\def\usepgfplotslibrary{\pgfutil@ifnextchar[{\use@pgfplotslibrary}{\use@@pgfplotslibrary}}%}
\def\use@pgfplotslibrary[#1]{\use@@pgfplotslibrary{#1}}
\def\use@@pgfplotslibrary#1{%
  \edef\pgf@list{#1}%
  \pgfutil@for\pgf@temp:=\pgf@list\do{%
    \expandafter\ifx\csname pgfp@library@\pgf@temp @loaded\endcsname\relax%
      \expandafter\global\expandafter\let\csname pgfp@library@\pgf@temp @loaded\endcsname=\pgfutil@empty%
      \expandafter\edef\csname tikz@library@#1@atcode\endcsname{\the\catcode`\@}
      \expandafter\edef\csname tikz@library@#1@barcode\endcsname{\the\catcode`\|}
      \catcode`\@=11
      \catcode`\|=12
      \pgfplots@iffileexists{tikzlibrarypgfplots.\pgf@temp.code.tex}{%
      \input tikzlibrarypgfplots.\pgf@temp.code.tex}{%
      \input pgflibrarypgfplots.\pgf@temp.code.tex}%
      \catcode`\@=\csname tikz@library@#1@atcode\endcsname
      \catcode`\|=\csname tikz@library@#1@barcode\endcsname
    \fi%
  }%
}


% Default loaded libraries:
% Currently none