-
Notifications
You must be signed in to change notification settings - Fork 1
/
proteco.sty
153 lines (124 loc) · 5.11 KB
/
proteco.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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% Basic packages %%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[spanish]{babel}
\usepackage{graphicx}
\usepackage{titlesec} % Changes the section titles properties
\usepackage{enumitem} % Controls the item position
\usepackage{listings} % Package for code fences
\usepackage{xcolor} % Create colors
\usepackage{array} % Align fix size columns in tables
\usepackage{fancyhdr} % Configure the header and footer
\usepackage[export]{adjustbox} % Allows to resize tables, and changes
% image baseline
\usepackage{marginnote}
\usepackage{multicol}
\usepackage{ifthen} % Use if and boolean commands
%\usepackage[top=2cm,left=2cm,right=2cm,bottom=3cm,landscape]{geometry}
\usepackage[total={16cm,24cm},top=2cm,left=2cm]{geometry}
\usepackage{amsmath}
\usepackage{amssymb} % Math symbols such as semijoin
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% For TESTING %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{lipsum} % Adds random text
\usepackage{layout}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% 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,upquote=true}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% Header Style %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagestyle{fancy} % Puts some heading style
\fancyhf{} % Cleaning default header impl
\rhead{
\begin{tabular}{r}
Proteco \\
\LaTeX 2021-2
\end{tabular}
\includegraphics[height=2\baselineskip,valign=c]{unam-negro}
}
\lhead{\rightmark}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% Overwriting some variables %%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\parskip=2mm
\parindent=0em
\headheight=20mm
\marginparwidth=2cm
\marginparsep=7mm
\setlength{\headsep}{0.2in} % Changing headsep length
\renewcommand{\headrulewidth}{0pt}
\setlength{\columnsep}{9mm}
%\addtolength{\textwidth}{-18mm}
\decimalpoint% % Use dot instead of comma to write
\titleformat*{\section}{\large\bfseries} % Change section size
\renewcommand{\familydefault}{\sfdefault} % Changing font
% 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}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% My commands %%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\coverpage}{
\thispagestyle{empty}
\begin{minipage}[t][5cm][t]{0.2\linewidth}
\centering
\includegraphics[width=2.5cm]{unam-negro}
\newline \newline
\vspace{8mm}
\rule{2pt}{0.6\textheight}
\rule{2pt}{0.6\textheight}
\newline
\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{\titleref}}\\
\end{center}
\vspace{3.3cm}
\large{\textbf{Alumno:} \authorref} \\[1.5cm]
\begin{flushright}
\dateref
\end{flushright}
\end{minipage}
\newpage
}
\let\authorref\@author
\let\titleref\@title
\let\dateref\@date