-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemplate-for-report-v1.tex
executable file
·255 lines (219 loc) · 8.43 KB
/
template-for-report-v1.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
\documentclass{article}
\usepackage[utf8]{inputenc} % Use uft8 enconding to have a wide
% number of symbols available
\usepackage[spanish]{babel} % Configure the text language
% to know where to put the hyphen in a
% line break
\usepackage{graphicx} % To include images
\usepackage{anysize} % Allows marginsize command
\usepackage{fancyhdr} % Configure the header and footer
\usepackage{titlesec} % Changes the section titles properties
\usepackage{amsmath} % Active wide number of math symbols
\usepackage{amssymb} % Math symbols such as semijoin
\usepackage{longtable} % Multiple-page table
\usepackage[export]{adjustbox} % Allows to resize tables
\usepackage{enumitem} % Controls the item position
\usepackage{listings} % Package for code fences
%\usepackage{xcolor} % Create colors
\usepackage[
table,
svgnames,
dvipsnames
]{xcolor} % Colors for code fences and
%table (rowcolor)
\usepackage{textcomp} % Helps to display quotes symbols properly
\usepackage{array} % Align fix size columns in tables
\decimalpoint% % Use dot instead of comma to write
% decimal numbers
\setlength{\parindent}{0in} % No indentation at first paragraph
\renewcommand{\familydefault}{\sfdefault} % Changing font
\titleformat*{\section}{\large\bfseries} % Change section size
\marginsize{1.5cm}{2cm}{1.2cm}{1cm} % {left}{right}{above}{below}
\setlength{\headsep}{0.3in} % Changing headsep length
% headsep is the vertical length
% between header an text area
\lstset{upquote=true} % For display quotes and double
% quoutes in a better style
% Defining column content alignment for fix size columns
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% Code style %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{1,1,1}
\lstdefinestyle{mystyle}{
backgroundcolor=\color{backcolour},
commentstyle=\color{codegreen},
keywordstyle=\color{magenta},
numberstyle=\tiny\color{codegray},
stringstyle=\color{codepurple},
%
basicstyle=\ttfamily\footnotesize,
captionpos=b,
breakatwhitespace=false,
breaklines=true,
keepspaces=true,
showspaces=false,
showstringspaces=false,
showtabs=false,
%
tabsize=2
% Diplay number to the left
% numbers=left,
% numbersep=5pt,
}
\lstset{style=mystyle}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% Header Style %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
% Right header
% The right header has
% the subject title,
% subtitle and
% the university logo
\fancyhead[R]{
\begin{tabular}{l}
\materia \\
\actividad%
\end{tabular}
\,% Adding space between titles and logo
\rule[-1.75\baselineskip]{0pt}{0pt}
% Strut to ensure a 1/4 \baselineskip between image and header rule
\includegraphics[height=3\baselineskip,valign=c]{unam-negro}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% Cover page generator command %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\coverPage}{
\thispagestyle{empty}
\begin{minipage}[t][5cm][t]{0.2\linewidth}
\includegraphics[width=2.5cm]{unam-negro}
\vspace{10cm}
% The following space is mandatory to display correct layout
\includegraphics[width=2.5cm]{fi-negro}
\end{minipage}
%
\begin{minipage}[t]{0.7\linewidth}
\vspace{-2.5cm}
\LARGE{\textbf{\university}}\\
\Large{\textbf{\faculty}} \\
\large{\semestre}\\[2cm]
\large{\textbf{\materia (\clave)}}\\
\large{\textbf{Gpo: \grupo}}\\[5mm]
\large{\textbf{Profesor:} \profesor}\\ [1.5cm]
\begin{center}
\LARGE{\textbf{\actividad}}\\
\LARGE{\textbf{\titulo}}\\
\end{center}
\vspace{3.3cm}
%\large{\textbf{Alumno:} \alumno} \\[1.5cm]
\large{
\begin{itemize}[ noitemsep, align=left ]
\item [\textbf{Alumno(s):}]
\begin{flushright}
\alumno
\end{flushright}
\end{itemize}
} \vspace{1.5cm}
\begin{flushright}
\fechaEntrega%
\end{flushright}
\end{minipage}
\newpage
}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% Variables definition %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\university}{Universidad Nacional Autónoma de México}
\newcommand{\faculty}{Facultad de Ingeniería}
\newcommand{\semestre}{2021-1}
\newcommand{\materia}{BDD}
\newcommand{\clave}{294}
\newcommand{\grupo}{1}
\newcommand{\profesor}{Ing. Rodriguez Campos \textsc{Jorge Alberto}}
%\newcommand{\alumno}{Francisco Pablo \textsc{Rodrigo}}
\newcommand{\alumno}{
Francisco Pablo \textsc{Rodrigo} \\
Flores Martinez \textsc{Emanuel}
}
\newcommand{\actividad}{Proyecto Final}
\newcommand{\titulo}{BDD empleada para administrar ventas de autos}
\newcommand{\fechaEntrega}{}
\newcommand{\codedir}{codigo}
\graphicspath{ {latex/assets/}{bdd_proyecto.assets/}{modelo} }
\coverPage%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% Contents %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Tabla de asignación de sitios}
\newcounter{nodeCounter}
\newcommand{\nameTabBuilder}[1]{F\_RFP\_#1}
\newcommand{\snI}{RFP\_S1}
\newcommand{\snII}{RFP\_S2}
\newcommand{\snIII}{EFM\_S1}
\newcommand{\snIV}{EFM\_S2}
\newcommand{\pdbI}{rfpbd\_s1.fi.unam}
\newcommand{\pdbII}{rfpbd\_s2.fi.unam}
\newcommand{\pdbIII}{efmbd\_s1.fi.unam}
\newcommand{\pdbIV}{efmbd\_s2.fi.unam}
{
\setlength\tabcolsep{3.5mm}
\def\arraystretch{2} % Do not define globally (for that reason we
% enclose table inside brackets)
\begin{longtable}{
|C{0.05\linewidth}
|p{0.5\linewidth}
|C{0.2\linewidth}
|p{0.1\linewidth}|}
\hline
%%%%% Start: Table header
\textbf{Núm. nodo} &
\textbf{Características} &
\textbf{Nombre global del PDB} &
\parbox[t]{2cm}{\centering \textbf{Sufijo para fragmentos}}
\\ \hline
%%%%% End: Table header
%
% row 1
\stepcounter{nodeCounter} \arabic{nodeCounter} &
Se encuentra en la región AME y es el servidor con la mayor capacidad
de procesamiento &
\pdbI &
\snI
\\ \hline
%
% row 2
\stepcounter{nodeCounter} \arabic{nodeCounter} &
Se encuentra en la región EUR &
\pdbII &
\snII
\\ \hline
%
% row 3
\stepcounter{nodeCounter} \arabic{nodeCounter} &
Cuenta con una VPN que conecta al servidor con las oficinas de los dueños de
la empresa, así como herramientas para cifrado de datos. Se encuentra en las
oficinas centrales de la empresa en USA. &
\pdbIII &
\snIII
\\ \hline
%
% row 4
\stepcounter{nodeCounter} \arabic{nodeCounter} &
Cuenta con herramientas para realizar procesamiento de contenido multimedia.
Así como una gran capacidad de almacenamiento. Se encuentra en las oficinas
centrales de la empresa en USA. &
\pdbIV &
\snIV
\\ \hline
\end{longtable}
}
\end{document}