summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/projlib/projlib-logo.sty
blob: 2aec50e7db3cd74729d321a55dbf4f15e8516d2b (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
98
99
100
101
102
%%
%% This is file `projlib-logo.sty',
%% generated with the docstrip utility.

%% Copyright (C) 2021-2022 by Jinwen XU
%% 
%% This is part of the ProjLib Toolkit.
%% 
%% This work may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%% 
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\RequirePackage{l3keys2e}
\ProvidesExplPackage
  {projlib-logo}
  {2022/03/17} {}
  {The ProjLib logo}

\keys_define:nn { projlib-logo }
  {
    , draft   .bool_set:N   = \l__projlib_logo_fast_bool
    , draft   .initial:n    = { false }
    , fast    .bool_set:N   = \l__projlib_logo_fast_bool
    , unknown .code:n       = {}
  }
\ProcessKeysOptions { projlib-logo }

\bool_if:NT \l__projlib_logo_fast_bool
  {
    \DeclareRobustCommand * \ProjLib
      {
        \group_begin:
          \normalfont ProjLib
        \group_end:
      }
    \endinput
  }

\cs_if_exist:cTF { fontspec }
  {
    \newfontface \__projlib_logo_font: { LinBiolinum_R.otf }
  }
  {
    \RequirePackage [T1] { fontenc }
    \cs_gset:Nn \__projlib_logo_font:
      { \fontfamily { LinuxBiolinumT-TLF } \selectfont }
  }

\tl_new:N   \g__projlib_logo_sigma_j_tl
\tl_gset:Nn \g__projlib_logo_sigma_j_tl
  {
    \vbox:n
      {
        \offinterlineskip
        \hbox_overlap_center:n
          {
            \skip_horizontal:n { 0.75ex }
            \hbox_set:Nn    \l_tmpa_box { \usefont{U}{zeur}{b}{n} \symbol{"06} }
            \box_rotate:Nn  \l_tmpa_box { -10 }
            \box_scale:Nnn  \l_tmpa_box {.4} {.4}
            \box_use:N      \l_tmpa_box
          }
        \skip_vertical:n { 0.15ex }
        \hbox:n { \j }
      }
  }

\cs_new_protected:Nn \projlib_logo_generic:n
  {
    \group_begin:
      \normalfont
      \__projlib_logo_font:
      \color_group_begin:
        \color_select:n { blue!60!cyan }      { P }
        \color_select:n { blue!45!cyan }      { r }
        \color_select:n { blue!30!cyan }      { o }
        \color_select:n { green!70!black!70 } { #1 }
        \color_select:n { red!20!yellow }     { L }
        \color_select:n { red!40!yellow }     { i }
        \color_select:n { red!60!yellow }     { b }
      \color_group_end:
    \group_end:
  }

\DeclareRobustCommand * \ProjLib
  {
    \projlib_logo_generic:n { \g__projlib_logo_sigma_j_tl }
  }
\DeclareRobustCommand * \ProjLibText
  {
    \projlib_logo_generic:n { j }
  }

\endinput
%%
%% End of file `projlib-logo.sty'.