-
Notifications
You must be signed in to change notification settings - Fork 0
/
ComplexCommands.tex
126 lines (113 loc) · 3.12 KB
/
ComplexCommands.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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Cover page
\makeatletter
\newlength{\imagewidth}
\newlength{\imageheight}
\newlength{\imagesize}
\setlength\imageheight{20mm}
\setlength\imagewidth{12.5mm}
\setlength\imagesize{21.9mm}
\newcommand{\makeipnheader}{
\begin{minipage}[t]{\textwidth}
\begin{minipage}{\imagesize}
\includegraphics[
width=\imagewidth,
height=\imageheight,
keepaspectratio
]{logos/IPN.png}
\newline
\raggedright\footnotesize{DTA-PPT-01}
\end{minipage}
\hfill
\begin{minipage}{\dimexpr\linewidth - 2\imagesize\relax - \imagewidth}
\bgroup
\scshape
\begin{center}
\fontsize{12pt}{12pt}\selectfont
\textbf{INSTITUTO POLITÉCNICO NACIONAL}\\
\fontsize{9pt}{9pt}\selectfont
UNIDAD PROFESIONAL INTERDISCIPLINARIA EN INGENIERÍA Y TECNOLOGÍAS AVANZADAS\\
\fontsize{10pt}{10pt}\selectfont
\textbf{PROTOCOLO}\\
\fontsize{14pt}{14pt}\selectfont
\textbf{INGENIERÍA EN ENERGÍA}
\end{center}
\egroup
\end{minipage}
\hfill
\begin{minipage}{\imagesize}
\includegraphics[
width=\imagesize,
height=\imageheight,
keepaspectratio
]{logos/UPIITA.png}
\end{minipage}
\end{minipage}
}
\makeatother
\makeatletter
\newenvironment{coverpage}{%
\newgeometry{
top=10mm,
left=20mm,
right=20mm,
headsep=0pt,
headheight=27mm,
footskip=7mm,
includehead
}
\thispagestyle{fancycover}
}
{
\vfill
\newpage
\restoregeometry
\pagestyle{generalfancy}
}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Math conditions
% Usage
%\begin{conditions} key & description \end{conditions}
\newenvironment{conditions}
{\par\vspace{\abovedisplayskip}\noindent\begin{tabular}{>{$}l<{$} @{${}:{}$} l}}
{\end{tabular}\par\vspace{\belowdisplayskip}}
% Usage
%\begin{conditions*} key & symbol & description \end{conditions*}
\newenvironment{conditions*}
{\par\vspace{\abovedisplayskip}\noindent
\tabularx{\columnwidth}{>{$}l<{$} @{}>{${}}c<{{}$}@{} >{\raggedright\arraybackslash}X}}
{\endtabularx\par\vspace{\belowdisplayskip}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% abstract
\makeatletter
\renewenvironment{abstract}{%
\if@twocolumn
\chapter*{\abstractname}%
\else %% <- here I've removed \small
\begin{center}%
{\normalfont\fontsize{16}{15}\bfseries\abstractname\vspace{\z@}}
\end{center}%
\quotation
\fi
}
{
\if@twocolumn\else\endquotation\fi
}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Table
% tabularray permite envolver el contenido de una
% celda en un comando o environment. Este comando
% se usa para celdas que incluyen tikz como parte de
% su contenido. Véase la metodología para un ejemplo de uso
% To create cells wrapped by commands
\NewDocumentCommand{\adjusttikzpic}{m}{%
\adjustbox{valign=m}{%
\inputtikz{#1}
}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%