Skip to content

Commit

Permalink
adds new commands to extra_functions.sty
Browse files Browse the repository at this point in the history
- improves the description of package.tex and extra_functions.sty in the readme file.
- adds new commands to extra_functions.sty and moves newcommands from package.tex to extra_functions.sty .
  • Loading branch information
FilipeMar committed Nov 30, 2017
1 parent 8392366 commit dd4e299
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 36 deletions.
20 changes: 7 additions & 13 deletions 00.Definitions/packages.tex
Original file line number Diff line number Diff line change
Expand Up @@ -171,23 +171,10 @@
% Set paragraph counter to alphanumeric mode
\renewcommand{\theparagraph}{\Alph{paragraph}~--}

\newcommand{\figref}[1]{Figure \ref{#1}}
\newcommand{\equationref}[1]{Equation (\ref{#1})}
\newcommand{\tableref}[1]{Table (\ref{#1})}

\newcommand{\textreg}{$\textsuperscript{\textregistered}$}


\usepackage{enumitem} % para set list
\usepackage{algpseudocode} % algorithmic pseudocode
\usepackage[chapter]{algorithm}

\usepackage{siunitx}
\sisetup{load-configurations = abbreviations}
% declares extra units
\DeclareSIUnit\Mtoe{\mega \tonne oe} % use: \SI{100}{\Mtoe}
\DeclareSIUnit\GWh{GWh} % use: \SI{100}{\GWh} (not \GW\hour = GW h )

\usepackage{scrextend}
\usepackage{marginnote}%temporary notes at the margin
\usepackage{multicol} %multiple columns environment
Expand All @@ -196,6 +183,13 @@
{\par\medskip\noindent\minipage{\linewidth}}
{\endminipage\par\medskip}

\usepackage{siunitx}
\sisetup{load-configurations = abbreviations}
%%% -------------------- declares extra units
\DeclareSIUnit\Mtoe{\mega \tonne oe} % use: \SI{100}{\Mtoe}
\DeclareSIUnit\GWh{GWh} % use: \SI{100}{\GWh} (not \GW\hour = GW h )
%%% -------------------------------------------------

\usepackage{wrapfig} % to wrap text around small figures
\usepackage{chemformula} % for chemical formulae : http://mirrors.fe.up.pt/pub/CTAN/macros/latex/contrib/chemformula/chemformula_en.pdf
\usepackage{dcolumn} %dcolumns in tables : https://en.wikibooks.org/wiki/LaTeX/Tables#Defining_multiple_columns
63 changes: 61 additions & 2 deletions 00.extra_functions.sty
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%%
%% This is file 'extra_functions.sty',
%%
%% AUTHOR: Pedro Tomás
%% v2.0 : authors : Pedro Tomás (version 1.0), Filipe Marques
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{00.extra_functions}
Expand Down Expand Up @@ -122,6 +122,65 @@
\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{\algoref}[1]{algorithm~(\ref{#1})}
\newcommand{\algpgref}[1]{algorithm~\ref{#1} (see page~\pageref{#1})}
\newcommand{\pagref}[1]{page \pageref{#1}}

\endinput
29 changes: 19 additions & 10 deletions README.EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,34 @@ When the thesis is written in english, the main file tese.tex must have:

* apropriate selection of the language after %% Use Main document Language -> \selectlanguage{english}

You need to edit the [cover](https://github.com/FilipeMar/ThesisIST/blob/master/0.Inicio/1.cover_EN_draft.tex) and the personal info in the [main file](https://github.com/FilipeMar/ThesisIST/blob/master/tese.tex).

LaTeX Packages
--------------

To add or change packages, you can edit the file `00.Definitions/packages.tex` .
[`00.Definitions/packages.tex`](https://github.com/FilipeMar/ThesisIST/blob/master/00.Definitions/packages.tex) contains the LaTeX packages used in the template.
You can edit the file to add the packages you need.

The file [`00.extra_functions.sty`](https://github.com/FilipeMar/ThesisIST/blob/master/00.extra_functions.sty) contains the definition of some custom commands.
You can edit it to add your own custom commands.

The files `00.listofsymbols.sty` e `00.symlist.sty` define more extra commands.

Extra Functions
------------
#### Figures, Floats, and Captions

Edit file `00.extra_functions.sty`, or `00.listofsymbols.sty`, or `00.symlist.sty`.
* [Wiki LaTeX Floats,_Figures_and_Captions.](https://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions)

Figures, Floats, and Captions
------------

Pls see [Wiki LaTeX Floats,_Figures_and_Captions.](https://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions).
#### Glossary / Notation / Acronyms

* [Wiki LaTeX Glossary.](https://en.wikibooks.org/wiki/LaTeX/Glossary)

Glossary / Glossário / Notação / Acrónimos
-----------
#### Units

Pls see [Wiki LaTeX Glossary.](https://en.wikibooks.org/wiki/LaTeX/Glossary).
The file [`00.Definitions/packages.tex`](https://github.com/FilipeMar/ThesisIST/blob/master/00.Definitions/packages.tex) contains at its bottom, a section with the declaration of new units.
*Examples:*
`\DeclareSIUnit\Mtoe{\mega \tonne oe}`, use in text: `\SI{100}{\Mtoe}`

`\DeclareSIUnit\GWh{GWh}`, use in text: `\SI{100}{\GWh}`

For more information, please read the [package documentation](ftp://ftp.dante.de/ctan%3A/macros/latex/exptl/siunitx/siunitx.pdf).
32 changes: 21 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,38 @@ No caso de a tese ser escrita em português, o ficheiro principal tese.tex deve

* selecção da linguagem após o %% Use Main document Language -> \selectlanguage{portuguese}

*No caso de ser escrita em inglês, ver a versão deste documento em* [English](https://github.com/FilipeMar/ThesisIST/README.EN.md ).
*No caso de ser escrita em inglês, ver a versão deste documento em* [English](https://github.com/FilipeMar/ThesisIST/blob/master/README.EN.md ).

Tens de editar a [capa](https://github.com/FilipeMar/ThesisIST/blob/master/0.Inicio/1.cover_PT_draft.tex) e adicionar a informação pessoal nos espaços respectivos no [main file](https://github.com/FilipeMar/ThesisIST/blob/master/tese.tex).

LaTeX Packages
--------------

Editar ficheiro `00.Definitions/packages.tex` .
O ficheiro [`00.Definitions/packages.tex`](https://github.com/FilipeMar/ThesisIST/blob/master/00.Definitions/packages.tex) contém os pacotes usados pelo template.
Podes edita-lo para acrescentar pacotes extra consoante as tuas necessidades.

O ficheiro [`00.extra_functions.sty`](https://github.com/FilipeMar/ThesisIST/blob/master/00.extra_functions.sty) contém a definição de alguns comandos extra personalizados.
Podes editá-lo para acrescentar os teus comandos personalizados.

Os ficheiros `00.listofsymbols.sty` e `00.symlist.sty` definem mais comandos extra.

#### Figures, Floats, and Captions

Funções extra
------------
Ver [Wiki LaTeX Floats,_Figures_and_Captions.](https://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions)

Editar ficheiro `00.extra_functions.sty`, ou `00.listofsymbols.sty`, ou `00.symlist.sty`.

#### Glossário / Notação / Acrónimos

Figures, Floats, and Captions
------------
Ver [Wiki LaTeX Glossary.](https://en.wikibooks.org/wiki/LaTeX/Glossary)

Ver [Wiki LaTeX Floats,_Figures_and_Captions.](https://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions).
#### Unidades

O ficheiro [`00.Definitions/packages.tex`](https://github.com/FilipeMar/ThesisIST/blob/master/00.Definitions/packages.tex) contém uma secção para a declaração de unidades novas no final do ficheiro.
*Exemplos:*
`\DeclareSIUnit\Mtoe{\mega \tonne oe}`, uso no texto: `\SI{100}{\Mtoe}`

Glossary / Glossário / Notação / Acrónimos
-----------
`\DeclareSIUnit\GWh{GWh}`, uso no texto: `\SI{100}{\GWh}`

Ver [Wiki LaTeX Glossary.](https://en.wikibooks.org/wiki/LaTeX/Glossary).
Para informação mais completa, ver a [documentação](ftp://ftp.dante.de/ctan%3A/macros/latex/exptl/siunitx/siunitx.pdf).


Binary file modified tese.pdf
Binary file not shown.

0 comments on commit dd4e299

Please sign in to comment.