summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/tikzfill/tikzfill-common.sty
blob: b381e2164a5840346fa4af3845e8b802894fa4db (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
%% The LaTeX package tikzfill - version 1.0.1 (2023/08/08)
%% tikzfill-common.sty: auxiliary code for library loading
%%
%% -------------------------------------------------------------------------------------------
%% Copyright (c) 2022-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `author-maintained'.
%%
%% This work consists of all files listed in README.md
%%
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\ProvidesPackage{tikzfill-common}[2023/08/08 v1.0.1 Auxiliary code for tikzfill]
\RequirePackage{tikz}

% adapted copy of \use@@tikzlibrary from tikz.code.tex
\def\tikzfill@use@@tikzlibrary#1{%
  \edef\pgf@list{#1}%
  \pgfutil@for\pgf@temp:=\pgf@list\do{%
    \expandafter\pgfkeys@spdef\expandafter\pgf@temp\expandafter{\pgf@temp}%
    \ifx\pgf@temp\pgfutil@empty
    \else
      \expandafter\ifx\csname tikz@library@\pgf@temp @loaded\endcsname\relax%
      \expandafter\global\expandafter\let\csname tikz@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`\|}
      \expandafter\edef\csname tikz@library@#1@dollarcode\endcsname{\the\catcode`\$}
      \catcode`\@=11
      \catcode`\|=12
      \catcode`\$=3
      \pgfutil@InputIfFileExists{\tikzfillpkgprefix tikzlibrary\pgf@temp.code.tex}{}{
        \pgfutil@IfFileExists{\tikzfillpkgprefix pgflibrary\pgf@temp.code.tex}{%
          \expandafter\usepgflibrary\expandafter{\pgf@temp}%
        }{%
          \tikzerror{I did not find the tikz library
            '\pgf@temp'. I looked for files named
            \tikzfillpkgprefix tikzlibrary\pgf@temp.code.tex and
            \tikzfillpkgprefix pgflibrary\pgf@temp.code.tex, but neither
            could be found in the current texmf trees.}
        }}%
      \catcode`\@=\csname tikz@library@#1@atcode\endcsname
      \catcode`\|=\csname tikz@library@#1@barcode\endcsname
      \catcode`\$=\csname tikz@library@#1@dollarcode\endcsname
      \fi%
    \fi%
  }%
}