Last active
September 19, 2016 05:09
-
-
Save gustavobittencourt/1dc80105f6095c490e4f to your computer and use it in GitHub Desktop.
LaTeX - Cabeçalho do LaTeX: Cabeçalho padrão dos meus arquivos do LaTeX, com os pacotes Natbib, versão de rascunho (pdfcomment)/final, modelos de Programação Matemática usando IEEETrantools, nomenclaturas utilizadas nas equações (pacotes nomencl e MakeIndex).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[a4paper,11pt]{article} | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
%% PACOTES E CONFIGURAÇÕES %% | |
%% Gustavo Bittencourt %% | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
% ================================ CONFIGURAÇÕES =============================== % | |
% Alterna entre a versão comentada e a versão final. | |
\def \versao{Rascunho} | |
% Gerar ou não o índice de nomenclatura | |
\def \executarmakeindex{Sim} | |
% Coloca as 4 margens com 1" de tamanho (opcional [cm] = 1,5 cm) | |
\usepackage{fullpage} | |
% --- Identar a primeira linha do parágrafo --- % | |
\usepackage{indentfirst} | |
% =================================== PACOTES ================================== % | |
% --- Comentários no PDF --- % | |
\usepackage[author={Gustavo Bittencourt}]{pdfcomment} | |
\usepackage{xcolor} | |
% --- Modelos Matemáticos (IEEtrantools) --- % | |
\usepackage{IEEEtrantools} | |
\usepackage{amsmath,amssymb} | |
\usepackage{empheq} | |
% --- Nomenclatura --- % | |
\usepackage{nomencl} | |
\usepackage{ifthen} | |
% --- Bibliografia --- % | |
\usepackage{natbib} | |
% \setlength{\bibsep}{1pt} % Diminui o espaço entre referências | |
% --- Listas e enumeradores --- % | |
\usepackage{enumitem} | |
% --- Figuras --- % | |
% Legendas para Subfiguras | |
\usepackage[font+=footnotesize]{subcaption} | |
% --- Gráficos --- % | |
% Gráficos Boxplot | |
\usepackage{pgfplots} | |
\pgfplotsset{compat=1.8} | |
\usepgfplotslibrary{statistics} | |
% --- Tabelas --- % | |
\usepackage{multirow} | |
\usepackage{booktabs} % \toprule, \midrule, \bottomrule | |
% --- Pacotes de caracteres UTF-8 e Babel --- % | |
\usepackage[utf8]{inputenc} | |
\usepackage[T1]{fontenc} | |
\usepackage[brazil]{babel} % Língua padrão: Inglês | |
% \usepackage{lmodern} % Fonte Padrão: Times New Roman (txfonts) | |
% Fontes (Texto e matemática estilo Times New Roman) | |
% \usepackage{newtxmath} | |
% \usepackage{amsfonts} | |
% =========================== COMANDOS PERSONALIZADOS ========================== % | |
% ------------------------ Configurações dos Comentários ------------------------- % | |
% \comando{texto}{comentario} | |
% ex: \duvida{texto de vermelho}{comentario do balão} | |
\def \final{Final} | |
\ifx \versao\final | |
% Se a versão do documento é a versão a ser submetida (Final) | |
\newcommand{\duvida}[2]{#1} | |
\newcommand{\info}[1]{} | |
\else | |
% Caso contrário, exibe os comentários | |
\newcommand{\duvida}[2]{\pdfmarkupcomment[markup=Highlight, color=red!80]{#1} | |
~\pdfcomment[color=red!80, icon=Help, subject=Duvida]{#2}~~~~} | |
%\newcommand{\duvida}[2]{\pdfmarkupcomment[markup=Highlight, color=red!75]{#1} | |
%~\pdfmargincomment[color=red!75, icon=Help, subject=Duvida]{#2}} | |
\newcommand{\info}[1]{\pdfcomment[color={1.0 0.93 0.49}, icon=Key, subject=Info]{#1}} | |
\fi | |
% ---------------------- Modelos Matemáticos - IEEEeqnarray ---------------------- % | |
% Definir a Tag para o pacote IEEEeqnarray | |
% Referenciar alguma equação já apresentada em um modelo anterior | |
% ex: \ztag{\ref{eq:DI-Simp-NãoNegatividade}a} | |
\makeatletter | |
\newcommand\ztag[1]{% | |
\def\@currentlabel{#1}% | |
\gdef\tmp{% | |
\addtocounter{equation}{-1}% | |
\def\theequation{#1}}% | |
\aftergroup\aftergroup\aftergroup\aftergroup\aftergroup\aftergroup | |
\aftergroup\aftergroup\aftergroup\aftergroup\aftergroup\aftergroup | |
\aftergroup\aftergroup\aftergroup\aftergroup\aftergroup\aftergroup | |
\aftergroup\aftergroup\aftergroup\aftergroup\aftergroup\aftergroup | |
\aftergroup\aftergroup\aftergroup\aftergroup\aftergroup\aftergroup | |
\aftergroup | |
\tmp} | |
\makeatother | |
% Distância entre equações no IEEEeqnarray | |
\renewcommand*{\IEEEeqnarraydecl}{% | |
\setlength{\jot}{2\IEEEnormaljot}% twice the normal value of \jot | |
} | |
% Colunas do IEEEeqarray | |
\IEEEeqnarraydefcol{A}{\hspace{-4cm}\hfil$\IEEEeqnarraymathstyle}{$} | |
\IEEEeqnarraydefcol{B}{\hspace{1cm}\hfil$\IEEEeqnarraymathstyle}{$} | |
% --------------------------------- Nomenclatura --------------------------------- % | |
% Define "Nomenclature" como uma subseção. | |
%\renewcommand{\nomname}{\subsection{Nomenclature}} | |
\renewcommand{\nomname}{} | |
% Separação entre os ítens da nomenclatura | |
\setlength{\nomitemsep}{-\parsep+0.3em} | |
% Centraliza os labels de nomenclatura | |
\renewcommand{\nomlabel}[1]{\phantom{\qquad}\hfil#1\hfil} | |
% Define e formata cada uma das subcategorias de símbolos e termos citados | |
% OBS: Não são aceitos caracteres UTF-8. Logo, "Índices" deve ser escrito como \'Indices | |
\newcommand{\nomtexto}[1]{\item[\small\textbf{#1}\hfill]} | |
\renewcommand{\nomgroup}[1]{% | |
\ifthenelse{\equal{#1}{I}}{\nomtexto{\'Indices e Conjuntos}}{% | |
\ifthenelse{\equal{#1}{P}}{\smallskip\nomtexto{Par\^ametros}}{ | |
\ifthenelse{\equal{#1}{V}}{\smallskip\nomtexto{Vari\'aveis}}{}}}} | |
% -- Gerar Nomenclatura em duas colunas -- % | |
\usepackage{multicol} | |
\makeatletter | |
\@ifundefined{chapter} | |
{\def\wilh@nomsection{section}} | |
{\def\wilh@nomsection{chapter}} | |
\def\thenomenclature{% | |
\begin{multicols}{2}[% | |
\csname\wilh@nomsection\endcsname*{\nomname} | |
\if@intoc\addcontentsline{toc}{\wilh@nomsection}{\nomname}\fi | |
\nompreamble] | |
\list{}{% | |
\labelwidth\nom@tempdim | |
\leftmargin\labelwidth | |
\advance\leftmargin\labelsep | |
\itemsep\nomitemsep | |
\let\makelabel\nomlabel}% | |
} | |
\def\endthenomenclature{% | |
\endlist | |
\end{multicols} | |
\nompostamble} | |
\makeatother | |
% Executar o comando \write18, para executar o Makeindex dentro do LaTeX | |
% OBS: o comando \write18 exige que o modo shell escape esteja habilitado, o que | |
% permite que comandos externos sejam executados no latex. Além disso, o comando para | |
% compilação a seguir deve ser executado duas vezes, a fim de gerar o index: | |
% pdflatex -shell-escape -interaction=nonstopmode -synctex=1 arquivo.tex | |
\ifthenelse{\equal{\executarmakeindex}{Sim}} | |
{\immediate\write18{makeindex \jobname.nlo -s nomencl.ist -o \jobname.nls}}{} | |
% Gerar a nomenclatura (Após o MakeIndex, caso ele seja executado novamente) | |
\makenomenclature | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
% TEXTO % | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
\title{Template - Cabeçalho} | |
\author{Gustavo~Cunha~de~Bittencourt} | |
\date{\today} | |
\begin{document} | |
\maketitle | |
\section{Introdução} | |
\label{Introdução} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment