% Macros for IC-UNICAMP commemorative plaques
% Created by Jorge Stolfi sometime in 2005-2009.
{ 
  \def\release{2010-03-08}
  \def\lastedit{2010-03-11 17:48:25 by stolfi}
  \typeout{plaque-ic.sty release {\release} last edit {\lastedit}} 
}

\ProvidesPackage{plaque-ic}
\RequirePackage{logo-ic-unicamp}
\RequirePackage{logo-unicamp}

\advance \endlinechar by -256\relax % Ignore line breaks in this package

\newcommand{\platewidth}{147mm}
\newcommand{\plateheight}{89mm}
\newcommand{\topmrg}{5.0mm}
\newcommand{\sidmrg}{5.0mm}
\newcommand{\botmrg}{5.0mm}

\newcommand{\sza}[1]{{\normalsize\sc #1}}
\newcommand{\szb}[1]{{\large\sc #1}}
\newcommand{\szc}[1]{{\Large\sc #1}}
\newcommand{\szd}[1]{{\LARGE\sc #1}}
\newcommand{\sze}[1]{{\Huge\sc #1}}
\newcommand{\szf}[1]{{\HUGE\sc #1}}

\newcommand{\hmark}{\hrule height 0pt depth 0pt width \platewidth}

\newcommand{\plateheader}[2]{
  \hbox to \platewidth
    { \vrule width 0pt
      \kern \sidmrg
      \resizebox*{#1}{!}{\unicamplogo}
      \hss
      \resizebox*{#2}{!}{\iclogo}
      \kern \sidmrg
      \vrule width 0pt
    }
}

% Usage:
% \placapremioA{HONORIFICO}{NOME}{PREMIOA}{PREMIOB}{ANOREF}

\newcommand{\placaPremioA}[5]{
  \framebox
    { \vbox to \plateheight
        { \hmark
          \kern 11mm
          \hmark
          \begin{minipage}{\platewidth}
            \begin{center}
              \sza{
                \sza{Instituto de Computação}\\
                \sza{Universidade Estadual de Campinas}
              }
            \end{center}
          \end{minipage}
          \hmark
          \kern -9mm
          \plateheader{18mm}{18mm}
          \hmark
          \kern 0mm
          \hmark
          \begin{minipage}{\platewidth}
            \begin{center}
              \szb{
                \sza{O Instituto confere #1}\\[2mm]
                \szc{#2}\\[2mm]
                \sza{#3}\\[2mm]
                \szc{#4}\\[2mm]
                \sza{referente ao ano de}\\[3mm]
                \szc{#5}
              }
            \end{center}
          \end{minipage}
          \vss
        }
    }
}

\newcommand{\placaAposentadoriaA}[3]{
  \framebox
    { \vbox to \plateheight
        { \hmark
          \kern 11mm
          \hmark
          \begin{minipage}{\platewidth}
            \begin{center}
              \sza{
                \sza{Instituto de Computação}\\
                \sza{Universidade Estadual de Campinas}
              }
            \end{center}
          \end{minipage}
          \hmark
          \kern -9mm
          \plateheader{18mm}{18mm}
          \hmark
          \kern 0mm
          \hmark
          \begin{minipage}{\platewidth}
            \begin{center}
              \szb{
                \sza{#1}\\[1mm]
                \szc{#2}\\[1mm]
                \sza{em agradecimento aos anos de}\\
                \szb{dedicação acadêmica}\\
                \szb{ao }\szb{ensino}\sza{ e à }\szb{pesquisa}\\[3mm]
                \sza{com todo o}\szb{ carinho}\sza{ e }\szb{ amizade}\\[1mm]
                \sza{de seus}\szb{ colegas}\sza{ e }\szb{alunos}\\[4mm]
                \sza{#3}
              }
            \end{center}
          \end{minipage}
          \vss
        }
    }
}

\advance \endlinechar by 256 % Restore previous \endlinechar

