forked from Ziul/DocHell
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.tex
455 lines (397 loc) · 13.5 KB
/
setup.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
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
\pdfcompresslevel=9
\input glossary
\makeglossaries
%---------------------------------------------
\crefformat{footnote}{#2\footnotemark[#1]#3}
\newcommand{\longtableendfoot}{Continua na página seguinte}
\makeatletter
\@ifclassloaded{coursepaper}
{
\studentnumber{\allmatriculas} %Matricula
\instructor{\professor}
\coursenumber{\hell}
\college{\universidade}
%% Redefinindo Titulo
\def\@maketitle{%
%\newpage
%\null
\begin{center}
\includegraphics[width=\textwidth]{./fga.jpg}%
\end{center}
{\sffamily \Huge\curso\par}
\begin{flushleft}%
\begin{spacing}{1}%
{\sffamily \LARGE \@title \par}%
% {\sffamily \@college\\}%
\sffamily Semestre: $2^o/2014$\hspace{1cm} Turma: \turma\\
% \vskip 1em%
\sffamily Professor: \@instructor\\%
{\sffamily \lineskip .75em\@author ~-~\@studentnumber}\\%
\sffamily \@date\\
\par%
\end{spacing}%
\end{flushleft}\hrule\vskip 1em\par
\par
\renewcommand{\imprimeabstract}{
\begin{abstract}
\input{conteudo/abstract}
\end{abstract}
}
\vskip 1.5em}
\usepackage{fancyhdr}
\fancyhead{\ver}
\fancyfoot{ }
\fancyhead[LE,RO]{Página \thepage ~de \pageref{LastPage}}
\fancyhead[LO]{\hell}
\fancyhead[RE]{\slshape\leftmark}
\pagestyle{fancy}
}
% end coursepaper
\@ifclassloaded{exam}
{%
\printanswers %apresentar respostas
\renewcommand{\solutiontitle}{\noindent\textbf{Resposta:}\par\noindent}
\usepackage{setspace}
\pagestyle{head}
\firstpageheader{}{\includegraphics[width=\textwidth]{./fga.jpg}}{}
\runningheader{\hell}{Página \thepage\ de \numpages}{\entrega}
\runningheadrule
\newcommand{\imprimeabstract}{
% \begin{abstract}
% \input{conteudo/abstract}
% \end{abstract}
}
%% Redefinindo Titulo
\def\@maketitle{%
\newpage
\null
\includegraphics[width=\textwidth]{./fga.jpg}%
\vskip 2em%
\begin{flushleft}%
\begin{spacing}{1}%
{\sffamily \LARGE \@title \par}%
\vskip 1em%
{\sffamily \large\lineskip .75em\ziul ~-~ \luizmatricula}\\%
%\vskip 1em%
\sffamily \@date\\
\vskip 1em%
\sffamily \universidade\\%
\sffamily \hell\hskip 6pt%
\\%
\sffamily Professor: \professor%
\par%
\end{spacing}%
\end{flushleft}\hrule\vskip 1em\par
\par
\vskip 1.5em}
}
%end exam
{
% \usepackage{setspace}
\@ifclassloaded{IEEEtran}
{
\title{%\includegraphics[width=18cm]{./fga}\\
\hell\\\ver}
%%------------------------------------------------------------------------------
%% Resolveu o problema de a linguagem não estar declarada
\makeatletter
\def\markboth#1#2{\def\leftmark{\@IEEEcompsoconly{\sffamily}\MakeUppercase{\protect#1}}%
\def\rightmark{\@IEEEcompsoconly{\sffamily}\MakeUppercase{\protect#2}}}
\makeatother
\newcommand{\ieee}{true}
\newcommand{\imprimeabstract}{
\IEEEcompsoctitleabstractindextext{%
\begin{abstract}
\input{conteudo/abstract}
\end{abstract}
%%-------------------------------------
\begin{IEEEkeywords} %palavras chaves
\centering\keyw %,\LaTeX.
\end{IEEEkeywords}}
\thispagestyle{empty}
% \IEEEdisplaynotcompsoctitleabstractindextext
\IEEEdisplaynontitleabstractindextext
\IEEEpeerreviewmaketitle
}
\author{
%journal
\ifthenelse{\equal{\journal}{true}}{
\names\\
}{
%conference
\IEEEauthorblockN{\luiz}
\IEEEauthorblockA{Matricula: \luizmatricula\\E-mail: \eluiz}
% \and
% \IEEEauthorblockN{\canela}
% \IEEEauthorblockA{Matricula: \canelamatricula\\E-mail: \ecanela}
}
}
}
{
\newcommand{\ieee}{false}
\newcommand{\imprimeabstract}{
\begin{abstract}
\input{conteudo/abstract}
\end{abstract}
}
}
}
\makeatother
%--------------------------------------------
%Definições para código com fundo listrado
\newcommand\realnumberstyle[1]{#1}
\makeatletter
\newcommand{\zebra}[3]{%
{\realnumberstyle{#3}}%
\begingroup
\lst@basicstyle
\ifodd\value{lstnumber}%
\color{#1}%
\else
\color{#2}%
\fi
\rlap{\hspace*{\lst@numbersep}%
\color@block{\linewidth}{\ht\strutbox}{\dp\strutbox}%
}%
\endgroup
}
\makeatother
\lstset{%
language=C++, %linguagem
numbers=left, %posição dos números
stepnumber=1, %frequencia de aparição dos números
numbersep=5pt,
numberstyle=\zebra{gray!15}{white!35},
basewidth={0.6em,0.45em},
fontadjust=true,
mathescape=true,
tabsize=4,
commentstyle=\color{blue},
literate={á}{{\'a}}1 {à}{{\`a}}1 {ã}{{\~a}}1 {é}{{\'e}}1 {É}{{\'E}}1 {ê}{{\^e}}1 {õ}{{\~o}}1 {í}{{\'i}}1 {ó}{{\'o}}1 {ú}{{\'u}}1 {ç}{{\c c}}1 {³}{{$^3$}}1 {Ω}{{$\Omega$}}1,
breaklines=true,
showstringspaces=false,
stringstyle=\color{cyan},
basicstyle=\small\ttfamily}
\hypersetup{
pdfauthor={\ziul},
pdftitle={\hell-\ver},
pdfsubject={\ver},
pdfkeywords={\keyw},
backref=true,
draft=false,
%pdfstartview=fitR,
bookmarks=true,
bookmarksopen=true,
colorlinks=true,
linkcolor=black,
urlcolor=black,
citecolor=black,%blue
pdftex,
bookmarks=true,
linktocpage=true, % makes the page number as hyperlink in table of content
hyperindex=true,
unicode=false
}
%-------------------------------------------------------------------------------
%Tikz configurations e builds
\usetikzlibrary{shapes,arrows}
\usetikzlibrary{calc,decorations.pathmorphing,patterns}
\pgfdeclaredecoration{penciline}{initial}{
\state{initial}[width=+\pgfdecoratedinputsegmentremainingdistance,
auto corner on length=1mm,]{
\pgfpathcurveto%
{% From
\pgfqpoint{\pgfdecoratedinputsegmentremainingdistance}
{\pgfdecorationsegmentamplitude}
}
{% Control 1
\pgfmathrand
\pgfpointadd{\pgfqpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
{\pgfqpoint{-\pgfdecorationsegmentaspect
\pgfdecoratedinputsegmentremainingdistance}%
{\pgfmathresult\pgfdecorationsegmentamplitude}
}
}
{%TO
\pgfpointadd{\pgfpointdecoratedinputsegmentlast}{\pgfpoint{1pt}{1pt}}
}
}
\state{final}{}
}
\tikzstyle{cloud} = [draw, ellipse,fill=blue!20, node distance=3cm,
minimum height=3em]
\tikzstyle{estado} = [draw, ellipse,fill=blue!20, node distance=3cm,align=center]
\tikzstyle{teste} = [draw, diamond,fill=green!20, node distance=3cm,align=left]
% minimum height=2em]
\tikzstyle{ciclo} =[draw, rectangle,fill=blue!20, node distance=3cm,align=center,decorate,thick,minimum height=3em]
\tikzstyle{phanton} = []
\tikzstyle{line} = [->,right] %[draw, -latex']
\tikzstyle{retorno} = [loop above]
\tikzstyle{arrow} = [bend left,->]
\tikzset{
%Define standard arrow tip
>=stealth',
%Define style for boxes
punkt/.style={
rectangle,
rounded corners,
draw=black, very thick,
text width=6.5em,
minimum height=2em,
text centered},
% Define arrow style
pil/.style={
->,
thick,
shorten <=2pt,
shorten >=2pt,}
}
%-------------------------------------------------------------------------------
\newcounter{alphasect}
\def\alphainsection{0}
\let\oldsection=\section
\def\section{%
\ifnum\alphainsection=1%
\addtocounter{alphasect}{1}
\fi%
\oldsection}%
\renewcommand\thesection{%
\ifnum\alphainsection=1%
\Alph{alphasect}
\else%
\arabic{section}
\fi%
}%
\newenvironment{alphasection}{%
\ifnum\alphainsection=1%
\errhelp={Let other blocks end at the beginning of the next block.}
\errmessage{Nested Alpha section not allowed}
\fi%
\setcounter{alphasect}{0}
\def\alphainsection{1}
}{%
\setcounter{alphasect}{0}
\def\alphainsection{0}
}%
\makeatletter
\newcommand*{\currentname}{\@currentlabelname}
\makeatother
\makeatletter
\@ifclassloaded{scrartcl}
{
\renewcommand{\review}{
% \begin{abstract}
% \input{conteudo/abstract}
% \end{abstract}
}
%------------------------------------------------
% Various required packages
\usepackage{amsthm} % Required for theorem environments
\usepackage{bm} % Required for bold math symbols (used in the footer of the slides)
%\usepackage{graphicx} % Required for including images in figures
%\usepackage{tikz} % Required for colored boxes
\usepackage{booktabs} % Required for horizontal rules in tables
%\usepackage{multicol} % Required for creating multiple columns in slides
\usepackage{lastpage} % For printing the total number of pages at the bottom of each slide
\usepackage{microtype} % Better typography
\usepackage{tocstyle} % Required for customizing the table of contents
\usepackage{scrpage2} % Required for customization of the header and footer
%------------------------------------------------
\linespread{1.12} % Increase line spacing for readability
\definecolor{mygreen}{RGB}{44,85,17}
\definecolor{myblue}{RGB}{34,31,217}
\definecolor{mybrown}{RGB}{194,164,113}
\definecolor{myred}{RGB}{255,66,56}
% Use these colors within the presentation by enclosing text in the commands below
\newcommand*{\mygreen}[1]{\textcolor{mygreen}{#1}}
\newcommand*{\myblue}[1]{\textcolor{myblue}{#1}}
\newcommand*{\mybrown}[1]{\textcolor{mybrown}{#1}}
\newcommand*{\myred}[1]{\textcolor{myred}{#1}}
\usepackage[ % Page margins settings
includeheadfoot,
top=3.5mm,
bottom=3.5mm,
left=5.5mm,
right=5.5mm,
headsep=6.5mm,
footskip=8.5mm
]{geometry}
\renewcommand{\familydefault}{\sfdefault} % Sans serif - this may need to be commented to see the alternative fonts
\renewcommand{\familydefault}{\sfdefault} % Sans serif - this may need to be commented to see the alternative fonts
%------------------------------------------------
% Slide layout configuration
\pagestyle{scrheadings} % Activates the pagestyle from scrpage2 for custom headers and footers
\clearscrheadfoot % Remove the default header and footer
\setkomafont{pageheadfoot}{\normalfont\color{black}\sffamily} % Font settings for the header and footer
% Sets vertical centering of slide contents with increased space between paragraphs/lists
\makeatletter
\renewcommand*{\@textbottom}{\vskip \z@ \@plus 1fil}
\newcommand*{\@texttop}{\vskip \z@ \@plus .5fil}
\addtolength{\parskip}{\z@\@plus .25fil}
\makeatother
% Remove page numbers and the dots leading to them from the outline slide
\makeatletter
\newtocstyle[noonewithdot]{nodotnopagenumber}{\settocfeature{pagenumberbox}{\@gobble}}
\makeatother
\usetocstyle{nodotnopagenumber}
%------------------------------------------------
% Header configuration - if you don't want a header remove this block
\ihead{
\hspace{-2mm}
\begin{tikzpicture}[remember picture,overlay]
\node [xshift=\paperwidth/2,yshift=-\headheight] (mybar) at (current page.north west)[rectangle,fill,inner sep=0pt,minimum width=\paperwidth,minimum height=2\headheight,top color=mygreen!64,bottom color=mygreen]{}; % Colored bar
\node[below of=mybar,yshift=-2/\headheight,rectangle,shade,inner sep=0pt,minimum width=\paperwidth,minimum height =1.5mm,top color=black!50,bottom color=green]{}; % Shadow under the colored bar
shadow
\end{tikzpicture}
\color{white}\currentname} % Header text defined by the \runninghead command below and colored white for contrast
\ifoot{% Left side
\hspace{-2mm}
\begin{tikzpicture}[remember picture,overlay]
\node [xshift=\paperwidth/2,yshift=\footheight] at (current page.south west)[rectangle,fill,inner sep=0pt,minimum width=\paperwidth,minimum height=3pt,top color=mygreen,bottom color=mygreen]{}; % Green bar
\end{tikzpicture}
\myauthor\ \raisebox{0.2mm}{$\bm{\vert}$}\ \myuni % Left side text
}
\ofoot[\pagemark/\pageref{LastPage}\hspace{-2mm}]{\pagemark/\pageref{LastPage}\hspace{-2mm}} % Right side
% The code for the box which can be used to highlight an element of a slide (such as a theorem)
\newcommand*{\mybox}[2]{ % The box takes two arguments: width and content
\par\noindent
\begin{tikzpicture}[mynodestyle/.style={rectangle,draw=mygreen,thick,inner sep=2mm,text justified,top color=white,bottom color=white,above}]\node[mynodestyle,at={(0.5*#1+2mm+0.4pt,0)}]{ % Box formatting
\begin{minipage}[t]{#1}
#2
\end{minipage}
};
\end{tikzpicture}
\par\vspace{-1.3em}}
%------------------------------------------------
\renewcommand{\maketitle}{%
% Title slide - you may have to tweak a few of the numbers if you wish to make changes to the layout
\thispagestyle{empty} % No slide header and footer
\begin{tikzpicture}[remember picture,overlay] % Background box
\node [xshift=\paperwidth/2,yshift=\paperheight/2] at (current page.south west)[rectangle,fill,inner sep=0pt,minimum width=\paperwidth,minimum height=\paperheight/3,top color=mygreen,bottom color=mygreen]{}; % Change the height of the box, its colors and position on the page here
\end{tikzpicture}
% Text within the box
\begin{flushright}
\vspace{2.5cm}
\color{white}\sffamily
{\bfseries\Large \hell\par} % Title
\vspace{0.3cm}
\normalsize
\namecapa
\par % Author name
\mydate\par % Date
\vfill
\end{flushright}
\clearpage
}
%------------------------------------------------
%----------------------------------------------------------------------------------------
% PRESENTATION INFORMATION
%----------------------------------------------------------------------------------------
\newcommand*{\mytitle}{\hell} % Title
\newcommand*{\runninghead}{\ver} % Running head displayed on almost all slides
\newcommand*{\myauthor}{\names} % Presenters name(s)
\newcommand*{\mydate}{\today} % Presentation date
\newcommand*{\myuni}{\universidade} % University or department
}
\makeatother
\makeindex