%% LateX Style for etaps daily journal
%% (copyleft) Jose Joao Almeida (jj@di.uminho.pt)

\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{etaps}[2007/01/06 v0.01 Basic class for daily news]
\RequirePackage{fancyhdr,graphicx,framed,pstricks}

\usepackage[a4paper,left=1.2cm,right=1.2cm,top=1.2cm,nofoot,bottom=1.2cm]{geometry}

% \newrgbcolor{DarkOrange}{1 .498 0}
% \newrgbcolor{DarkGrey}{.3 .3 .3}

\setlength{\columnsep}{8mm}
\parskip 2mm
\parindent 0mm

\def\thesubtitle{}
%\def\thetitle{\includegraphics[width=0.6\textwidth]{etapsdaily}\vspace{-14mm}}
\def\thetitle{\includegraphics[width=\textwidth]{etapsdaily}
 \vspace{-15mm}\mbox{}
%\vspace{-16mm}
}

\newcommand{\subtitle}[1]{\def\thesubtitle{#1}}
\renewcommand{\title}[1]{\def\thetitle{#1}}
\renewcommand{\author}[1]{\def\theauthor{#1}}
%%\renewcommand{\number}[1]{\def\theauthor{Number #1}}
\renewcommand{\date}[1]{\def\thedate{#1}}
\renewcommand\maketitle{\par
  \begingroup
    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
    \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
    \long\def\@makefntext##1{\parindent 1em\noindent
            \hb@xt@1.8em{%
                \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
        %\twocolumn[\@maketitle]%
        \@maketitle%
    \thispagestyle{empty}\@thanks
  \endgroup
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@maketitle\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\@maketitle{\vskip -40mm
  \begin{center}
    \huge{\textsf{\textbf{\thetitle}}}\\
    \large{\textsf{\textbf{\thesubtitle}}}\\[1mm]
    \normalfont 
    \begin{tabular}{p{.5\textwidth}p{.45\textwidth}}
      \begin{minipage}{.5\textwidth}
        \textsf{\textbf{\theauthor}}\hfill Universidade do Minho, 
      \end{minipage}
      &
      \begin{minipage}{.45\textwidth}
%        \begin{flushright}
          Braga \hfill 
          \textsf{\textbf{\thedate}}
%        \end{flushright}
      \end{minipage}
    \end{tabular}
    \vskip -4mm
    \rule{\textwidth}{2pt}
  \end{center}
  \vskip 2mm
}

\renewcommand\section{\@startsection{section}{1}{0pt}%
   {3mm}{1mm}{\Large\sffamily\bfseries}}

\renewcommand\subsection{\@startsection{subsection}{2}{0pt}%
   {3mm}{1mm}{\large\sffamily\bfseries}}

\renewcommand\subsubsection{\@startsection{subsubsection}{3}{0pt}%
   {3mm}{1mm}{\sffamily\bfseries}}


\newenvironment{block}[1]{
  \begin{framed}
    \subsection*{\vskip -1cm\noindent#1}
    \small\it
}{\end{framed}}

\renewcommand\labelitemi{\footnotesize$\m@th\bullet$ }
\renewcommand\labelitemii{\normalfont\bfseries -- }

\def\@listI{\leftmargin \leftmargini
            \parsep 2\p@ \@plus1\p@ \@minus\p@
            \topsep 0\p@ \@plus2\p@ \@minus4\p@
            \itemsep 0\p@}
\let\@listi\@listI
\@listi
\def\@listii {\leftmargin \leftmarginii
              \labelwidth \leftmarginii
              \advance\labelwidth-\labelsep
              \topsep    0\p@ \@plus2\p@ \@minus\p@}
\def\@listiii{\leftmargin \leftmarginiii
              \labelwidth\leftmarginiii
              \advance\labelwidth-\labelsep
              \topsep    0\p@ \@plus\p@\@minus\p@
              \parsep    \z@
              \partopsep \p@ \@plus\z@ \@minus\p@}

\leftmargini 1.2em
\leftmarginii 1.2em
\leftmarginiii 1.2em
\leftmarginiv 1.2em
\leftmarginv 1.2em
\leftmarginvi 1.2em
\leftmargin\leftmargini

\renewenvironment{abstract}{\begin{block}{\abstractname}}{\end{block}}
\pagestyle{empty}
%\twocolumn
\sloppy
\flushbottom


\endinput


