summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/tikzfill/tikzfill-common.sty
blob: 2adb2a7cea07c2cd114810cec908246f54910818 (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
%% The LaTeX package tikzfill - version 1.0.0 (2022/07/20)
%% tikzfill-common.sty: auxiliary code for library loading
%%
%% -------------------------------------------------------------------------------------------
%% Copyright (c) 2022-2022 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}[2022/07/20 v1.0.0 Auxiliary code for tikzfill]
\RequirePackage{tikz}

\ExplSyntaxOn

\cs_new_nopar:Npn \__tikzfill_usetikzlibrary:n #1
  {
    \cs_if_exist:NTF \tikzfillpkgprefix
      {
        \bool_set:Nn \l_tmpa_bool { \tl_if_blank_p:V \tikzfillpkgprefix }
      }
      {
        \bool_set_true:N \l_tmpa_bool
      }
    \bool_if:NTF \l_tmpa_bool
      {
        \usetikzlibrary{ #1 }
      }
      {
        \cs_if_exist:NF \l__tikzfill_library_seq
        {
          \seq_new:N \l__tikzfill_library_seq
        }
        \seq_set_from_clist:Nn \l__tikzfill_library_seq { #1 }
        \seq_map_inline:Nn \l__tikzfill_library_seq
          {
            \cs_if_exist:cF { tikz@library@ ##1 @loaded }
              {
                \cs_gset:cpn { tikz@library@ ##1 @loaded }{}
                \input{ \tikzfillpkgprefix tikzlibrary ##1 .code.tex}
              }
          }
      }
  }

\ExplSyntaxOff