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
|
\whatsnote_provide_module:n { cover }
\keys_define:nn { whats / coverset }
{
title .tl_set:N = \l__whatsnote_cover_title_tl,
subtitle .tl_set:N = \l__whatsnote_cover_subtitle_tl,
bioinfo .tl_set:N = \l__whatsnote_cover_bioinfo_tl,
color .tl_set:N = \l__whatsnote_cover_color_tl,
color .initial:n = gray,
head .tl_set:N = \l__whatsnote_cover_head_tl,
logo .tl_set:N = \l__whatsnote_cover_logo_tl,
}
\NewDocumentCommand \coverset { m }
{
\keys_set:nn { whats / coverset } {#1}
\exp_args:NNne
\seq_set_split:Nnn \l__whatsnote_cover_head_seq {/}
{ \l__whatsnote_cover_head_tl }
\exp_args:NNne
\seq_set_split:Nnn \l__whatsnote_cover_logo_seq {/}
{ \l__whatsnote_cover_logo_tl }
}
\RequirePackage{ graphicx, geometry, circuitikz, pagecolor }
\geometry{ margin = 1in }
\graphicspath
{
{./figure/} {./figures/} {./image/} {./images/}
{./graphics/} {./graphic/} {./pictures/} {./picture/}
}
\ExplSyntaxOff
\usetikzlibrary{ fadings, patterns, arrows, decorations.markings }
\tikzset
{
> = stealth',
every picture/.append style =
{ line join = round, line cap = round, thick }
}
\ExplSyntaxOn
\cs_new_protected_nopar:Npn \whatsnote_maketitle:
{
\newpagecolor{\l__whatsnote_cover_color_tl!10}
\begin{titlepage}
\begin{tikzpicture}[ remember~picture, overlay ]
\fill [ white, opacity = .5 ] (current~page.south~east) rectangle +
(-.8\paperwidth, .6\paperheight);
\fill [ white, opacity = .5 ] (current~page.south~east) rectangle +
(-.7\paperwidth, .7\paperheight);
\node
[ shift = {(-.35*\paperwidth,.65*\paperheight)},
darkgray, font = \Huge\bfseries\sffamily
] at (current~page.south~east) { \l__whatsnote_cover_title_tl };
\node
[ shift = {(-.75*\paperwidth,.3*\paperheight)},
rotate = 90, gray, opacity = .6, font = \huge\bfseries\sffamily
] at (current~page.south~east) { \l__whatsnote_cover_subtitle_tl };
\node
[ shift = {(.15*\paperwidth,.075*\paperheight)},
gray, opacity = .4, font = \large
] at (current~page.south) { \l__whatsnote_cover_bioinfo_tl };
\tl_if_empty:NF { \l__whatsnote_cover_head_tl }
{
\node
[ rotate~around =
{
\seq_item:Nn \l__whatsnote_cover_head_seq {2} \c_colon_str
([yshift = .35*\paperheight]current~page.center)
},
yshift = .35*\paperheight
] at (current~page.center)
{
\includegraphics[ width = \paperwidth ]
{ \seq_item:Nn \l__whatsnote_cover_head_seq {1} }
};
}
\tl_if_empty:NF { \l__whatsnote_cover_logo_tl }
{
\node (cover~logo)
[ shift = {(.65*\paperwidth,.3*\paperheight)}]
at (current~page.south~west)
{
\includegraphics[ height=.3\paperheight ]
{ \seq_item:Nn \l__whatsnote_cover_logo_seq {1} }
};
\fill
[ pattern = \seq_item:Nn \l__whatsnote_cover_logo_seq {2},
pattern~color = \l__whatsnote_cover_color_tl!15!white!25,
scope~fading = south
] (cover~logo.south~west) rectangle (cover~logo.north~east);
}
\end{tikzpicture}
\end{titlepage}
\thispagestyle{empty}
\cleardoublepage
\restorepagecolor
}
\RenewDocumentCommand \maketitle { }
{
\group_begin:
\whatsnote_maketitle:
\group_end:
}
\endinput
|