-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathlivroaberto.sty
1687 lines (1343 loc) · 59.1 KB
/
livroaberto.sty
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
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\def\fileversion{v1.5}
\def\filename{livroaberto}
\def\filetitle{Livro Aberto package}
\def\filedate{2021/07/21}
\def\docdate {2021/07/21}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{\filename}
%Combinação dos pacotes usados para o livro aberto
%Para acessar cada seção basta usar Ctrl+F
%Seção 0 - Pacotes e Comandos base
%Seção 1 - Livro Aberto Boxes
%Seção 2 - Livro Aberto Colors
%Seção 3 - Livro Aberto Fonts
%Seção 4 - Livro Aberto Headings
%Seção 5 - Livro Aberto Lists
%Seção 6 - Livro Aberto Page
%Seção 7 - Livro Aberto Professor
% Define o diretório das figuras e das fontes
\def\fontspath{Fontes/}
\def\aluno{1}
%Base Packages
\RequirePackage[skins,breakable]{tcolorbox}
\RequirePackage{varwidth}
\RequirePackage{array}
\RequirePackage{colortbl}
\RequirePackage{bookmark}
\RequirePackage[math]{cellspace}
\RequirePackage{float}
\RequirePackage{tkz-euclide}
\RequirePackage{amsmath,amssymb}
\RequirePackage[brazil]{babel}
\RequirePackage{times}
\RequirePackage{tabulary}
\RequirePackage{geometry}
\RequirePackage{hypcap}
\RequirePackage{makeidx}
\RequirePackage{xurl}
\RequirePackage{amsmath,amssymb,amsfonts,amsthm,amstext}
\RequirePackage{hhline}
\RequirePackage{pbox}
\RequirePackage{ragged2e}
\RequirePackage{microtype}
\RequirePackage{tabularx}
\RequirePackage{makecell}
\RequirePackage{longtable}
\RequirePackage{wrapfig}
\RequirePackage{bm}
\RequirePackage[low-sup]{subdepth}
\RequirePackage{tikz-3dplot}
% \RequirePackage{pgfplots}
\RequirePackage[inline, attach]{asymptote}
\RequirePackage[dvips]{attachfile2}
\RequirePackage{vwcol}
\RequirePackage{tikz}
\RequirePackage{ifthen}
\RequirePackage[export]{adjustbox}
\RequirePackage{xparse}% For RenewDocumentEnvironment
\RequirePackage{expl3}
\RequirePackage{tcolorbox} %Allow those nice environments
\tcbuselibrary{theorems, listings, breakable, most, skins}
\RequirePackage{titling} % needed to manage with the title
\RequirePackage{eso-pic }% to the cover style
\RequirePackage{tikz}
\RequirePackage{comment}
\RequirePackage{ltxcmds}
\RequirePackage{amstext}
\RequirePackage{textcomp}% "warn" option issued from template
% \RequirePackage[explicit]{titlesec}
\PassOptionsToPackage{explicit}{titlesec}
\RequirePackage{zref-savepos}
\RequirePackage{longtable}
\RequirePackage{makeidx}
\RequirePackage{fancyvrb}
\RequirePackage{wrapfig}
\RequirePackage{parskip}[=v1]
\RequirePackage{parskip}
\RequirePackage{alltt}
\RequirePackage{upquote}
\RequirePackage{capt-of}
\RequirePackage{needspace}
\RequirePackage{mathtools}
\ltx@ifundefined{@removefromreset}
{\RequirePackage{remreset}}
\RequirePackage{atbegshi}
\RequirePackage{kvoptions}
\RequirePackage{sphinx}
\@ifclassloaded{memoir}{}{\RequirePackage{fancyhdr}}
\RequirePackage{framed}
% \RequirePackage{siunitx}
% \RequirePackage{caption}
\RequirePackage{pdfpages}
\RequirePackage{layout}
\RequirePackage{stackengine}
\RequirePackage{changepage}
\RequirePackage{graphicx}
\RequirePackage{adjustbox}
% \RequirePackage{scrlayer-notecolumn}
\RequirePackage{marginfix}
\RequirePackage{stmaryrd}
\RequirePackage{lscape}
\RequirePackage{zref-savepos}
\RequirePackage{tasks}
\RequirePackage[sectionbib]{natbib}
\RequirePackage{chapterbib}
\patchcmd{\thebibliography}{%
\def\currentcolor{cor1}
\phantomsection
\chapter*{\textcolor{cor1}{\bibname}}\@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}}{%
\bibliographytitle*{Bibliografia}}{}{}
\RequirePackage{spverbatim}
% \RequirePackage{ulem}
\RequirePackage{cancel}
\RequirePackage{ifthen}
\RequirePackage{booktabs}
\RequirePackage{listofitems}
\RequirePackage{url}
\RequirePackage{graphicx}
\RequirePackage{forloop}
\RequirePackage{lipsum}
\RequirePackage{suffix}
\RequirePackage{refcount}
\RequirePackage{xcolor}
\RequirePackage{multicol}
\RequirePackage{multirow}
\RequirePackage{blindtext}
\RequirePackage{cleveref}
\RequirePackage{collcell}
\RequirePackage{datatool}
\RequirePackage{environ}
\RequirePackage{xstring}
% \RequirePackage{tabu}
\RequirePackage{hyperref}
\PassOptionsToPackage{bookmarks=false}{hyperref}
\hypersetup{colorlinks=true, colorlinks=true, linkcolor=linkscolor, filecolor=linkscolor, urlcolor=linkscolor,citecolor=linkscolor}
\RequirePackage{graphicx}
\@ifclassloaded{memoir}{}{\RequirePackage{fancyhdr}}
\DeclareMathOperator{\sen}{sen}
\DeclareMathOperator{\tg}{tg}
\DeclareMathOperator{\cotg}{cotg}
\DeclareMathOperator{\cosec}{cosec}
\DeclareMathOperator{\arcsen}{arcsen}
\DeclareMathOperator{\arctg}{arctg}
\DeclareMathOperator{\senh}{senh}
\DeclareMathOperator{\tgh}{tgh}
\DeclareMathOperator{\mdc}{mdc}
\DeclareMathOperator{\mmc}{mmc}
\DeclareMathOperator{\med}{med}
\DeclareMathOperator{\rad}{rad}
% \DeclareMathOperator{\si}{Si}
\DeclareMathOperator{\dirac}{\delta}
\DeclareMathOperator{\mmu}{\mu}
\renewcommand{\Im}{\operatorname{Im}}
\DeclareMathOperator{\D}{D}
\DeclareMathOperator{\CD}{CD}
\DeclareMathOperator{\area}{\text{Area}\,}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\N}{\mathbb{N}}
%Commands
\renewcommand{\bottomtitlespace}{0.25\textheight}
\newcommand{\tmat}[1]{\cellcolor{\currentcolor!80}\textcolor{white}{\bm{#1}}}
\newcommand{\tcolor}[1]{\cellcolor{\currentcolor!80}\textcolor{white}{\textbf{#1}}}
\newcommand{\tmcol}[3]{\multicolumn{#1}{#2}{\cellcolor{\currentcolor!80}\textcolor{white}{\textbf{#3}}}}
\newcommand{\titem}[1]{\textcolor{\currentcolor}{\textbf{#1}}}
\newcommand{\tikzcolor}{\currentcolor!80}
\newcommand{\sub}{\textsubscript}
\newcommand{\super}{\textsuperscript}
\newcommand{\newparallel}{\mathrel{\mkern-5mu\clipbox{0 0.75ex 0 0}{${\sslash}$}\!}}
\renewcommand{\mspace}[1]{}
\def\fle{\longrightarrow}
\def\entao{\Longrightarrow}
\def\ssi{\Longleftrightarrow}
\def\ri{\rightarrow}
\def\bbullet{\noindent{\cor $\bullet$ }}
\newcommand{\no}{\noindent}
\newcommand{\fra}[2]{\text{\small$\dfrac{#1}{#2}$}}
\newcommand{\ve}[1]{{\overrightarrow{#1\,\,}}}
\newcommand{\ol}[1]{{\overline{#1}}}
\newcommand{\interno}[2]{{\langle{#1},{#2}\rangle}}
\newcolumntype{d}[1]{>{\vspace{2.5pt}}m{#1}<{\vspace{2.5pt}}}
\newcolumntype{e}[1]{>{\vspace{2.5pt}\centering\arraybackslash}m{#1}<{\vspace{2.5pt}}}
\newcolumntype{f}{>$c<$}
\newcolumntype{g}[1]{>$e{#1}<$}
% Permite preencher o resto da página com figura
%Coloca listas de enumerate no padrão da seção de exercícios
\newcommand{\exerciselist}{
\setlist[enumerate]{label=\protect\enumbox{\arabic*}}
\setlist[enumerate,2]{label=\textit{\alph*)}}
\setlist[enumerate,3]{label=\textit{\roman*)}}
}
\newcommand{\semihuge}{\@setfontsize\semiHuge{16.72}{21.38}}
\renewcommand{\fref}[1]{\hyperref[#1]{figura \ref{#1}}}
\newcommand{\Fref}[1]{\hyperref[#1]{Figura \ref{#1}}}
\renewcommand{\tref}[1]{\hyperref[#1]{tabela \ref{#1}}}
\newcommand{\Tref}[1]{\hyperref[#1]{Tabela \ref{#1}}}
%Seção 1 - Livro Aberto Boxes
%***************************************************************************************
% This package creates and typesets the text boxes for the Livro Aberto textbook.
%
% This package was written and created by
% David Latchman, TeXnical Designs
% Contact: [email protected] for problems
%% ---------------------------------------------------------------------
%%
%% Loads the ifthen package
%%
\RequirePackage{ifthen}
\RequirePackage{mfirstuc} %To capitalize just the inicial letter of each word. There is a command to exclude specific words to captalize such like a, an, the, etc.
\RequirePackage{anyfontsize} %To define fontsize precisely
\tikzstyle{outlinebox} = [fill=box2]
\tikzstyle{box} = [inner sep=3mm, inner ysep=3mm]
% Define the vertical skip for the environments
\newskip\libroskip
\libroskip= 4pt plus 1pt minus 1pt
\hfuzz=4pt
\graphicspath{
{Figuras/}
{Figuras/vetores/}
{Figuras/perspectiva1/}
{Figuras/perspectiva2/}
{Figuras/funcoes/}
{Figuras/taxa/}
{Figuras/funcao-afim/}
{Figuras/funcao-quadratica/}
{Figuras/sistemas/}
{Figuras/exponencial/}
{Figuras/logaritmos/}
{Figuras/funcao-trigonometrica/}
{Figuras/estatistica1/}
{Figuras/estatistica2/}
{Figuras/probabilidade1/}
{Figuras/tales/}
{Figuras/semelhanca/}
{Figuras/financeira/}
{Figuras/ladrilhos/}
{Figuras/cartografia/}
{Figuras/investigacao/}
{Figuras/superficie/}
{Figuras/trigonometria/}
{Figuras/combinatoria/}
{Figuras/computacional/}
{Figuras/transformacoes/}
{Figuras/livroaberto/}
}
\def\envskip{\vskip\libroskip}
\newtcolorbox[auto counter, number within=chapter, number freestyle={\noexpand\arabic{\tcbcounter}}]{task}[1]{parbox=false, blanker, enhanced, breakable, before skip = 8mm, after skip = 5mm, left=0.3mm, right=0.8mm, top=5mm, bottom=3mm, colback=white, colframe=cor2!70, width=162mm,
%borderline west={3mm}{0pt}{white},
toprule=0pt,
bottomrule=0.5pt,
rightrule=-1pt,
leftrule=-1pt,
outer arc = 3mm,
arc = 3mm,
sharp corners = northeast,
sharp corners = southeast,
sharp corners = southwest,
fontupper=\fontsize{11}{15.5}\boxexample, % Should be 11 pt.
fonttitle=\boxtitlefont\large, % Should be 9 pt. Don't know how to set this. Tried \fontsize{9pt}{}, but didn't work.
coltitle=\currentcolor,
title=\makefirstuc{#1\hfill},
boxed title style={empty,arc=1pt,outer arc=1pt,boxrule=1pt},
attach boxed title to top left={xshift=-1 mm , yshift=-0.1mm},
underlay boxed title ={
% Draw the small arc on the top left.
\draw[cor2!70, line width = 1pt] ($(title.south west)+(3mm,0mm)$) coordinate (LU) arc [start angle=90, end angle=180, y radius=2mm, x radius=2mm] --++ (0mm , -2mm);
% Draw the top line from the left to the right.
\draw[cor2!70, line width=1pt] (LU) -- ++ (158mm,0mm) coordinate (R);
% Think on the Atividade box as an ABCD rectangle (clockwise, A is top left), now you see the coordinates.
\fill [cor2!70] ($(R)+(0mm,-.3mm)$) -- ++ (-25.00mm,0mm) coordinate (D) --++ (0mm, 5mm) arc [start angle=180, end angle=90, x radius=2.00mm, y radius=2.00mm] -- ++ (25.00mm,0mm) coordinate (B) --++ (0.00mm,-5mm) arc [start angle=0, end angle=-90, y radius=2.00mm, x radius=2.00mm] -- cycle;
\node[font=\titlefont\large,white] at ($(B)!0.5!(D)$) {\small Atividade \thetcbcounter};
}
}
% Makes the "To think about" box.
% It is missing to set title font and font size. After that should check if the title is centralized in the title box.
\newtcolorbox{reflection}{parbox=false, blanker, enhanced, breakable, before skip = 5mm, after skip = 5mm, left=3mm, right=3mm, top=7mm, bottom=3mm, colback=white, colframe=box1, borderline west={3mm}{0pt}{white}, toprule=1pt, bottomrule=1pt, rightrule=1pt, leftrule=-1pt, outer arc = 3mm, arc = 3mm,
fonttitle=\bfseries\large\boxtitlefont, % Should be 12 pt. Don't know how to set this.
title=PARA REFLETIR,
boxed title style={empty,arc=0pt,outer arc=0pt,boxrule=0pt},
attach boxed title to top left={xshift=3mm , yshift=-2.5mm},
underlay boxed title={
\filldraw [draw=box1, fill=box1] ($(title.north west) + (0 mm,-2.50mm)$) -- ++(0.00mm,1.50mm) arc [start angle=180, end angle=90, y radius=2.00mm, x radius=2.00mm] -| ++(34.00mm,-5.00mm) arc [start angle=0, end angle=-90, x radius=2.00mm, y radius=2.00mm] -| cycle;}
}
% Observation Box
\newtcolorbox{observationtitle}[1]{
parbox=false, enhanced, breakable, left=3mm, right=3mm,bottom=2mm, colback=box2!50, colframe=box2!50, arc=3mm, sharp corners=uphill, pad at break=2mm, drop fuzzy shadow, title={\parbox{.8\linewidth}{\bfseries\textcolor{\currentcolor}{ #1}}}, boxed title style ={empty},top=8mm, attach boxed title to top center={xshift=0mm, yshift=-7.5mm}
}
\newtcolorbox{observation}{parbox=false, enhanced, breakable, left=3mm, right=3mm, top=3mm, bottom=2mm, colback=box2!50, colframe=box2!50, arc=3mm, sharp corners=uphill, pad at break=2mm, drop fuzzy shadow}
\newtcolorbox[auto counter, number within=chapter, number freestyle={\noexpand\arabic{\tcbcounter}}]{example}[1]{parbox=false, blanker, enhanced, breakable, before skip = 5mm, after skip = 5mm, left=3mm, right=3mm, top=10mm, bottom=3mm, colback=white, colframe=cor1, width=162mm, toprule=1pt, bottomrule=1pt, rightrule=1pt, leftrule=1pt, outer arc = 8mm, arc = 8mm, sharp corners = northwest, sharp corners = southeast, sharp corners = southwest,
title={
%{\boxfont EXEMPLO}\hspace{3.5mm}
\textcolor{cor2}{\large\extitlefont\makefirstuc{#1}\phantom{ç}}
},
boxed title style={empty, sharp corners},
attach boxed title to top left={xshift=22mm , yshift=-7.5mm},
underlay boxed title ={
% Draw the title underlay rectangle
\def\temp{#1}\ifx\temp\empty
%
\else
\fill[cor1!30] ($(frame.north west)+(0,-1pt)$) rectangle ($(title.south east)+(3mm,0mm)$) coordinate (R);
\fi
%)
%;
% Filldraw the darker fancy in front of the rectangle and behind the Example. The coordinates should be better chosen.
\fill[cor1] (frame.north west) -- ($(frame.north west)+(0,-1.4pt)+(0,-7mm)$) -- ++ (22mm,0mm) arc [start angle=-90, end angle=0, x radius = 2mm, y radius = 2mm] -- ($(frame.north west) + (24mm,0)$) -- cycle;
\node [white] at ($(frame.north west) + (12mm,-3.5mm)$) {\boxfont EXEMPLO \thetcbcounter};
},
before upper={\def\currentcolor{cor1}}
}
\newtcolorbox{research}{parbox=false, blanker, enhanced, breakable, before skip = 5mm, after skip = 5mm, left=3mm, right=3mm, top=6mm, bottom=3mm, colback=white, colframe=box3, toprule=1pt, bottomrule=1pt, rightrule=1pt, leftrule=1pt, outer arc = 3mm, arc = 3mm, sharp corners = northwest,
fonttitle=\normalsize\boxtitlefont,
title= PARA PESQUISAR,
boxed title style={empty, colback = box3, colframe = box3, sharp corners},
attach boxed title to top left={xshift=-2.5mm , yshift=-6.2mm},
underlay boxed title={
\filldraw [fill=box3, draw=box3] ($(frame.north west)$) rectangle +(36.00mm,-5.00mm);% the rectangle where the title fits.
\coordinate (A) at ($(frame.north west) + (36.00mm,0.00mm)$);
%\filldraw [cor1] ($(A) + (-4.7mm,0mm)$) rectangle ++(-7mm,-6.4mm);%green rectangle within ? inside.
%\fill [box3] ($(A) + (-11.9mm,-3.5mm)$) -- ++(4.8 mm,2.6 mm) arc [start angle=20, end angle=-60, x radius=1.00mm, y radius=2.35mm] --++ (0,-2mm)-- ($(title.south east) + (-1.1mm,0.20mm)$) -- ($(title.south east) + (-2mm,0.20mm)$) -- cycle; % the fancy thing in the ?
\node [white] at ($(A) + (-2.40mm,-1.6mm)$) {\includegraphics[height=7mm]{lupa}};% just the ?
}
}
\newtcolorbox{knowledge}{parbox=false, blanker, enhanced, breakable, before skip = 5mm, after skip = 5mm, left=3mm, right=3mm, top=6mm, bottom=3mm, colback=white, colframe=box3, toprule=1pt, bottomrule=1pt, rightrule=1pt, leftrule=1pt, outer arc = 3mm, arc = 3mm, sharp corners = northwest,
fonttitle=\normalsize\boxtitlefont,
title= VOC\^{E} SABIA,
boxed title style={empty, colback = box3, colframe = box3, sharp corners},
attach boxed title to top left={xshift=-2.3mm , yshift=-5.5mm},
underlay boxed title={
\filldraw [fill=box3, draw=box3] ($(frame.north west) + (.4mm,0mm)$) rectangle ++(24.00mm,-5.00mm);% the rectangle where the title fits.
\coordinate (A) at ($(frame.north west) + (24.00mm,-2mm)$);
\node at (A) {\includegraphics[scale=1]{interrogacao.png}};
}
}
\NewEnviron{evaluation}{%
\envskip
\begin{tikzpicture}[remember picture]
\begin{pgfonlayer}{main}
\node [box] (box) {%
\begin{minipage}{0.90\textwidth}
\BODY
\end{minipage}
};
\end{pgfonlayer}
\begin{pgfonlayer}{main}
\filldraw [fill=cor1, draw=cor1] (box.north west) arc [start angle=270, end angle=180, x radius=2.00mm, y radius=2.00mm] -- ++(0.00mm,6.00mm) arc [start angle=180, end angle=90, x radius=2.00mm, y radius=2.00mm] -- ++(3.00mm,0.00mm) coordinate (a) |- cycle;
\node [draw=cor1, fill=cor1, minimum height=10.00mm, right] (heading) at ($(a) + (0.00mm,-5.00mm)$) {\Large AUTO-AVALIA\c{C}\={A}O};
\filldraw [fill=cor1, draw=cor1] (heading.north east) -- ++(10.00mm,-10.00mm) coordinate (b) -| cycle;
\end{pgfonlayer}
\begin{pgfonlayer}{background}
\draw [draw=cor1!30, line width=3.00mm, overlay] ($(box.north west) + (0.00mm,1.50mm)$) -| ($(box.south east) + (1.50mm,-1.50mm)$) -- ($(box.south west) + (-1.50mm,-1.50mm)$);
\draw [draw=cor1, overlay] (b) -- (box.north east) -- (box.south east) -- ($(box.south west) + (-1.50mm,0.00mm)$);
% \draw [draw=cor1!30, line width=3.00mm, overlay] ($(box.north west) + (0.00mm,1.50mm)$) -| ($(box.south east) + (1.50mm,-1.50mm)$) coordinate (d) -- ($(current page.north west)!(d)!(current page.south west)$) -- (d);
% \draw [draw=cor1, overlay] (b) -- (box.north east) -- (box.south east) -- ($(box.south west) + (-15.00mm,0.00mm)$) coordinate (c) -- ($(current page.north west)!(c)!(current page.south west)$) -- (c);
\end{pgfonlayer}
\end{tikzpicture}
}
\NewEnviron{project}{%
\setlist[itemize]{label=\protect\itemcoloredsquare, }
\def\currentcolor{cor2}
\newpage
\begin{tikzpicture}[remember picture, overlay]
\coordinate (border1) at ($(current page text area.south east) + (0.00mm,8.00mm)$);
\coordinate (border1a) at ($(border1) + (-5.00mm,2.00mm)$);
\coordinate (border1b) at ($(current page text area.south west) + (11.00mm,10.00mm)$);
\coordinate (border1c) at ($(current page text area.north west) + (11.00mm,-13.00mm)$);
\coordinate (border1d) at ($(current page text area.south west) + (11.00mm,13.00mm)$);
\coordinate (heading) at ($(current page text area.north west) + (32.50mm,-5.00mm)$);
\coordinate (corner1) at ($(current page text area.north west) + (6.00mm,-10.00mm)$);
\coordinate (corner2) at ($(current page text area.north east) + (-4.00mm,-10.00mm)$);
\coordinate (corner3) at ($(current page text area.south east) + (0.00mm,10.00mm)$);
\coordinate (corner4) at ($(current page text area.south west) + (10.00mm,6.00mm)$);
\coordinate (text1) at ($(current page text area.north west) + (11.00,-12.50mm)$);
\coordinate (text2) at ($(current page text area.south east) + (-2.50mm,8.50mm)$);
\coordinate (bodytextpos) at ($(border1c) + (5.00mm,-3.00mm)$);
\begin{pgfonlayer}{background}
\draw [draw=base1, fill=base1] (current page text area.south west) rectangle (current page text area.north east);
\end{pgfonlayer}
\begin{pgfonlayer}{main}
\draw [fill=cor2, draw=cor2] (current page text area.north west) -- ++(0.00mm,-8.00mm) arc [start angle=180, end angle=270, x radius=2.00mm, y radius=2.00mm] -| ++(63.00mm,8.00mm) arc [start angle=0, end angle=90, x radius=2.00mm, y radius=2.00mm] -- cycle;
\draw [fill=base1!30, draw=base1!30] (corner1) -- (corner2) arc [start angle=90, end angle=0, x radius=4.00mm, y radius=4.00mm] -- (corner3) arc [start angle=0, end angle=-90, x radius=4.00mm, y radius=4.00mm] -- (corner4) arc [start angle=270, end angle=180, x radius=4.00mm, y radius=4.00mm] -- cycle;
% \draw [green] (text1) rectangle (text2);
\draw [black] (border1a) -- (border1b) -- (border1c) -| cycle;
\end{pgfonlayer}
\begin{pgfonlayer}{foreground}
\node [color=base1!30, font=\titlefont\bfseries\fontsize{13pt}{0}\selectfont] (title) at (heading) {PROJETO APLICADO};
\node [box, below right] (bodytext) at (border1c){%
\begin{minipage}{0.85\textwidth}
\BODY
\end{minipage}
};
\end{pgfonlayer}
\end{tikzpicture}
\clearpage
}
%Seção 2 - Livro Aberto Colors
%***************************************************************************************
% This package sets up the colors used in the Livro Aberto textbook.
%
% This package was written and created by
% David Latchman, TeXnical Designs
% Contact: [email protected] for problems
%
%
% The fonts used in this package:
% Title: Orbitron
% Main (Text): Exo 2
% Boxes: Roboto
%% ---------------------------------------------------------------------
%%
%% Loads the ifthen package
%%
\RequirePackage{ifthen}
\RequirePackage{xkeyval}
\definecolor{cor1}{RGB}{0,165,157} %verde agua
\definecolor{cor2}{RGB}{73,85,93}
\definecolor{cor1a}{RGB}{0,165,157}
\definecolor{cor2a}{RGB}{73,85,93}
\definecolor{cor1b}{RGB}{251,181,0}
\definecolor{cor2b}{RGB}{73,85,93}
\definecolor{base1}{RGB}{184,202,213}
\definecolor{base2}{RGB}{221,223,80}
\definecolor{session1}{RGB}{0,94,176} %azul
\definecolor{session2}{RGB}{75,173,49} %verde
\definecolor{session3}{RGB}{183,13,40} %vinho
\definecolor{session4}{RGB}{236,107,16} %laranja
\definecolor{penaqua}{RGB}{0,165,157}
\definecolor{grafite}{RGB}{73,85,93}
\definecolor{penazul}{RGB}{0,94,176}
\definecolor{penverde}{RGB}{75,173,49}
\definecolor{penvinho}{RGB}{83,13,40}
\definecolor{penlaranja}{RGB}{236,107,16}
\definecolor{penbox2}{RGB}{240,238,201}
\definecolor{box1}{RGB}{71,30,129}
\definecolor{box2}{RGB}{225,221,146}
\definecolor{box3}{RGB}{108,27,98}
\definecolor{linkscolor}{RGB}{6,69,173}
\definecolor{magblue}{RGB}{151,255,249}
\definecolor{primario}{RGB}{0,165,157} %esverdeado
\definecolor{secundario}{RGB}{73,85,93} %acinzentado escuro
\definecolor{terciario}{RGB}{184,202,213} % azul claro
\definecolor{destacado}{RGB}{183,13,40} %avermelhado
\definecolor{atento}{RGB}{0,94,176} %azul forte
% Set up options for color schemes
\newboolean{coloroptions}
\define@choicekey*+{colorchoices}{color options}[\val\coloroption]
{option 1, option 2}{%
\ifcase\coloroption\relax
\definecolor{cor1}{RGB}{0,165,157}
\definecolor{cor2}{RGB}{73,85,93}
% \setboolean{coloroptions}{true}
\or
% \setboolean{coloroptions}{false}
\definecolor{cor1}{RGB}{251,181,0}
\definecolor{cor2}{RGB}{73,85,93}
\fi
}{%
% \setboolean{coloroptions}{true}
\definecolor{cor1}{RGB}{0,165,157}
\definecolor{cor2}{RGB}{73,85,93}
}
%Seção 3 - Livro Aberto Fonts
%***************************************************************************************
% This package sets up the fonts for the Livro Aberto textbook.
%
% This package was written and created by
% David Latchman, TeXnical Designs
% Contact: [email protected] for problems
%
%
% The fonts used in this package:
% Title: Orbitron
% Main (Text): Exo 2
% Boxes: Roboto
\typeout{Package: `\filetitle\space\filename\space\fileversion \@spaces <\filedate>'}
\typeout{English documentation as of <\docdate>}
%% ---------------------------------------------------------------------
%%
%% Loads the ifthen package
%%
\RequirePackage{ifthen}
\RequirePackage{fontspec}
\setmainfont[Path=\fontspath]{Exo2-Light.otf}[BoldFont=Exo2-Medium.otf, ItalicFont=Exo2-LightItalic.ttf, BoldItalicFont=Exo2-MediumItalic.ttf]
\newfontfamily{\titlefont}[Path=\fontspath]{orbitron-medium.otf}[BoldFont=orbitron-bold.otf]
\newfontfamily{\secondtitlefont}[Path=\fontspath]{orbitron-black.ttf}
\newfontfamily{\thirdtitlefont}[Path=\fontspath]{orbitron-bold.otf}
\newfontfamily{\pagetitlefont}[Path=\fontspath]{Orbitron-Regular.ttf}
\newfontfamily{\boxfont}[Path=\fontspath]{Roboto-Regular.ttf}
\newfontfamily{\enumeratefont}[Path=\fontspath]{Exo2-Light.otf}[BoldFont=Exo2-Medium.otf, ItalicFont=Exo2-LightItalic.ttf, BoldItalicFont=Exo2-MediumItalic.ttf]
\newfontfamily{\boxtitlefont}[Path=\fontspath]{Exo2-Bold.otf}[BoldFont=Exo2-ExtraBold.ttf, ItalicFont=Exo2-BoldItalic.ttf, BoldItalicFont=Exo2-ExtraBoldItalic.ttf] % added after David
\newfontfamily{\extitlefont}[Path=\fontspath]{Exo2-SemiBold.otf} % added after David
\newfontfamily{\boxexample}[Path=\fontspath]{Exo2-Regular.otf}[BoldFont=Exo2-SemiBold.ttf, ItalicFont=Exo2-RegularItalic.ttf, BoldItalicFont=Exo2-MediumItalic.ttf] % added after David
%Seção 4 - Livro Aberto Headings
%***************************************************************************************
% This package creates the heading designs for the Livro Aberto textbook.
%
% This package was written and created by
% David Latchman, TeXnical Designs
% Contact: [email protected] for problems
%
%% ---------------------------------------------------------------------
%%
%% Loads the ifthen package
%%
\RequirePackage{ifthen}
% Commands for chapter page
\newcommand{\chapterillustration}[2]{
\ifnum\aluno=1
\def\@chapterillustration{#1}
\else
\def\@chapterillustration{#2}
\fi
}
\newcommand{\chapterwhat}[1]{\def\@chapterwhat{#1}}
\newcommand{\chapterbecause}[1]{\def\@chapterbecause{#1}}
% Formatação dos comandos \section e \subsection
%Cor atual
\titleformat{\section}{\color{\currentcolor}\normalfont\semihuge\bfseries}{\thesection}{1em}{#1 \phantomsection}
\titlespacing*{\section}
{0pt}{2mm}{1mm}
% \providecommand*{\toclevel@section}{2}
\titleformat{\subsection}{\color{\currentcolor}\normalfont\Large\bfseries}{\thesection}{1em}{#1}
\titlespacing*{\subsection}
{0pt}{2mm}{1mm}
\titleformat{\paragraph}{\color{\currentcolor}\normalfont\large\bfseries}{\thesubsection}{1em}{#1}
\titlespacing*{\paragraph}
{0pt}{1mm}{1mm}
\renewcommand*{\toclevel@section}{1}
\renewcommand*{\toclevel@subsection}{4}
\renewcommand*{\toclevel@paragraph}{5}
\renewcommand*{\toclevel@subparagraph}{6}
\providecommand*{\toclevel@exploresec}{1}
\providecommand*{\toclevel@practicesec}{1}
\providecommand*{\toclevel@arrangesec}{1}
\providecommand*{\toclevel@knowsec}{1}
\providecommand*{\toclevel@exercisesec}{1}
\newcommand{\expandtocdepth}[1][]{%
\renewcommand*{\toclevel@section}{1}
\renewcommand*{\toclevel@subsection}{4}
\renewcommand*{\toclevel@paragraph}{5}
\renewcommand*{\toclevel@subparagraph}{6}
\renewcommand*{\toclevel@exploresec}{2}
\renewcommand*{\toclevel@practicesec}{2}
\renewcommand*{\toclevel@arrangesec}{2}
\setcounter{tocdepth}{2}
\IfStrEqCase{#1}{%
{}{
}
{know}{
\renewcommand*{\toclevel@knowsec}{2}
}%
{exercise}{
\renewcommand*{\toclevel@exercisesec}{2}
}%
{know, exercise}{
\renewcommand*{\toclevel@knowsec}{2}
\renewcommand*{\toclevel@exercisesec}{2}
}
}[%
Apenas os valores "know" e "exercise" são permitidos.
]%
}
\titleformat{\bibliographytitle}{\vspace{.3\baselineskip}\color{cor1}\normalfont\huge\bfseries}{\thesubsection}{1em}{}
\titlespacing*{\subsection}
{0pt}{1mm}{1mm}
%Cor Explorando
\newcommand{\scexplore}[1]{\hypersetup{linkcolor=session1}\paragraph{\color{session1}\normalfont\Large\bfseries#1}\hypersetup{linkcolor=linkscolor}}
\newcommand{\scarrange}[1]{\hypersetup{linkcolor=session4}\paragraph{\color{session4}\normalfont\Large\bfseries#1}\hypersetup{linkcolor=linkscolor}}
\newcommand{\scpractice}[1]{\hypersetup{linkcolor=session2}\paragraph{\color{session2}\normalfont\Large\bfseries#1}\hypersetup{linkcolor=linkscolor}}
\newcommand{\scknow}[1]{\hypersetup{linkcolor=session2}\paragraph{\color{session3}\normalfont\Large\bfseries#1}\hypersetup{linkcolor=linkscolor}}
\newcommand{\scexercise}[1]{\hypersetup{linkcolor=cor1}\paragraph{\color{cor1}\normalfont\Large\bfseries#1}\hypersetup{linkcolor=linkscolor}}
\newcommand{\subexplore}[1]{\paragraph{\color{session1}\normalfont\Large\bfseries#1}}
\newcommand{\subarrange}[1]{\paragraph{\color{session4}\normalfont\Large\bfseries#1}}
\newcommand{\subpractice}[1]{\paragraph{\color{session2}\normalfont\Large\bfseries#1}}
\newcommand{\subknow}[1]{\paragraph{\color{session3}\normalfont\Large\bfseries#1}}
\newcommand{\subexercise}[1]{\paragraph{\color{cor1}\normalfont\Large\bfseries#1}}
% Create box shape
\pgfdeclareshape{howbecausetextbox}{%
\inheritsavedanchors[from=rectangle]
\inheritanchorborder[from=rectangle]
\inheritanchor[from=rectangle]{center}
\inheritanchor[from=rectangle]{south}
\inheritanchor[from=rectangle]{west}
\inheritanchor[from=rectangle]{north}
\inheritanchor[from=rectangle]{east}
\inheritanchor[from=rectangle]{base}
\inheritanchor[from=rectangle]{north west}
\inheritanchor[from=rectangle]{north east}
\inheritanchor[from=rectangle]{south east}
\inheritanchor[from=rectangle]{south west}
\backgroundpath{%
\southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
\northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
% Construct main path
% Construct main path
\pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya+5pt}}
\pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}}
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya+5pt}}
\pgfpatharc{0}{-90}{5.0pt}
\pgfpathlineto{\pgfpoint{\pgf@xa+5pt}{\pgf@ya}}
\pgfpatharc{270}{180}{5.0pt}
% \pgfpathcurveto{\pgfpoint{\pgf@xc}{\pgf@ya}\pgfpoint{\pgf@xa}{\pgf@ya}\pgfpoint{\pgf@xa}{\pgf@yc}}
\pgfpathclose
}
}
\pgfdeclareshape{howbecauseheadingbox}{%
\inheritsavedanchors[from=rectangle]
\inheritanchorborder[from=rectangle]
\inheritanchor[from=rectangle]{center}
\inheritanchor[from=rectangle]{south}
\inheritanchor[from=rectangle]{west}
\inheritanchor[from=rectangle]{north}
\inheritanchor[from=rectangle]{east}
\inheritanchor[from=rectangle]{base}
\inheritanchor[from=rectangle]{north west}
\inheritanchor[from=rectangle]{north east}
\inheritanchor[from=rectangle]{south east}
\inheritanchor[from=rectangle]{south west}
\backgroundpath{%
\southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
\northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
% Construct main path
% Construct main path
\pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}
\pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}}
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}
\pgfpatharc{90}{0}{7.0pt}
\pgfpathlineto{\pgfpoint{\pgf@xb+7pt}{\pgf@ya+7.0pt}}
\pgfpatharc{0}{-90}{7.0pt}
\pgfpathclose
}
}
\newtcolorbox{openningbox}{
enhanced,
% jigsaw,
opacityframe=.3,
opacityfill=.3,
width=80mm,
left=3mm,
right=3mm,
top=3mm,
bottom=.5mm,
colback=white,
colframe=white,
arc=3mm,
sharp corners=uphill,
% frame empty,
% arc = 8pt,
lower separated = false,
before upper = \tcbsubtitle{O QU\^E?},
before lower = \tcbsubtitle{POR QU\^E?},
fontupper = \sffamily,
fontlower = \sffamily,
sharp corners = north,
subtitle style = {
frame empty,
fontupper = \fontsize{13pt}{0}\selectfont\titlefont\bfseries,
colback = cor1,
coltext = black!70,
width = 3.5cm,
arc = 8pt,
rounded corners = east
}
}
\newcommand{\bigopenningbox}{
\renewtcolorbox{openningbox}{
enhanced,
% jigsaw,
opacityframe=.3,
opacityfill=.3,
width=105mm,
left=3mm,
right=3mm,
top=3mm,
bottom=.5mm,
colback=white,
colframe=white,
arc=3mm,
sharp corners=uphill,
% frame empty,
% arc = 8pt,
lower separated = false,
before upper = \tcbsubtitle{O QU\^E?},
before lower = \tcbsubtitle{POR QU\^E?},
fontupper = \sffamily,
fontlower = \sffamily,
sharp corners = north,
subtitle style = {
frame empty,
fontupper = \fontsize{13pt}{0}\selectfont\titlefont\bfseries,
colback = cor1,
coltext = black!70,
width = 3.5cm,
arc = 8pt,
rounded corners = east
}
}
}
\newcommand{\ChapNumTitle}[1]{%
% \thispagestyle{plain}
\thispagestyle{empty}
\begin{tikzpicture}[remember picture, overlay]
\coordinate (a) at ($(current page.north west) + (44.00mm,-44.00mm)$);
\coordinate (c) at ($(current page.north west) + (148.54mm,-64.82mm)$);
\coordinate (d) at ($(current page.north) + (0.00mm,-78.57mm)$);
\begin{pgfonlayer}{top}
\filldraw [fill=cor1, draw=cor1] ($(a) + (0.00mm,-25.00mm)$) -- ++(22.00mm,0.0mm) arc [start angle=270, end angle=360, x radius = 3.00mm, y
radius=3.00mm] coordinate (c1) -- ++(0.00mm,44.00mm) coordinate (c2) arc [start angle=0, end angle=90, x radius=3.00mm, y radius=3.00mm] --
++(-44.00mm,0.00mm) arc [start angle=90, end angle=180, x radius=3.00mm, y radius=3.00mm] -- ++(0.00mm,-44.00mm) arc [start angle=180, end
angle=270, x radius=3.00mm, y radius=3.00mm] -- cycle;
\node[font=\chapnumfont, text=cor2] at (a) {\chapnamefont\thechapter};
\coordinate (b) at ($(c1)!0.5!(c2)$);
\node (title) at (b) [right, font=\chaptitlefont, text=cor2] {\begin{varwidth}{12cm}\baselineskip=1cm #1\end{varwidth}};
% solution to the box O QUE and POR QUE?
\node [right] at ($(current page.north)+(-15mm,-150mm)$) %
{\begin{openningbox}
\@chapterwhat
\tcblower
\@chapterbecause
\end{openningbox}};
\end{pgfonlayer}
\begin{pgfonlayer}{bottom}
\node[opacity=0.3,inner sep=0pt] at (current page.center){\includegraphics[width=\paperwidth,height=\paperheight]{capas/\@chapterillustration}};
\end{pgfonlayer}
\begin{pgfonlayer}{top}
\end{pgfonlayer}
\end{tikzpicture}
}
\newcommand{\ChapNoNumTitle}[1]{%
\thispagestyle{plain}
\begin{tikzpicture}[remember picture, overlay]
\coordinate (a) at ($(current page.north west) + (44.00mm,-44.00mm)$);
\filldraw [fill=cor1] ($(a) + (0.00mm,-25.00mm)$) -- ++(22.00mm,0.0mm) arc [start angle=270, end angle=360, x radius = 3.00mm, y
radius=3.00mm] coordinate (c1) -- ++(0.00mm,44.00mm) coordinate (c2) arc [start angle=0, end angle=90, x radius=3.00mm, y radius=3.00mm] --
++(-44.00mm,0.00mm) arc [start angle=90, end angle=180, x radius=3.00mm, y radius=3.00mm] -- ++(0.00mm,-44.00mm) arc [start angle=180, end
angle=270, x radius=3.00mm, y radius=3.00mm] -- cycle;
% \node[textbf, text=cor2] at (a) {\chapnamefont\thechapter};
\coordinate (b) at ($(c1)!0.5!(c2)$);
\node (title) at (b) [right, font=\chaptitlefont] {#1};
\end{tikzpicture}
}
\newif\ifnumberedchap
\numberedchaptrue
% Page number command
\newcommand{\leftpagenumber}{%
\begin{tikzpicture}[remember picture, overlay]
\coordinate (bottom) at ($(current page.south west) + (13.50mm,6.80mm)$);
\begin{pgfonlayer}{main}
% Square for page number
\filldraw [fill=cor1, draw=cor1] (bottom) rectangle ++(-8.00mm,8.00mm) coordinate (corner);
\end{pgfonlayer}
\begin{pgfonlayer}{foreground}
\node [text=white, font=\bfseries](page_number) at ($(bottom)!0.5!(corner)$) {\thepage};
\end{pgfonlayer}
\end{tikzpicture}
}
\newcommand{\rightpagenumber}{%
\begin{tikzpicture}[remember picture, overlay]
\coordinate (bottom) at ($(current page.south east) + (-13.50mm,6.80mm)$);
\begin{pgfonlayer}{main}
% Square for page number
\filldraw [fill=cor1, draw=cor1] (bottom) rectangle ++(8.00mm,8.00mm) coordinate (corner);
\end{pgfonlayer}
\begin{pgfonlayer}{foreground}
\node [text=white, font=\bfseries](page_number) at ($(bottom)!0.5!(corner)$) {\thepage};
\end{pgfonlayer}
\end{tikzpicture}
}
\newcommand{\drawpage}{%
\begin{tikzpicture}[remember picture, overlay]
\draw [green, thick] (current page.north west) -- (current page.north east) -- (current page.south east) -- (current page.south west) -- cycle;
\end{tikzpicture}
}
% Draw headers. This places the tabs on the side of the page
\newcommand{\leftpagetab}{%
\begin{tikzpicture}[remember picture, overlay]
\coordinate (bottom) at ($(current page.south west) + (18.00mm,0.00mm)$);
% Draw color block
\filldraw [fill=cor2, draw=cor2] ($(current page.north east) + (-18.00mm,0.00mm)$) rectangle ++(8.00mm,-8.00mm) coordinate (taba) {};
% Square for chapter number
\coordinate (tabb) at ($(taba) + (-8.00mm,-8.00mm)$);
\coordinate (tabc) at ($(tabb) + (4.00mm,0.00mm)$);
\node [fill=cor1, text=white, minimum height=8.00mm, minimum width=8.00mm] (chapternumber) at ($(tabb)!0.5!(taba)$) {\Large\thirdtitlefont\thechapter};
% \filldraw [fill=cor2, draw=cor2] ($(current page.north east) + (-18.00mm,-26.00mm)$) -- ++(9.00mm,0.00mm) -- ++(0.00mm,-9.00mm) -| cycle;
% Add chapter name
\node [fill=cor2, text=white] (chaptertitle) at (tabb) [rotate=90, below left, minimum height = 8.00mm] {\tiny\titlefont \MakeUppercase{\chaptername}};
% Add end tab
\fill [fill=cor2] (chaptertitle.north west) -- ++(0.00mm,-4.00mm) coordinate (t1) arc [start angle=180, end angle=90, x radius=2.00mm, y radius=2.00mm] -- ++(4.00mm,0.00mm) arc [start angle=270, end angle=360, x radius=2.00mm, y radius=2.00mm] coordinate (t2) -| cycle;
% Add chapter title
\node (chaptertitle) at ($(t1)!0.5!(t2)$) [left, rotate=90, text=black] {\tiny \pagetitlefont \leftmark};
\end{tikzpicture}
}
\newcommand{\rightpagetab}{%
\begin{tikzpicture}[remember picture, overlay]
% \filldraw [fill=cor1, draw=cor1] (current page.north west) rectangle ($(current page.south west) + (18.00mm,0.00mm)$) coordinate (bottom) {};
\coordinate (bottom) at ($(current page.south west) + (18.00mm,0.00mm)$);
% Draw color block
\filldraw [fill=cor2, draw=cor2] ($(current page.north west) + (18.00mm,0.00mm)$) rectangle ++(-8.00mm,-8.00mm) coordinate (taba) {};
% Square for chapter number
\coordinate (tabb) at ($(taba) + (8.00mm,-8.00mm)$);
%%% \coordinate (tabc) at ($(tabb) + (4.00mm,0.00mm)$);
\node [fill=cor1, text=white, minimum height=8.00mm, minimum width=8.00mm] (chapternumber) at ($(tabb)!0.5!(taba)$) {\Large\thirdtitlefont\thechapter};
% Add chapter name
\node [fill=cor2, text=white] (chaptertitle) at (tabb) [rotate=90, above left, minimum height = 8.00mm] {\tiny\titlefont \MakeUppercase{\chaptername}};
% Add end tab
\filldraw [fill=cor2, draw=cor2] (chaptertitle.south west) -- ++(0.00mm,-4.00mm) coordinate (t1) arc [start angle=0, end angle=90, x radius=2.00mm, y radius=2.00mm] -- ++(-4.00mm,0.00mm) arc [start angle=270, end angle=180, x radius=2.00mm, y radius=2.00mm] coordinate (t2) -| cycle;
% Add chapter title
\node (chaptertitle) at ($(t1)!0.5!(t2)$) [left, rotate=90, text=black, xshift=-0.00mm] {\tiny\pagetitlefont\leftmark};
% Square for page number
% \filldraw [fill=cor1, draw=cor1] ($(bottom) + (0.00mm, 20.00mm)$) rectangle ++(8.00mm,8.00mm);
\end{tikzpicture}
}
\let\oldnewline\newline
% redefinition: \newline is \relax
\newcommand\AnnCL{%
\def\newline{\relax}}
% recovering the original meaning of \newline
\newcommand\RecCL{%
\def\newline{\oldnewline}}
% Draw Headings
%% Explorando
\titleclass{\exploresec}{straight}[\section]