%%% ====================================================
%%% @LaTeX-file{
%%%    filename  = "PORANDU.cls",
%%%    date      = "09/10/2010",
%%%    author    = "Pedro F. S. Othechar",
%%%    abstract  = "This is a LaTeX documentclass for volumes of PORANDU.",
%%% }
%%% ====================================================

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{PORANDUf}


\LoadClass[10pt, a4paper, twoside]{article}
\setlength{\textwidth}{12.7cm}
\setlength{\textheight}{19.0cm}
\setlength{\topmargin}{0cm}
\setlength{\oddsidemargin}{1.61cm}
\setlength{\evensidemargin}{1.61cm}

\renewcommand{\encodingdefault}{T1}


\usepackage[brazil]{babel}
%\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fancyhdr}
\usepackage{graphics}
\usepackage[dvips,dvipdfm]{graphicx}
\usepackage{epsfig}
\usepackage{subfigure}
\usepackage{amsmath,latexsym,amsfonts,amssymb,amsthm}
\usepackage{indentfirst}
\usepackage{url}
\usepackage{textcomp}
\usepackage[table,xcdraw]{xcolor}

\newcommand{\newsec}[1]{\section{#1}\setcounter{equation}{0} 
                                    \setcounter{teorema}{0}
                                    \setcounter{lema}{0} 
                                    \setcounter{defi}{0} 
                                    \setcounter{prop}{0} 
                                                                        \setcounter{coro}{0}
                                                                        \setcounter{obs}{0}
                                                                        } 
                                    
\newtheorem{teorema}{Teorema}
\renewcommand{\theteorema}{\arabic{section}.\arabic{teorema}}

\newtheorem{lema}{Lema}
\renewcommand{\thelema}{\arabic{section}.\arabic{lema}}

\newtheorem{prop}{Proposição}
\renewcommand{\theprop}{\arabic{section}.\arabic{prop}}

\newtheorem{defi}{Definição}
\renewcommand{\thedefi}{\arabic{section}.\arabic{defi}}

\newtheorem{obs}{Observação}
\renewcommand{\theobs}{\arabic{section}.\arabic{obs}}

\newtheorem{coro}{Corolário}
\renewcommand{\thecoro}{\arabic{section}.\arabic{teorema}.\arabic{coro}}

\newenvironment{dem}[1][Prova.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}

\renewenvironment{abstract}
{\begin{list}{}{%
  \setlength{\rightmargin}{0.5cm}
  \setlength{\leftmargin}{0.5cm}
  \small} 
  \item[] }
{\end{list}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\ps@headUFMS}
{ \renewcommand{\@oddhead}
  {\begin{minipage}{\textwidth}
%HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
     {\normalsize {\em }}\\
     {\normalsize {\em }} \\    
%HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
     \rule{\textwidth}{0.6pt} 
   \end{minipage}
  }
\pagestyle{fancy}
\fancyhf{}
\lhead{\includegraphics[scale=0.3]{logo.eps}}
\chead{\footnotesize{Revista de Divulga\c{c}\~{a}o Cient\'{i}fica em} \\ \footnotesize{Ci\^{e}ncias Exatas e Tecnol\'{o}gicas} \\ PORANDU\\ Vol. x, n. y, 2018, pg. z-w}
\rhead{\includegraphics[scale=0.02]{PERFIL.eps}}
%\chead{Vol. x, n. y, 2018, pg. z-w}


  \renewcommand{\@oddfoot}{}
  \renewcommand{\@evenhead}{\@oddhead}
  \renewcommand{\@evenfoot}{\@oddfoot}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\criartitulo{\par
  \begingroup
    \renewcommand\thefootnote{\@arabic\c@footnote}%
    \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
    \long\def\@makefntext##1{\parindent 1em\noindent
            \hb@xt@1.8em{%
                \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
      
      \newpage
      \global\@topnum\z@   % Prevents figures from going at top of page.
      \@criartitulo

    \thispagestyle{headUFMS}\@thanks
    \markright{\bf \small \copyright \ UFMS \\ PORANDU  }
  \endgroup
  %\setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\criartitulo\relax
  \global\let\@criartitulo\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}
\def\@criartitulo{%
  \newpage
  \null
  \vskip 0em%
  \begin{center}%
  \let \footnote \thanks
    {\LARGE \@title \par}%
  \end{center}%
    \vskip 1.5em%
    {\normalsize
      \lineskip .5em%
      \begin{minipage}[b]{\textwidth}
        \@author
      \end{minipage}\par}%
    \vskip 1em%
    %{\large \@date}%
  \par
  \vskip 1em}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%\pagestyle{myheadings}
\newcommand{\runningheads}{\markboth}
\pagestyle{myheadings}

\normalsize

\setcounter{page}{1}

\endinput
