-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTechCheck.cls
652 lines (582 loc) · 19 KB
/
TechCheck.cls
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
%=================================================================
% MIT LICENSE
%=================================================================
% Copyright (c) 2023 Techneatium
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the "Software"), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
%
% The above copyright notice and this permission notice shall be included in all
% copies or substantial portions of the Software.
%
% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
% SOFTWARE.
%=================================================================
\NeedsTeXFormat{LaTeX2e}
\LoadClass[10pt,usenames,dvipsnames,twoside]{book}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{TechCheck}[2023/01/14]
%-----------------------------------------------------------------
% GENERAL PACKAGES
%-----------------------------------------------------------------
\RequirePackage{geometry}
\RequirePackage[]{datetime2} % change date format
\DTMnewstyle{yymmdd}{ % create new date style
\renewcommand*\DTMdisplaydate[4]{%
\DTMtwodigits{##1}\DTMtwodigits{##2}\DTMtwodigits{##3}%
}
\renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}%
}{}{}{}
\DTMsetstyle{yymmdd} % set new style as default
\RequirePackage[shortlabels]{enumitem} % pause/resume lists
\RequirePackage{multicol} % multi column format
\RequirePackage{graphicx} % used for figures
\graphicspath{{images/}} % put figures inside folder 'images' in same folder as .tex
\RequirePackage{subcaption} % used for subfigures
\RequirePackage[dvipsnames]{xcolor} %colors, dvips -> extra premade colors
\RequirePackage[explicit]{titlesec} % formating of titles
\RequirePackage{siunitx} % SI units
\RequirePackage{tikz} % shapes, figures
\RequirePackage{tikzpagenodes} % points for tikz
\usetikzlibrary{calc} % used for hyperlinked nodes
\RequirePackage[hidelinks]{hyperref} % used for hyperlinked nodes
\RequirePackage{cleveref} % better referencing
\RequirePackage[document]{ragged2e} % left ragged text
% \RequirePackage{atbegshi} % special commands that apply tikz to all pages
\RequirePackage{fancyhdr} % custom header/footer
\RequirePackage{etoolbox} % Boolean and if/else
\RequirePackage{calc} % math inside other commands
\RequirePackage{booktabs} % fancy tables
\RequirePackage{multirow} % more fancy tables
\RequirePackage{longtable} % multi page tables
\RequirePackage{tocloft} % TOC formatting
\RequirePackage{minitoc} % chapter tocs
\RequirePackage[auto]{chappg}
\RequirePackage{tcolorbox} % for rounded boxes
\tcbuselibrary{skins, breakable}
\RequirePackage{luatex85} % required to make changebar work with lualatex
\RequirePackage[pdftex, color, outerbars]{changebar} % what it says
\RequirePackage{xkeyval} % allows defining keys for macros
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% O P T I O N S S T A R T
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-----------------------------------------------------------------
% FONT OPTIONS
%-----------------------------------------------------------------
% Declare toggles for each font option
\newtoggle{fontHelvet}
\newtoggle{loadfontspec}
\newtoggle{fontJost}
\newtoggle{fontSpartan}
\newtoggle{fontMetropolis}
\newtoggle{fontInter}
% Default pdflatex helvetica clone
\DeclareOption{fontHelvet}{
\toggletrue{fontHelvet}
}
% Futura Clone -- pointy
\DeclareOption{fontJost}{
\toggletrue{loadfontspec}
\toggletrue{fontJost}
% toggle other fonts false
\togglefalse{fontSpartan}
\togglefalse{fontMetropolis}
\togglefalse{fontInter}
}
% Futura DemiBold Clone
\DeclareOption{fontSpartan}{
\toggletrue{loadfontspec}
\toggletrue{fontSpartan}
% toggle other fonts false
\togglefalse{fontJost}
\togglefalse{fontMetropolis}
\togglefalse{fontInter}
}
% Gotham Clone
\DeclareOption{fontMetropolis}{
\toggletrue{loadfontspec}
\toggletrue{fontMetropolis}
% toggle other fonts false
\togglefalse{fontJost}
\togglefalse{fontSpartan}
\togglefalse{fontInter}
}
% Helvetica clone
\DeclareOption{fontInter}{
\toggletrue{loadfontspec}
\toggletrue{fontInter}
% toggle other fonts false
\togglefalse{fontJost}
\togglefalse{fontSpartan}
\togglefalse{fontMetropolis}
}
%-----------------------------------------------------------------
% GEOMETRY OPTIONS
%-----------------------------------------------------------------
% if print will add corner rounding and tabs
\newtoggle{print}
% Basic paper geometry
\newlength{\TC@paperh}
\newlength{\TC@paperw}
% margins, input here as variable for ROUNDING
\newlength{\TC@inmar}
\newlength{\TC@outmar}
\newlength{\TC@topmar}
\newlength{\TC@botmar}
\newlength{\TC@footmar}
\setlength\TC@topmar{1.2cm}
\setlength\TC@botmar{0.8cm}
\setlength\TC@footmar{0.5cm}
% indendtation for chevrons on front page
\newlength{\TC@chevin}
% tab dimensions
\newlength{\TC@tabwidth}
\newlength{\TC@tabdepth}
% Number of sections
\newcounter{tabnumber}
\setcounter{tabnumber}{6}
% determines width of tab based on number of tabs
\setlength\TC@tabwidth{\textheight/\thetabnumber}
% Nominal A5 paper size -- 210x148mm
\DeclareOption{a5}{
\setlength\TC@paperh{210mm}
\setlength\TC@paperw{148mm}
\setlength\TC@inmar{10mm}
\setlength\TC@outmar{10mm}
\setlength{\TC@chevin}{\TC@outmar-33mm}
\setlength\TC@tabdepth{8mm}
\togglefalse{print}
}
% A5 paper with 8mm extra for tabs -- 210x(148+8)mm
\DeclareOption{a5print}{
\setlength\TC@paperh{210mm}
\setlength\TC@paperw{156mm}
\setlength\TC@inmar{16mm}
\setlength\TC@outmar{12mm}
\setlength\TC@chevin{\TC@outmar-35mm}
\setlength\TC@tabdepth{8mm}
\toggletrue{print}
}
% A5 paper with 9.5mm extra for 4x3 aspect -- 210x(148+9.5)mm
\DeclareOption{4x3print}{
\setlength\TC@paperh{210mm}
\setlength\TC@paperw{157.5mm}
\setlength\TC@inmar{16mm}
\setlength\TC@outmar{13.5mm}
\setlength\TC@chevin{\TC@outmar-36.5mm}
\setlength\TC@tabdepth{9.5mm}
\toggletrue{print}
}
% Nominal A4 paper size -- 297x210mm
\DeclareOption{a4}{
\setlength\TC@paperh{297mm}
\setlength\TC@paperw{210mm}
\setlength\TC@inmar{14mm}
\setlength\TC@outmar{14mm}
\setlength{\TC@chevin}{\TC@outmar-31mm}
\setlength\TC@tabdepth{8mm}
\togglefalse{print}
}
% A4 paper with offset margins for printing -- 297x210mm
\DeclareOption{a4print}{
\setlength\TC@paperh{297mm}
\setlength\TC@paperw{210mm}
\setlength\TC@inmar{16mm}
\setlength\TC@outmar{12mm}
\setlength{\TC@chevin}{\TC@outmar-29mm}
\setlength\TC@tabdepth{8mm}
\toggletrue{print}
}
%-----------------------------------------------------------------
% COLOR OPTIONS
%-----------------------------------------------------------------
% color1 - main color
% color2 - highlight color
% color3 - alternate highlight color
\DeclareOption{colorful}{
\colorlet{color1}{black}
% \definecolor{color1}{HTML}{222222}
\colorlet{color2}{NavyBlue}
\colorlet{color3}{NavyBlue}
\definecolor{color4}{HTML}{FFE534} % bf2042yellow
}
\DeclareOption{b/w}{
\colorlet{color1}{black}
\colorlet{color2}{black}
\colorlet{color3}{black}
\definecolor{color4}{HTML}{FFE534} % bf2042yellow
}
%-----------------------------------------------------------------
% TECHHATCHTABS OPTIONS
%-----------------------------------------------------------------
\DeclareOption{squaretabs}{
\PassOptionsToPackage{squaretabs}{techhatchtabs}
}
% turns off thumbtab indentation (for cutting out)
\DeclareOption{nothumbtabindent}{
\PassOptionsToPackage{thumbtabindent=false}{techhatchtabs}
}
% turns off thumbnar 'indentation' by tabwidth
\DeclareOption{nothumbnarindent}{
\PassOptionsToPackage{thumbnarindent=false}{techhatchtabs}
}
% turns off automatic thumbnar'ing
\DeclareOption{manthumbnar}{
\PassOptionsToPackage{autothumbnar=false}{techhatchtabs}
}
% turns off automatic generation of thumbback node on page
% after thumbtab
\DeclareOption{manthumbback}{
\PassOptionsToPackage{autothumbback=false}{techhatchtabs}
}
% deactivates all page rounding and indentation
\DeclareOption{noround}{
\PassOptionsToPackage{round=false}{techhatchtabs}
}
% deactivates all hatching
\DeclareOption{nohatch}{
\PassOptionsToPackage{hatch=false}{techhatchtabs}
}
%-----------------------------------------------------------------
% DEV OPTIONS
%-----------------------------------------------------------------
% Geometry showframe
\DeclareOption{showframe}{
\PassOptionsToPackage{showframe}{geometry}
}
%-----------------------------------------------------------------
% PROCESS OPTIONS
%-----------------------------------------------------------------
\ExecuteOptions{fontSpartan, a5print, colorful}
\ProcessOptions*\relax
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% GLOBAL FORMATTING
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-----------------------------------------------------------------
% APPLY PAGE GEOMETRY
%-----------------------------------------------------------------
\geometry{
paperheight=\TC@paperh,
paperwidth=\TC@paperw,
margin=1mm,
top=\TC@topmar,
bottom=\TC@botmar,
headsep=5mm,
headheight=5mm,
footskip=\TC@footmar,
inner=\TC@inmar,
outer=\TC@outmar,
centering
}
%-----------------------------------------------------------------
% CUSTOM PACKAGES
%-----------------------------------------------------------------
\iftoggle{print}{
% if true no action necessary, defaults to printable behavior
}{
% if false turns of rounding completely
% leaves 'autothumbback' on!
\PassOptionsToPackage{
round=false,
}{techhatchtabs}
}
\RequirePackage[
top=\TC@topmar,
bottom=\TC@botmar,
inner=\TC@inmar,
outer=\TC@outmar,
tabwidth=\TC@tabwidth,
tabdepth=\TC@tabdepth,
chevin=\TC@chevin,
]{techhatchtabs} % custom page hatching
\RequirePackage{technumitem} % custom enumitem like environments
%-----------------------------------------------------------------
% OPTIONAL PACKAGES
%-----------------------------------------------------------------
\iftoggle{fontHelvet}{
\RequirePackage[T1]{fontenc}
\RequirePackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
}{}
\iftoggle{loadfontspec}{
\RequirePackage{fontspec}
}{}
\iftoggle{fontJost}{
\setmainfont[
Path=./fonts/,
Ligatures=TeX,
UprightFont=*-Regular,
ItalicFont=*-Italic,
BoldFont=*-Bold,
BoldFeatures={LetterSpace=2.5}
]{Jost}
\newfontfamily\tightfont{Jost-Bold}[Path=./fonts/, Ligatures=TeX, BoldFeatures={LetterSpace=0.0}] % used for `---` in page numbering
\newfontfamily\titlefont{Jost-Bold}[Path=./fonts/, Ligatures=TeX, LetterSpace=4.0]
}{}
\iftoggle{fontSpartan}{
\setmainfont[
Path=./fonts/,
Ligatures=TeX,
UprightFont=*-Medium,
LetterSpace=2.0,
ItalicFont=*-Medium Italic,
ItalicFeatures={Scale=1.0},
BoldFont=*-Bold,
BoldFeatures={LetterSpace=5.0},
]{Spartan MB}
\newfontfamily\tightfont{Spartan MB-Bold}[Path=./fonts/, Ligatures=TeX, BoldFeatures={LetterSpace=0.0}] % used for `---` in page numbering
\newfontfamily\titlefont{Spartan MB-Bold}[Path=./fonts/, Ligatures=TeX, LetterSpace=4.0]
}{}
\iftoggle{fontMetropolis}{
\setmainfont[
Path=./fonts/,
Ligatures=TeX,
UprightFont=*-Regular,
ItalicFont=*-Regular Italic,
BoldFont=*-Semi Bold,
BoldFeatures={LetterSpace=3.0},
]{Metropolis}
\newfontfamily\tightfont{Metropolis-Bold}[Path=./fonts/, Ligatures=TeX, BoldFeatures={LetterSpace=0.0}] % used for `---` in page numbering
\newfontfamily\titlefont{Metropolis-Bold}[Path=./fonts/, Ligatures=TeX, LetterSpace=4.0]
}{}
\iftoggle{fontInter}{
\setmainfont[
Path=./fonts/,
Ligatures=TeX,
UprightFont=*-Regular,
BoldFont=*-Bold,
ItalicFont=Jost-Italic,
]{Inter}
\newfontfamily\tightfont{Spartan MB-Bold}[Path=./fonts/, Ligatures=TeX, BoldFeatures={LetterSpace=0.0}] % used for `---` in page numbering
\newfontfamily\titlefont{Spartan MB-Bold}[Path=./fonts/, Ligatures=TeX, LetterSpace=4.0]
}{}
%-----------------------------------------------------------------
% GLOBAL PARAMETER COMMANDS
%-----------------------------------------------------------------
% Set label for title page
\newcommand*\aircraftlong{FULL A/C NAME}
\newcommand*{\setaircraftlong}[1]{\renewcommand*\aircraftlong{#1}}
% Set label for header
\newcommand*\aircraftshort{F-XX}
\newcommand*{\setaircraftshort}[1]{\renewcommand*\aircraftshort{#1}}
% Set number of tabs in preable
\newcommand{\settabnumber}[1]{
\setcounter{tabnumber}{#1}
\setlength\TC@tabwidth{\textheight/\thetabnumber}
}
%-----------------------------------------------------------------
% HEADER/FOOT FORMATTING
%-----------------------------------------------------------------
% remove header and foot
\pagestyle{empty}
% fancy header with section title in hatching
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ -- #1}{}}
\fancypagestyle{superempty}{
% clear defaults
\fancyhf{}
\fancyhead[LE,LO]{
\hatch
}
}
\fancypagestyle{empty}{
% clear defaults
\fancyhf{}
% page number in footer
\fancyfoot[LE, RO]{{\tightfont\quad\textbf{\thepage}\quad}}% LE,RO or C
% Version nbumber in footer
\fancyfoot[RE, LO]{{\titlefont\textbf{REV: \today}}}
% Aircraft name in footer
\fancyfoot[C]{{\titlefont\textbf{\aircraftshort}}}
\fancyhead[LE,LO]{
\hatch
}
\fancyhead[RO]{
\thumbnar
}
}
\fancypagestyle{plain}{
% clear defaults
\fancyhf{}
% page number in footer
\fancyfoot[LE, RO]{{\tightfont\quad\textbf{\thepage}\quad}}% LE,RO or C
% Version nbumber in footer
\fancyfoot[RE, LO]{{\titlefont\textbf{REV: \today}}}
% Aircraft name in footer
\fancyfoot[C]{{\titlefont\textbf{\aircraftshort}}}
\fancyhead[LE,LO]{
\hatch
}
}
\fancypagestyle{body}{
% clear defaults
\fancyhf{}
% page number in footer
\fancyfoot[LE, RO]{{\tightfont\quad\textbf{\thepage}\quad}}% LE,RO or C
% Version nbumber in footer
\fancyfoot[RE, LO]{{\titlefont\textbf{REV: \today}}}
% Aircraft name in footer
\fancyfoot[C]{{\titlefont\textbf{\aircraftshort}}}
% Header
\fancyhead[RO]{
\colorbox{color1}{
\textcolor{white}{\titlefont\Large\textbf{\rightmark}}
}
\thumbnar
}
\fancyhead[RE]{
\colorbox{color1}{
\textcolor{white}{\titlefont\Large\textbf{\rightmark}}
}
}
\fancyhead[LE,LO]{
\hatch
\colorbox{color1}{
\textcolor{white}{\titlefont\Large\textbf{\leftmark}}
}
}
\renewcommand{\headrulewidth}{0pt} % header rule width
\renewcommand{\footrulewidth}{0pt} % footer rule width
}
\pagestyle{body}
%-----------------------------------------------------------------
% ENUMITEM FORMATTING
%-----------------------------------------------------------------
% spacing within lists
\setlist[enumerate, 1]{itemsep=1pt, parsep=0pt, label=(\alph*)}
\setlist[enumerate, 2]{itemsep=1pt, parsep=0pt}
\setlist[itemize, 1]{itemsep=1pt, parsep=0pt, label=\textbf{\textbullet}}
\setlist[itemize, 2]{itemsep=1pt, parsep=0pt}
%-----------------------------------------------------------------
% OTHER FORMATTING
%-----------------------------------------------------------------
% indent for paragraph
\setlength{\parindent}{0pt}
% space between paragraphs
\setlength{\parskip}{0.3em}
% space between columns
\setlength{\columnsep}{2mm}
% create lines between columns and define color of columns
\setlength{\columnseprule}{0pt} %set thickness default 1pt
\def\columnseprulecolor{\color{color1}}
%-----------------------------------------------------------------
% CHANGEBAR SETTINGS
%-----------------------------------------------------------------
\cbcolor{color1}
\setlength{\changebarwidth}{2mm}
\setlength{\changebarsep}{2mm}
%-----------------------------------------------------------------
% TOCLOFT FORMATTING
%-----------------------------------------------------------------
% change distance between section number and title
% default: 1.55em
\tocloftpagestyle{empty}
%-----------------------------------------------------------------
% MINITOC FORMATTING
%-----------------------------------------------------------------
\mtcsetfont{minitoc}{section}{\normalfont\small}
\mtcsetrules{minitoc}{off}
%-----------------------------------------------------------------
% TITLE FORMATTING
%-----------------------------------------------------------------
% \titleformat{<command>}[<shape>]{<format>}{<label>}{<sep>}{<before-code>}[<after-code>]
% formatting of chapter
\titleformat{\chapter}[display] % command
{\titlefont\huge\bfseries} % format
{\chaptertitlename\ \thechapter} % label
{20pt} % sep
{\hatch\Huge #1} % before-code
[] % after code
% formatting of section
\titleformat{\section} % command
{\color{color1}\titlefont\large\bfseries} % format
{\color{color1}\thesection} % label
{1em} % sep
{#1} % before-code
[{\titlerule[2pt]}] % after-code
% formatting of subsection [full width]
\titleformat{\subsection} % command
{\normalfont\bfseries} % format
{\color{color1}} % label
{0em} % sep
{\colorbox{black}{\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\textcolor{white}{\titlefont\thesubsection\quad#1}}}} % before-code
\titleformat{name=\subsection,numberless} % command
{\normalfont\bfseries} % format
{\color{color1}} % label
{0em} % sep
{\colorbox{black}{\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\textcolor{white}{#1}}}} % before-code
% 1st number is weird, 2nd is spacing before, 3rd is spacing after subsection title
\titlespacing*{\chapter}{0pt}{50pt}{40pt}
\titlespacing{\section}{0pt}{5pt}{2pt}
\titlespacing{\subsection}{0pt}{2pt}{2pt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CUSTOM COMMANDS / ENVIRONEMNTS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-----------------------------------------------------------------
% CUSTOM COMMANDS
%-----------------------------------------------------------------
% command to create blue, bold mini-titles
\newcommand{\blue}[1]{
\textbf{\textcolor{color2}{#1}}
}
% command to create bold, white-on-blue, mini titles
\newcommand{\dblue}[1]{
\colorbox{color3}{
\textbf{\textcolor{white}{#1}}
}
}
\newcommand{\yellow}[1]{
\colorbox{color4}{
\textbf{\textcolor{black}{#1}}
}
}
\newcommand{\notebox}[1]{
\begin{tcolorbox}[
enhanced,
colback=white,
colframe=color1,
sharp corners,
frame hidden,
colbacktitle=white,
coltitle=color1,
fonttitle=\titlefont\bfseries,
attach boxed title to top center,
boxed title style={
sharp corners,
% drop shadow=color1!100
},
title=\large NOTE,
]
{#1}
\end{tcolorbox}
}
\newcommand{\warningbox}[1]{
\begin{tcolorbox}[
enhanced,
colback=white,
colframe=color1,
sharp corners,
frame hidden,
colbacktitle=white,
coltitle=color1,
fonttitle=\titlefont\bfseries,
attach boxed title to top center,
boxed title style={
sharp corners,
drop shadow=color1!100,
},
title=\large WARNING
]
{#1}
\end{tcolorbox}
}