% --------------------------------------------------------------------
% LaTeX style file for PIERS extended papers
% --------------------------------------------------------------------
%
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\usepackage{epsfig}
\usepackage{multicol}
\usepackage{ifthen}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{fancyhdr}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{pstricks}
\usepackage{caption2}
\usepackage{multirow}
\DeclareGraphicsRule{.jpg}{eps}{.bb}{}
% ---------------------------------------------------------------------

\typeout{Document Style Option `PIERS proceedings style Version 1.1'.}

%============================================================
%--- page format ------
\setlength   { \paperwidth    } {8.5in}
\setlength   { \paperheight   } {11in}
\setlength   { \hoffset       } {-1in}
\setlength   { \voffset       } {-1in}
\setlength   { \oddsidemargin } {0.9in}
\setlength   { \evensidemargin} {0.9in}
\setlength   { \textwidth     } {\paperwidth}
\setlength   { \textheight    } {\paperheight}
\newlength   { \bottommargin  }
\setlength   { \bottommargin  } {0in}
\setlength   { \topmargin     } {0.8in}
\setlength   { \headheight    } {10pt}
\setlength   { \headsep       } {30pt}
\setlength   { \footskip      } {40pt}


\addtolength {\textwidth}  {-\oddsidemargin}
\addtolength {\textwidth}  {-\evensidemargin}
\addtolength {\textheight} {-\topmargin}
\addtolength {\textheight} {-\headheight}
\addtolength {\textheight} {-\headsep}
\addtolength {\textheight} {-\footskip}
\addtolength {\textheight} {-\bottommargin}  
\flushbottom
%============================================================

%============================================================
\renewcommand{\ps@plain}{%
  \renewcommand{\@oddhead}{}%
  \renewcommand{\@evenhead}{}%
  \renewcommand{\@evenfoot}{\hfil\textrm{\thepage}\hfil}%
  \renewcommand{\@oddfoot}{\@evenfoot}%
}
%- - - - -
\fancypagestyle{piers2006} {
  \fancyhead         {}
  \fancyhead  [LO]   { }
  \fancyhead  [RE]   { }

  \fancyhead  [RO,LE]   {}
  \cfoot             {}
  \renewcommand      {\headrulewidth}{0pt}
  \renewcommand      {\footrulewidth}{0pt}
  %- - - - -
}

%============================================================

%============================================================
%--- some newcommands ---
\def\pr{\protect}
\def\hh#1{\hspace{#1cm}}
\def\vv#1{\vspace*{#1}}
\def\col{&:&}
\def\pbc#1{\parbox[t]{.9\textwidth}{\begin{center}#1\end{center}}}
\def\pbl#1{\parbox[t]{.9\textwidth}{#1}}
%============================================================

%============================================================
\AtBeginDocument{%
    \authortitle { }
    \stateprov   { }
    \postalcode  { }
    \phone       { }
    \fax         { }
    \email       { }
    \misc        { }
    \presentedby { }
    \mailto      { }
    \topic   { }
    \chairman    { }
    \presentation{ }
}
%============================================================

%============================================================
%---  space for floats - figures and tables ---
\floatsep 0.9ex plus 0.3ex minus 0.6ex 
\textfloatsep 4ex plus 3ex minus 1.5ex
\def \textfraction  {0.10} 
\def \floatpagefraction {0.60} 
\def \topfraction       {0.90} 
\def \bottomfraction    {0.90} 
%============================================================

%============================================================
%--- define title aspects ---
\date{}
\def\@titlepr     {}
\def\@author      {}
\def\@authorpr    {}
\def\@authortitle {}
\def\@affiliation {}
\def\@affiliationpr {}
\def\@address     {}
\def\@city        {}
\def\@citypr      {}
\def\@stateprov   {}
\def\@postalcode  {}
\def\@country     {}
\def\@countrypr   {}
\def\@phone       {}
\def\@fax         {}
\def\@email       {}
\def\@misc        {}
\def\@topic       {}
\def\@chairman    {}
\def\@presentation{}
\def\@presentedby {}
\def\@mailto      {}
\def\@time        {}
\def\@Snb         {}
\def\@Stitle      {}
\def\@Sdate       {}
\def\@Sday        {}
\def\@Sampm       {}
\def\@Sroom       {}
\def\@Sorg        {}
\def\@Schair      {}
\def\@key         {}

\def\@authorname      {{\bf Name        }}
\def\@affiliationname {{\bf Affiliation }}
\def\@addressname     {{\bf Address     }}
\def\@phonename       {{\bf Phone       }}
\def\@faxname         {{\bf Fax         }}
\def\@emailname       {{\bf E-mail      }}
\def\@miscname        {{\bf Misc.       }}
\def\@presentedbyname {{\bf\small Presenting author:      }}
\def\@mailtoname      {{\bf\small Corresponding author:   }}
\def\@topicname       {{\bf\small Suggested topic:        }}
\def\@chairmanname    {{\bf\small Session chaired by:     }}
\def\@presentationname{{\bf\small Preferred presentation: }}

\def\@voidkey{\pr -void-}
\def\title       #1 {\gdef\@title       {\pr #1} }
\def\titlepr     #1 {\gdef\@titlepr     {\pr #1} }
\def\author      #1 {\gdef\@author      {\pr #1} }
\def\authorpr    #1 {\gdef\@authorpr    {\pr #1} }
\def\authortitle #1 {\gdef\@authortitle {\pr #1} }
\def\affiliation #1 {\gdef\@affiliation{\pr #1}}
\def\affiliationpr #1 {\gdef\@affiliationpr{\pr #1}}
\def\address     #1 {\gdef\@address     {\pr #1} }
\def\city        #1 {\gdef\@city        {\pr #1} }
\def\citypr      #1 {\gdef\@citypr      {\pr #1} }
\def\stateprov   #1 {\gdef\@stateprov   {\pr #1} }
\def\postalcode  #1 {\gdef\@postalcode  {\pr #1} }
\def\country     #1 {\gdef\@country     {\pr #1} }
\def\countrypr   #1 {\gdef\@countrypr   {\pr #1} }
\def\phone       #1 {\gdef\@phone       {\pr #1} }
\def\fax         #1 {\gdef\@fax         {\pr #1} }
\def\email       #1 {\gdef\@email       {\pr #1} }
\def\misc        #1 {\gdef\@misc        {\pr #1} }
\def\presentedby #1 {\gdef\@presentedby {\pr #1} }
\def\mailto      #1 {\gdef\@mailto      {\pr #1} }
\def\topic       #1 {\gdef\@topic       {\pr #1} }
\def\chairman    #1 {\gdef\@chairman    {\pr #1} }
\def\presentation#1 {\gdef\@presentation{\pr #1} }
\def\time        #1 {\gdef\@time        {\protect #1} }
\def\Snb         #1 {\gdef\@Snb         {\protect #1} }
\def\Stitle      #1 {\gdef\@Stitle      {\protect #1} }
\def\Sday        #1 {\gdef\@Sday        {\protect #1} }
\def\Sampm       #1 {\gdef\@Sampm       {\protect #1} }
\def\Sdate       #1 {\gdef\@Sdate       {\protect #1} }
\def\Sroom       #1 {\gdef\@Sroom       {\protect #1} }
\def\Sorg        #1 {\gdef\@Sorg        {\protect #1} }
\def\Schair      #1 {\gdef\@Schair      {\protect #1} }
\def\key         #1 {\gdef\@key         {\protect #1} }
%============================================================

%============================================================
%--- Title output ---
\setcounter{tocdepth}{0}
\def\maketitle{\par\@maketitle}

\renewcommand{\l@chapter}{\@dottedtocline{0}{0em}{0em}}

\def\@maketitle{\newpage
   \begin{center}
    \setlength{\baselineskip}{5ex}
    { \LARGE\bf \@title }
   \end{center}\vspace{2ex}
%   \addcontentsline{toc}{chapter}{\@title}
%   \addtocontents{toc}{\protect\vspace{2ex}}
   }

%============================================================

%============================================================
%--- Author output ---
\def\makeauthor{\par
    %-----
    \vspace*{-6ex}
    \begin{center} 
    \begin{tabular}{c}
        {\bf \pbc{\@author}}      \\[-6ex]
        {\rm \pbc{\@affiliation,\ \@country}} \\
    \end{tabular}
    \end{center}
        \par
        \vspace*{-2ex}
}

\def\nomakeauthor{
}
%============================================================

%============================================================
%--- authors definition
\def\authors{\par
    \vspace{-0.5ex}
    \begin{center}
    }
\def\endauthors{
    \end{center}
    \par
    \vspace{0.5ex}
 }
%============================================================


%============================================================
%--- Abstract definition
\def\abstract{\par
    \vspace{3.5ex}
    \def\@test{13pt}
    \setcounter{figure}{0}
    \setcounter{equation}{0}
    \setcounter{footnote}{0}
    \fontsize{11pt}{13pt}\selectfont\vspace*{0ex}
%      \immediate\write10{ \string\dotfill\string\end{minipage}}
%      \immediate\write10{ & \thepage \string\\[2ex]}
    }
\def\endabstract{ }
%============================================================

%============================================================
%--- Paper's abstract definition
\newcommand\abstractname{Abstract}

\newenvironment{paperabstract}{%
      \vspace{16pt plus3pt minus3pt}
      \noindent{\bfseries \abstractname}---\rm\ignorespaces}
%============================================================

%============================================================
%--- paper definition
\def\paper{
    \def\@test{11pt}
    \setcounter{section}{0}
    \setcounter{figure}{0}
    \setcounter{table}{0}  % added by Zhongyu
    \setcounter{equation}{0}
    \setcounter{footnote}{0}
    \vspace*{-1.6cm}
    \fontsize{10pt}{12pt}\selectfont %changed by Zhongyu
    \vspace*{10ex}
    }
\def\endpeper{ }
%============================================================

%%============================================================
%%--- Bibliography definition
\def\thebibliography#1{\section{\small REFERENCES}\list
 {\arabic{enumi}.}
 {\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
 \advance\leftmargin\labelsep \usecounter{enumi}}
 \def\newblock{\hskip .11em plus .33em minus .07em}
  \parskip -0.7ex plus 0.5ex minus 0ex   
 \sloppy\clubpenalty4000\widowpenalty4000
 \sfcode`\.=1000\relax}
\let\endthebibliography=\endlist
%============================================================

%============================================================
%--- Index
\renewenvironment{theindex}
   {\newpage
    \addcontentsline{toc}{chapter}{{\bf Author Index}}%
    \pagestyle{plain}\let\item\@idxitem
    {\LARGE\bfseries Author Index}
    \begin{multicols}{3}%[{\LARGE\bfseries Author Index}]
    \par\bigskip}%
    {\end{multicols}}
%============================================================


%============================================================
%--- Some new commands
\newcommand{\pinput}[1]{
    \vspace{-2mm}
    \input{#1}
    \vspace{1mm}
    }
%============================================================



%============================================================\raggedright\centerline 
% Redefining section
\renewcommand{\thesection}{}
    \renewcommand{\section}{\@startsection
    {section}
    {1}
    {-1em}             
    {\baselineskip}
    {1ex}               
    {\fontsize{\@test}{13pt}\bf\selectfont}
    }
    \renewcommand{\thesection}{}


% Redefining equation
\renewcommand{\theequation}{\@arabic\c@equation}

% Redefining figures
\renewcommand{\thefigure}{\@arabic\c@figure}

%============================================================
\def\pierssection#1{
    \bigskip
    \begin{center}
    {\fontsize{16}{16}\selectfont
     \underline{\bf #1\rule[-.5ex]{0em}{.5ex}}}
    \end{center}\medskip
    \renewcommand*\@dotsep{1}
}
%============================================================



% end
