forked from themiguelamador/ThesisIST
-
Notifications
You must be signed in to change notification settings - Fork 1
/
00.extra_functions.sty
190 lines (166 loc) · 6.1 KB
/
00.extra_functions.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
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
%%
%% This is file 'extra_functions.sty',
%%
%% v2.0 : authors : Pedro Tomás (version 1.0), Filipe Marques
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{00.extra_functions}
% These packages are required for the \fancychapter
\usepackage[nohints]{minitoc}
\setcounter{minitocdepth}{1}
\setlength{\mtcindent}{24pt}
\renewcommand{\mtcfont}{\small\rm}
\renewcommand{\mtcSfont}{\small\bf}
\usepackage{bbm}
\RequirePackage{color}
\definecolor{chaptergrey}{rgb}{0.6,0.6,0.6}
\@ifundefined{verbatim@processline}{\RequirePackage{verbatim}}{}
\def\boxedverbatim{%
\def\verbatim@processline{%
{\setbox0=\hbox{\the\verbatim@line}%
\hsize=\wd0 \the\verbatim@line\par}}%
\@minipagetrue%%%DPC%%%
\@tempswatrue%%%DPC%%%
\setbox0=\vbox\bgroup\vspace*{0.2cm}\footnotesize\verbatim
}
\def\endboxedverbatim{%
\endverbatim
\unskip\setbox0=\lastbox %%%DPC%%%
\hspace*{0.2cm}
\vspace*{-0.2cm}
\egroup
\fbox{\box0}% <<<=== change here for centering,...
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%separate "abstract"%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand*{\titulo}[1]{\th@StoreIn{\th@titulo}{#1}}
\newcommand*{\th@titulo}{\relax} % command is optional
\newenvironment{abstract_separate}{
\thispagestyle{empty}
{\hspace*{18\p@}}\\
{\hspace*{18\p@} \bfseries Title:~} \@title \vspace*{2cm}\\
{\hspace*{18\p@} \bfseries Abstract:}
\begin{justify}
}{
\end{justify}
}
\newenvironment{keywords_separate}{
{\hspace*{18\p@}}\\
{\hspace*{18\p@} \bfseries Keywords:}
\begin{justify}
}{
\end{justify}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%separate "resumo"%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newenvironment{resumo_separado}{
\thispagestyle{empty}
{\hspace*{18\p@}}\\
{\hspace*{18\p@} \bfseries T\'itulo:~} \th@titulo\\
{\hspace*{18\p@} \bfseries Nome:~} \@author \vspace*{1cm}\\
{\hspace*{18\p@} Curso de Doutoramento em: Engenharia Electrot\'{e}cnica e de Computadores} \\
{\hspace*{18\p@} Orientador:~} \th@supervisor\\
\ifthenelse{\equal{\th@othersupervisor}{\relax}}{\relax}{{\hspace*{18\p@} Co-orientador:~}\th@othersupervisor\\}
{\hspace*{18\p@} Provas conclu\'idas em:~\vspace*{1.5cm}\\}
{\hspace*{18\p@} \bfseries Resumo:}
\begin{justify}
}{
\end{justify}
}
\newenvironment{palavraschave_separate}{
{\hspace*{18\p@}}\\
{\hspace*{18\p@} \bfseries Palavras Chave:}
\begin{justify}
}{
\end{justify}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%end separates
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand*{\chapnumfont}{%
% \usefont{T1}{\@defaultcnfont}{b}{n}\fontsize{100}{130}\selectfont%
\usefont{T1}{pbk}{b}{n}
\fontsize{150}{130}
\selectfont
\color{chaptergrey}
}
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
{\chapnumfont\ifnum \c@secnumdepth >\m@ne
% \huge\bfseries \@chapapp\space \thechapter
\raggedleft\bfseries \thechapter
\par\nobreak
\vskip 20\p@
\fi}
\interlinepenalty\@M
{\raggedleft\Huge \bfseries #1\par\nobreak}
\vskip 40\p@
}}
\newcommand{\fancychapter}[1]{\chapter{#1}\vfill\minitoc\pagebreak}
% This commmand allows to place horizontal lines with a custom width... replaces the standard hline command
\newcommand{\hlinew}[1]{%
\noalign{\ifnum0=`}\fi\hrule \@height #1 \futurelet
\reserved@a\@xhline}
% This command defines some marks... See the table in chapter 5.
\def\Mark#1{\raisebox{0pt}[0pt][0pt]{\textsuperscript{\footnotesize\ensuremath{\ifcase#1\or *\or \dagger\or \ddagger\or%
\mathsection\or \mathparagraph\or \|\or **\or \dagger\dagger%
\or \ddagger\ddagger \else\textsuperscript{\expandafter\romannumeral#1}\fi}}}}
% ------------- Comandos Personalizados (Filipe Marques)
% integrais :
\newcommand{\oiint}{\bigcirc \hspace{-1.3em} \int \hspace{-.9em} \int}
\newcommand{\oiiint}{\bigcirc \hspace{-1.4em} \int \hspace{-0.93em} \int \hspace{-.9em} \int}
%\newcommand{\degree}{^{\circ}} %already defined , ver pacote unitx
\newcommand{\Cel}{~^{\circ}\mathrm{C}}
\newcommand{\cel}{~^{\circ}\mathrm{C}}
\newcommand{\equivalente}{\Leftrightarrow}
\newcommand{\cita}[1]{{\footnotesize \cite{#1}}} % citações mini
\newcommand{\mcaud}{\dot{\mathcal{M}}}
\newcommand{\mflow}{\dot{m}}
\newcommand{\normal}{\mathbf{n}}
\newcommand{\xfrac}{\mathcal{X}}
\newcommand{\nh}{NH_3}
%%%% Na CAT
%%Página de Título
%\usepackage{setspace} %setting line space
%
%\newcommand{\HRule}{\rule{\linewidth}{0.5mm}} %comando para as linhas da página de título
%
%%-------------------------------------------
%\newenvironment{proof}[1][Proof]{\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
%
%
%
%%Titles
%\newcommand*{\TitleFont}{%
% \usefont{\encodingdefault}{\rmdefault}{b}{n}%
% \fontsize{28}{20}%40pt , 16pt -- font size
% \selectfont}
%%%%
%%% comandos para referenciação rápida :
% This commmand is for using-the-same-figure-twice-with-no-new-number
%% needs "caption" package,
%% in http://tex.stackexchange.com/questions/200211/using-the-same-figure-twice-with-no-new-number
\newcommand{\repeatcaption}[2]{%
\renewcommand{\thefigure}{\ref{#1}}%
\captionsetup{list=no}%
\caption{#2 (repeated from page~\pageref{#1})}%
}
% usage : \repeatcaption{figure:nice}{A caption} , [previous figure: \caption{A caption}\label{figure:nice}]
\newcommand{\figref}[1]{Figure \ref{#1}}
\newcommand{\equationref}[1]{Equation (\ref{#1})}
\newcommand{\tableref}[1]{Table (\ref{#1})}
\newcommand{\textreg}{$\textsuperscript{\textregistered}$}
\newcommand{\fig}[1]{Fig.~\ref{#1}}
\newcommand{\eqnref}[1]{Eq.~\eqref{#1}}
\newcommand{\tabref}[1]{Tab.~(\ref{#1})}
\newcommand{\secref}[1]{section~(\ref{#1})}
\newcommand{\sectref}[1]{section~\ref{#1}}
\newcommand{\algoref}[1]{algorithm~(\ref{#1})}
\newcommand{\algpgref}[1]{algorithm~\ref{#1} (see page~\pageref{#1})}
\newcommand{\pagref}[1]{page \pageref{#1}}
%Glossaries
\newcommand{\ignore}[1]{}
\endinput