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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{stys/beautybook-cover-en}[2024/07/01,v2.0]
\usepackage{anyfontsize} % 提供\fontsize{}{}\selectfont命令
\usepackage{etoolbox} %提供自定义封面选项接口
\usepackage[dvipsnames,svgnames,x11names,table]{xcolor}%颜色宏包 % Driver-independent color extensions
\usepackage{tikz}
\usepackage{graphicx} %插图
\usetikzlibrary{calc,fadings,patterns}
\usepackage{adjustbox} %修正minipage顶部对齐问题
\tikzfading[name=fade right,
right color =transparent!100,
left color=transparent!50]
\tikzfading[name=fade left,
left color =transparent!100,
right color=transparent!50]
\tikzfading[name=fade up,
top color =transparent!100, % 完全透明
bottom color=transparent!50] % 半透明
\tikzfading[name=fade down,
bottom color =transparent!100,
top color=transparent!50]
\makeatletter
\newcommand{\aivcover}{
\begin{tikzpicture}[remember picture,overlay]
\fill[coverfgcolor]
(current page.north west) rectangle (current page.south east);% 填充封面背景颜色 (coverbgcolor)
\coordinate (start) at ($(current page.east)!0.5!(current page.north east)+(1,-1)$);
\coordinate (end) at (current page.north west);
\foreach \i in {0,0.01,...,1}
{
\coordinate (point) at ($(start)!\i!(end)$);
\draw[coverfgcolor!50]
($(point)+(310*\i:6)$)--
($(point)+(310*\i+120:6)$)--
($(point)+(310*\i+240:6)$)--
($(point)+(310*\i:6)$);
}
\coordinate (start) at (current page.south west);
\coordinate (end) at (current page.east);
\foreach \i in {0,0.02,...,1}
{
\coordinate (point) at ($(start)!\i!(end)$);
\draw[coverfgcolor!50]
($(point)+(310*\i:10)$)--
($(point)+(310*\i+120:10)$)--
($(point)+(310*\i+240:10)$)--
($(point)+(310*\i:10)$);
}
\shade[bottom color=coverfgcolor,top color=coverfgcolor!70,opacity=0.7]
([xshift=.5\outermarginwidth]current page.north west) rectangle (current page.south east); % 背景大矩形
\shade[left color=coverfgcolor,right color=coverfgcolor!60,opacity=0.5]
([xshift=\outermarginwidth,yshift=2\outermarginwidth]current page.west) rectangle (current page.south east); % 标题背景大矩形
\fill[coverbar!90,opacity=0.8]
([yshift=2\outermarginwidth]current page.west) rectangle ([xshift=\outermarginwidth,yshift=-.2\outermarginwidth]current page.west); % 最左侧装饰矩形
\foreach \lx/\rx/\ry/\bc/\tc in {
1/1.5/1.75/70/80,1.5/2/1.6/65/75,2/2.5/1.3/60/70,2.5/3/1/55/65,3/3.5/.7/50/60,3.5/4/1.2/60/70,4/4.5/1.9/75/85,4.5/5/1.1/55/65,5/5.5/1.2/60/70,6/6.5/1.6/65/75,6.5/7/1.3/60/70,7/7.5/1.87/70/80,7.5/8/1/55/65,8/8.5/.9/50/60,8.5/9/1.8/70/80,9/9.5/1.6/65/75,9.5/10/1.4/60/70,10/10.5/1/55/65,10.5/11/.7/50/60,11/11.5/1.3/55/65,11.5/12/1/70/80,12/12.5/1.3/65/75,12.5/13/1.6/60/70,13/13.5/1.75/55/65,13.5/14/1.6/65/75,14/14.5/1.3/60/70
}{
\shade[bottom color=coverfgcolor!\bc,top color=coverfgcolor!\tc,opacity=.5]
([xshift=\lx\outermarginwidth]current page.north west) rectangle ([xshift=\rx\outermarginwidth,yshift=-\ry\covershift]current page.north west);%顶部琴键矩形
}
\node[anchor=south] at ([xshift=.3\outermarginwidth,yshift=-.4\covershift]current page.north) {%
\parbox{.8\paperwidth}{
\filright
\color{white}\sffamily\fontsize{20}{23}\selectfont\@bookseries}
}; %系列丛书名称
\node[ anchor=south,below right] (covertitles) at ([xshift=1.8\outermarginwidth-0.2cm,yshift=2.7cm]current page.west)
{\parbox{.8\paperwidth}{%
\raggedright%
{\renewcommand\baselinestretch{1.1}\selectfont \color{white}\sffamily\bfseries\fontsize{40}{40}\selectfont\@title\\[0.5ex]
\color{white}\sffamily\fontsize{30}{30}\selectfont
\ifdefvoid{\@subtitle}{}{\@subtitle}\par}
}};% 封面标题与副标题
\node[anchor=west,font=\sc\fontsize{23}{23}\selectfont,text=white] at ([shift={(-.4\paperwidth,-6cm)}]covertitles) {\@edition};
\node[anchor=west,font=\sffamily\Huge,text=white] at ([xshift=1.8\outermarginwidth-0.3cm,yshift=\covershift]current page.west) {\@author};
\node[left,text=white,font=\rmfamily\Large,] at
([shift={(-2cm,2cm)}]current page.south east) %
{\raisebox{-0.5cm}{\includegraphics[width=0.1\linewidth]{\@presslogo}}\hspace*{0ex}\begin{varwidth}{.4\textwidth}\tikz\draw[white,line width=1.25pt] (0,0)--++(0,1cm);\,\raisebox{.25cm}{\@pressname} \end{varwidth}};%
\end{tikzpicture}%
{\newpage\thispagestyle{empty}}
}
\newcommand{\lettercover}{
\begin{tikzpicture}[remember picture,overlay]
\fill[coverfgcolor]
(current page.north west) rectangle (current page.south east);% 填充封面背景颜色 (coverbgcolor)
\coordinate (start) at ($(current page.east)!0.5!(current page.north east)+(1,-1)$);
\coordinate (end) at (current page.north west);
\foreach \i in {0,0.01,...,1}
{
\coordinate (point) at ($(start)!\i!(end)$);
\draw[coverfgcolor!50]
($(point)+(310*\i:6)$)--
($(point)+(310*\i+120:6)$)--
($(point)+(310*\i+240:6)$)--
($(point)+(310*\i:6)$);
}
\coordinate (start) at (current page.south west);
\coordinate (end) at (current page.east);
\foreach \i in {0,0.02,...,1}
{
\coordinate (point) at ($(start)!\i!(end)$);
\draw[coverfgcolor!50]
($(point)+(310*\i:10)$)--
($(point)+(310*\i+120:10)$)--
($(point)+(310*\i+240:10)$)--
($(point)+(310*\i:10)$);
}
\shade[bottom color=coverfgcolor,top color=coverfgcolor!70,opacity=0.7]
([xshift=.5\outermarginwidth]current page.north west) rectangle (current page.south east); % 背景大矩形
\shade[left color=coverfgcolor,right color=coverfgcolor!60,opacity=0.5]
([xshift=\outermarginwidth,yshift=2\outermarginwidth]current page.west) rectangle (current page.south east); % 标题背景大矩形
\fill[coverbar!90,opacity=0.8]
([yshift=2\outermarginwidth]current page.west) rectangle ([xshift=\outermarginwidth,yshift=-.2\outermarginwidth]current page.west); % 最左侧装饰矩形
\foreach \lx/\rx/\ry/\bc/\tc in {
1/1.5/1.75/70/80,1.5/2/1.6/65/75,2/2.5/1.3/60/70,2.5/3/1/55/65,3/3.5/.7/50/60,3.5/4/1.2/60/70,4/4.5/1.9/75/85,4.5/5/1.1/55/65,5/5.5/1.2/60/70,6/6.5/1.6/65/75,6.5/7/1.3/60/70,7/7.5/1.87/70/80,7.5/8/1/55/65,8/8.5/.9/50/60,8.5/9/1.8/70/80,9/9.5/1.6/65/75,9.5/10/1.4/60/70,10/10.5/1/55/65,10.5/11/.7/50/60,11/11.5/1.3/55/65,11.5/12/1/70/80,12/12.5/1.3/65/75,12.5/13/1.6/60/70,13/13.5/1.75/55/65,13.5/14/1.6/65/75,14/14.5/1.3/60/70
}{
\shade[bottom color=coverfgcolor!\bc,top color=coverfgcolor!\tc,opacity=.5]
([xshift=\lx\outermarginwidth]current page.north west) rectangle ([xshift=\rx\outermarginwidth,yshift=-\ry\covershift]current page.north west);%顶部琴键矩形
}
\node[anchor=south] at ([xshift=.3\outermarginwidth,yshift=-.4\covershift]current page.north) {%
\parbox{.8\paperwidth}{
\filright
\color{white}\sffamily\fontsize{20}{23}\selectfont\@bookseries}
}; %系列丛书名称
\node[ anchor=south,below right] (covertitles) at ([xshift=1.8\outermarginwidth-0.2cm,yshift=2.7cm]current page.west)
{\parbox{.8\paperwidth}{%
\raggedright%
{\renewcommand\baselinestretch{1.1}\selectfont \color{white}\sffamily\bfseries\fontsize{40}{40}\selectfont\@title\\[0.5ex]
\color{white}\sffamily\fontsize{30}{30}\selectfont
\ifdefvoid{\@subtitle}{}{\@subtitle}\par}
}};% 封面标题与副标题
\node[anchor=west,font=\sc\fontsize{23}{23}\selectfont,text=white] at ([shift={(-.4\paperwidth,-6cm)}]covertitles) {\@edition};
\node[anchor=west,font=\sffamily\Huge,text=white] at ([xshift=1.8\outermarginwidth-0.3cm,yshift=\covershift]current page.west) {\@author};
\node[left,text=white,font=\rmfamily\Large,] at
([shift={(-2cm,2cm)}]current page.south east) %
{\raisebox{-0.5cm}{\includegraphics[width=0.1\linewidth]{\@presslogo}}\hspace*{0ex}\begin{varwidth}{.4\textwidth}\tikz\draw[white,line width=1.25pt] (0,0)--++(0,1cm);\,\raisebox{.25cm}{\@pressname} \end{varwidth}};%
\end{tikzpicture}%
{\newpage\thispagestyle{empty}}
}
\newcommand\makecover{
\thispagestyle{empty}
\ifaivpaper@TF{\aivcover}{\lettercover}
{\newpage\thispagestyle{empty}}
}
\makeatother
%%%%===============================================================%%%%%
%%------------------------------------------------------封面设计--------------------------------------------------------%%
\endinput
|