-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayout.tex
243 lines (210 loc) · 6.39 KB
/
layout.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
% Gráficos e layout
\ifx\pdfmatch\undefined
\else
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\fi
% xetex:
\ifx\XeTeXinterchartoks\undefined
\else
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\fi
% luatex:
\ifx\directlua\undefined
\else
\usepackage{fontspec}
\fi
% End engine-specific settings
% Fonte
%\usepackage{lmodern}
\usepackage{times}
% Chunk de códigos com linha
\usepackage[utf8]{inputenc}
\usepackage{listings}
\usepackage{xcolor}
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\lstdefinestyle{mystyle}{
backgroundcolor=\color{white},
commentstyle=\color{codegreen},
keywordstyle=\color{magenta},
numberstyle=\tiny\color{codegray},
stringstyle=\color{codepurple},
basicstyle=\ttfamily\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2
}
\lstset{style=mystyle}
%corrige problemas de encoding dentro dos chunk de código
%Os warnings continuam acontencendo, mas não influenciam na compilação do pdf.
\lstset{
language=C, % R code
literate=
{á}{{\'a}}1
{à}{{\`a}}1
{ã}{{\~a}}1
{é}{{\'e}}1
{ê}{{\^e}}1
{í}{{\'i}}1
{ó}{{\'o}}1
{õ}{{\~o}}1
{ú}{{\'u}}1
{ü}{{\"u}}1
{Á}{{\'A}}1
{À}{{\`A}}1
{Ã}{{\~A}}1
{É}{{\'E}}1
{Ê}{{\^E}}1
{Í}{{\'I}}1
{Ó}{{\'O}}1
{Õ}{{\~O}}1
{Ú}{{\'U}}1
{Ü}{{\"U}}1
{ç}{{\c{c}}}1
{Ç}{{\c{C}}}1
}
% Pacotes adicionados
\usepackage{ae}
% Língua e hifenização
\usepackage[portuguese]{babel}
\usepackage{hyphenat}
\usepackage{hyperref} % Permite Links personalizados
\usepackage{fancyhdr}
\usepackage{sectsty}
\usepackage{float} % Gerencia melhor o posicionamento das figuras e tabelas
%\usepackage{graphicx}
% \usepackage[pdftex]{color,graphicx}
\usepackage{enumerate} % Permite alterar Layout do enumerate
\usepackage{enumitem} % Permite opções de {itemize}
\usepackage{pdflscape} % Permite alterar a orientação da pagina para Paisagem
% \usepackage{ifthen} % Permite usar condicionais ifelse
\usepackage{xcolor} %cores
\usepackage{amsmath,amssymb} % Ambiente para uso de elementos matemáticos
\usepackage{caption}
\usepackage{subcaption} % permite o uso de multiplas figuras com legenda (ambiente subfigure)
\usepackage{minted} % Ambiente para blocos de código
\usepackage{natbib} % Para referencia bibliográfica
\usepackage{url} % Referência de links na internet
\usepackage{listings} % pacote para apresentar código de programação
\usepackage{indentfirst} % Para indentar o primeiro parágrafo de cada seção
\usepackage{titling} % Permite Montar uma página de titulo própria
\usepackage{tcolorbox} % Caixas Coloridas com Bordas =D
\usepackage{multicol} % Permite colocar textos e imagens lado a lado
\usepackage{setspace} % Deixa o texto justificado
\usepackage{ragged2e} % Deixa o texto justificado
\usepackage{geometry} % Padrão ABNT
\usepackage{listings} % Cria código
\usepackage{color} % Padroniza cores dos exercícios
% \usepackage[document]{ragged2e}
% Layout do documento
% Bordas e tamanho da página
\geometry{ % Padrõa ABNT para relatórios
a4paper,
left=30mm,
right=20mm,
top=30mm,
bottom=20mm
}
% Cabeçalho e Rodapé
\pagestyle{fancy} % https://www.sharelatex.com/learn/Headers_and_footers
\lhead{}
\chead{}
\rhead{Projeto Edubot} % cabeçalho margem direita
\lfoot{}
\cfoot{}
\rfoot{\thepage} % rodapé margem direita
% Numeração
\pagenumbering{arabic}
% Retas do cabeçalho e rodapé
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0.5pt}
% Tamanho da letra
\chapterfont{\huge}
\sectionfont{\Large}
\subsectionfont{\large}
% Hiperlinks
\hypersetup{
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=black,
urlcolor=black
}
% Definições do pdf
\hypersetup{
unicode=false, % non-Latin characters in Acrobat’s bookmarks
pdftoolbar=true, % show Acrobat’s toolbar?
pdfmenubar=true, % show Acrobat’s menu?
pdffitwindow=false, % window fit to page when opened
pdfstartview={FitH}, % fits the width of the page to the window
pdfauthor={Projeto Edubot - UnB}, % author
pdfnewwindow=true % links in new window
}
% Outros
%\renewcommand{\thesection}{(\alph{section})} % muda o estilo de númeração das sections
% alterando a formatação dos numeradores de lista de itens
\renewcommand\theenumi{\arabic{enumi}}
\renewcommand\labelenumi{\textbf{\alph{enumi})}}
\renewcommand\theenumii{\arabic{enumii}}
\renewcommand\labelenumii{(\textit{\theenumi.\theenumii})}
% Blocos de questões
% referência:
% https://tex.stackexchange.com/questions/66154/how-to-construct-a-coloured-box-with-rounded-corners#66156
% Contador para enumerar as questões
\newcounter{question}[subsection]
% Define caixas para formatação
\definecolor{mylightblue}{RGB}{98, 217, 253}
\definecolor{mydarkblue}{RGB}{78, 175, 253}
\newtcolorbox{questionbox}[1]{
colback=mylightblue!5!white,
colframe=mylightblue!80!black,
fonttitle=\bfseries,
title=#1
}
\newtcolorbox{chalengebox}[1]{
colback=mydarkblue!5!white,
colframe=mydarkblue!80!black,
fonttitle=\bfseries,
title=#1
}
% Formatar questões
\newcommand{\question}[1]{\stepcounter{question}\noindent
\begin{questionbox}{Exercício \thesection.\thequestion\hspace{0.2cm}}
#1
\end{questionbox}}
% Formatar questões de desafio mantendo a numeração
\newcommand{\challenge}[1]{\stepcounter{question}\noindent
\begin{chalengebox}{\thesection.\thequestion\hspace{0.2cm} Desafio}
#1
\end{chalengebox}}
\newcommand{\FNada}[1]{#1}
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
% permite que o comando \underline{\hspace{.1in}} escreva um underline
%%
\definecolor{mygray}{rgb}{0.4,0.4,0.4}
\definecolor{mygreen}{RGB}{2, 145, 19}
\definecolor{myblue}{RGB}{2, 109, 170}
\lstset{
basicstyle=\ttfamily\color{black},
commentstyle=\color{mygray},
numbers=left,
numbersep=10pt,
numberstyle=\small\color{mygray},
keywordstyle=\color{myblue},
showspaces=false,
showstringspaces=false,
stringstyle=\color{mygreen},
tabsize=2
}
\setlength{\headheight}{15pt} %aumenta o tamanho do header