-
Notifications
You must be signed in to change notification settings - Fork 0
/
macros.tex
143 lines (126 loc) · 3.25 KB
/
macros.tex
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
%%%% header
% \pagestyle{fancy}
% \lhead { % left header
% \textbf{\footnotesize \'Ecole normale supérieure}
% \newline
% \footnotesize Préparation à l'agrégation de physique-chimie option physique
% }
% \chead{ % central header
% }
% \rhead{ % right header
% \hfill \textbf{\footnotesize Compte-rendu de leçon de chimie}
% \newline \hfill
% \footnotesize 2021-2022
% }
% \renewcommand{\headrulewidth}{0.4pt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% blocks for higlight
\newenvironment{highlightBlock}[1]{%
\begin{tcolorbox}
[
breakable, enhanced jigsaw, % to break box over page
arc = 4mm, % curvature
title = \textbf{#1}, % title
coltitle = white, % title font color
colbacktitle = Prune, % light-gray title
colback = white, % white background
colframe = Prune % dark frame
]
}
{
\end{tcolorbox}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% ball of colour with text
\newcommand\ballText[2]{%
\shorthandoff{;}
\tikz \node[fill, circle, color=#2,
inner sep=0pt, text width=20pt,
font=\footnotesize, align=center]
{\textbf{\color{white} #1}};
\shorthandon{;}
}
\newcommand\cyanBallText[1]{\ballText{#1}{Prune}}
%%%% rectangle of colour with text
\newcommand\rectText[3]{%
\begin{tcolorbox}
[
arc = 1mm, % curvature
colback = #3, % box color
colframe = #3, % box color,
width = 48pt,
height = 18pt,
%bean arc,
halign = center,
valign = center,
after
]
\textcolor {#2} {\textbf{#1}}
\end{tcolorbox}
}
\newcommand\cyanRectText[1]{\rectText{#1}{white}{Prune}}
%%%% rectangle of colour
\newcommand\rect[3]{%
\shorthandoff{;}
\tikz \node (rect) [draw, fill, color=#1,
minimum width=#2,
minimum height=#3] {};
\shorthandon{;}
}
\newcommand\cyanRect[2]{\rect{Prune}{#1}{#2}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% cv entry
\newcommand{\cvEntry}[2]{
\noindent
\rect{#1}{80pt}{2pt}
\textcolor{#1} {
\textsc {\textbf {#2}}
}
}
%%%% paragraph
\newcommand{\sectionPara}[2]{
\vspace{10pt}
\noindent
\rect{#1}{50pt}{2pt}
\textbf {#2}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% For aligned enumeration (cv entry)
\newenvironment{alignedColumn}{%
\begin{longtable} { l p{0.8\textwidth} }
}
{
\end{longtable}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Section
\newcommand{\boxSection}[1]{%
\refstepcounter{section}
% number and text
\cyanRectText{
\textbf {\large \arabic{section}}
}
\vspace{-18pt}
\hspace{-16pt}
\textbf{\Large \phantom{right} #1}
% subsection counter update
\setcounter{subsection}{0}
\addcontentsline{toc}{section}{\protect\numberline{} #1}
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Background image
%%%% (1,2): position ;
%%%% 3: width ;
%%%% 4: image_name ;
%%%% 5: caption ;
\newcommand{\backgroundImage}[5]{%
\begin{tikzpicture}[remember picture, overlay]
\node[anchor = north west, inner sep = 0pt] (image)
at ($ (current page.north west) + (#1 mm, -#2 mm) $) {
\includegraphics[width=#3] {#4}
};
\node[text width=#3, align = center, below = of image] {
#5
};
\end{tikzpicture}
}