summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg
blob: b38065c52ae3ae4f7368ab82bc1550116297c238 (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
103
104
105
106
%%
%% This is file `eb-tcolorbox.cfg',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% easybook.dtx  (with options: `tcolorbox')
%% Copyright (C) 2021-2022 by Qu Yi <q1jx@foxmail.com>
%% 
%% 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.3 or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
%% 
%% This work has the LPPL maintenance status `maintained'.
\ProvidesExplFile{eb-tcolorbox.cfg}{2022/02/16}{1.629}
  {Customization of tcolorbox for easybook}

\cs_set_protected:Npn \addtotcbstyle #1#2
  { \tcbset{#1/.append~style = {#2}} }
\cs_set_protected:Npn \deftcbstyle #1#2
  { \tcbset{#1/.style = {#2}} }
\cs_new_protected:Npn \tcbappstyle
  { \@ifstar{\deftcbstyle}{\addtotcbstyle} }
\cs_set_eq:NN \newtcbstyle \deftcbstyle

\deftcbstyle{tc-easybox}
  {
    enhanced~jigsaw,
    center~title,
    left = 8pt,right = 8pt,
    coltitle = black,colframe = black,
    top = 0.5\baselineskip,bottom = 0.5\baselineskip,
    middle = 0.5\baselineskip,
    toptitle = 0.5\baselineskip,
    titlerule = 0pt,
    beforeafter~skip = 0.5\baselineskip
  }
\deftcbstyle{tc-ebparbox}
  {
    enhanced~jigsaw,
    frame~hidden,boxrule = 0pt,
    left = 10pt,
    middle = 0.5\baselineskip,bottomtitle = 0.5\baselineskip,
    beforeafter~skip = 0.5\baselineskip
  }
\deftcbstyle{tc-ebemph}{on~line,blank}
\deftcbstyle{tc-ebfbox}
  {
    standard~jigsaw,on~line,
    top = 3pt,bottom = 3pt,left = 3pt,right = 3pt,
    boxrule = 0.4pt,opacityback = 0.2
  }
\tcbset
  {
    breakable,
    pad~at~break* = 0.5\baselineskip,
    sharpish~corners,
    fonttitle     = \sffamily,
    colframe      = black,
    boxsep        = 0pt,
    boxrule       = 0.5pt
  }

\DeclareTColorBox{easybox}{sO{LemonChiffon}d()O{}}
  {
    IfBooleanF = {#1}{frame~hidden,boxrule = 0pt},
    IfValueT = {#3}{title = #3},
    colback = #2,colbacktitle = #2,
    tc-easybox,#4
  }
\DeclareTColorBox{ebparbox}{sO{RoyalBlue}d()O{}}
  {
    borderline~west = {3pt}{0pt}{#2},
    IfBooleanTF = {#1}
      {
        colback = #2,colbacktitle = #2,
        opacityback = 0.2,opacitybacktitle = 0.2,
        IfValueTF = {#3}{title = #3,top = 0pt}{top = 0.5\baselineskip},
        bottom = 0.5\baselineskip,toptitle = 0.5\baselineskip,
        right = 8pt
      }{
        colback   = white,
        IfValueT  = {#3}{title = #3},
        top = 0pt,bottom = 0pt,right = 0pt
      },
    coltitle = #2,tc-ebparbox,#4
  }
\DeclareTotalTCBox{\ebfbox}{O{Green}mO{}}
  {
    colback = #1,colframe = #1,
    tc-ebfbox,#3
  }{#2}
\DeclareTotalTCBox{\ebemph}{O{Yellow}mO{}}
  {
    fuzzy~halo = 2pt~with~#1,
    tc-ebemph,#3
  }{#2}
\endinput
%%
%% End of file `eb-tcolorbox.cfg'.