% Universal Academy Press, Inc.
% `Proceeding Standard' Ver 2.3
%
%
%
%
%
%
%
\def\normalsize{\@setfontsize\normalsize\@xiipt{15pt}
  \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
  \abovedisplayshortskip \z@ \@plus3\p@
  \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
  \belowdisplayskip \abovedisplayskip
   \let\@listi\@listI}
\normalsize
%
%
\headheight=\baselineskip
\headsep=\baselineskip
\footskip=.5\baselineskip
%\footheight=\baselineskip
\textwidth 34.5pc
\textheight 52pc
\parskip=0pt
\parindent=3pc
\oddsidemargin=.5in
\evensidemargin=.5in
%
% define of COUNTER
\def\thepart {\Roman{part}}
\def\thechapter {\arabic{chapter}}
\def\thesection {\arabic{section}.}
\def\thesubsection {\thesection\arabic{subsection}.}
\def\thesubsubsection {\thesubsection\arabic{subsubsection}.}
\def\theparagraph {\thesubsubsection\arabic{paragraph}.}
\def\thesubparagraph {\theparagraph\arabic{subparagraph}.}
\def\@chapapp{Chapter}
%
% define of sectionings...
\def\@part[#1]#2{%
  \ifnum \c@secnumdepth >-2\relax
    \refstepcounter{part}%
  % \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
    \addtocontents{toc}{\protect\par}
    \addtocontents{toc}{\protect\@ContentsWithNoLeader{\large Part \thepart\hspace{1em}#1}{\empty}}
    \addtocontents{toc}{\protect\par}
  \else
    \addcontentsline{toc}{part}{#1}%
  \fi
  \markboth{}{}%
  \vspace*{2\baselineskip}
  \begin{flushright}
    \interlinepenalty \@M
    \normalfont
    \ifnum \c@secnumdepth >-2\relax
      \huge\bfseries \partname~\thepart
      \par
      \vskip 20\p@
    \fi
    \huge \bfseries #2%
  \end{flushright}
  \@endpart}
%
%
\def\@spart#1{%
    {\centering
     \interlinepenalty \@M
     \normalfont
     \Huge \bfseries #1\par}%
    \@endpart}
\def\@endpart{%
  \vfill\newpage
  \if@twoside
    \null
    \thispagestyle{empty}%
    \newpage
  \fi
  \if@tempswa
    \twocolumn
  \fi}
%
%
\def\chapter{%
  \if@openright
    \cleardoublepage
  \else
    \clearpage
  \fi
  \thispagestyle{TitlePage}%
\global\@topnum\z@
  \@afterindentfalse
  \secdef\@chapter\@schapter
}
%
\def\@chapter[#1]#2{%
  \ifnum \c@secnumdepth >\m@ne
    \if@mainmatter
      \refstepcounter{chapter}%
      \typeout{\@chapapp\space\thechapter.}%
%      \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}%
       \def\@ChapterName{#1}%
    \else
      \addcontentsline{toc}{chapter}{#1}%
    \fi
  \else
    \addcontentsline{toc}{chapter}{#1}%
  \fi
  \chaptermark{#1}%
  \addtocontents{lof}{\protect\addvspace{10\p@}}%
  \addtocontents{lot}{\protect\addvspace{10\p@}}%
  \if@twocolumn
    \@topnewpage[\@makechapterhead{#2}]%
  \else
    \@makechapterhead{#2}%
    \@afterheading
  \fi}
%
%
\def\@schapter#1{%
  \if@twocolumn
    \@topnewpage[\@makeschapterhead{#1}]%
  \else
    \@makeschapterhead{#1}%
    \@afterheading
  \fi}
%
%
\def\@makeschapterhead#1{%
  \vspace*{25\p@}%
  {\parindent \z@ \raggedright
    \normalfont
    \interlinepenalty\@M
    \huge \bfseries  #1\par\nobreak
    \vskip 25\p@
}}
%
%
\def\section{\@startsection {section}{1}{\z@}{1pc plus 1ex minus -.2ex}{1pc plus .2ex}{\normalsize\bf}}
\def\subsection{\@startsection{subsection}{2}{\z@}{3.25ex plus 1ex minus -.2ex}{.4ex plus .2ex}{\normalsize\it}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{3.25ex plus 1ex minus .2ex}{.4ex plus .2ex}{\normalsize\it}}
\def\paragraph{\@startsection
 {paragraph}{4}{\z@}{3.25ex plus 1ex minus .2ex}{-1em}{\normalsize\it}}
\def\subparagraph{\@startsection{subparagraph}{4}{\parindent}{3.25ex plus 1ex minus  .2ex}{-1em}{\normalsize\it}}
%
%
\def\@makechapterhead#1{%
  \par
  \noindent%
  \vbox{%
    \hbox{\vrule width34.5pc height1.5mm depth0pt}%
    \kern.5\baselineskip
    \hbox{\parbox{34.5pc}{\large\textbf{#1}}}
    \kern.8\baselineskip
    \hbox{\vrule width34.5pc height.5mm depth0pt}%
  }%
  \par
  \xdef\firstpagenumber{\thepage}%
}
%
%
\def\@schapter#1{\if@twocolumn
                   \@topnewpage[\@makeschapterhead{#1}]%
                 \else
                   \@makeschapterhead{#1}%
                   \@afterheading
                 \fi}
\def\@makeschapterhead#1{%
  {%
  \vspace*{10\p@}\thispagestyle{headings}
  \parindent \z@ \raggedright
    \normalfont
    \interlinepenalty\@M
    \LARGE\bfseries  #1\par\nobreak
    \vskip 20\p@
	\xdef\firstpagenumber{\thepage}%
}}
%
% ------------------- ending of each paper -----------------
%
\def\endofpaper{\label{l@stpagenumber}}%
%
% pagestyles
\def\ps@headings{%
  \let\@oddfoot\@empty%
  \let\@evenfoot\@empty%
  \def\@evenhead{\small\thepage\ \@RTrule\hss}%
  \def\@oddhead{\small\hss\@RTrule\ \thepage}%
  \let\@mkboth\markboth
  \def\chaptermark##1{%
    \markboth {%
      \ifnum \c@secnumdepth >\m@ne
        \if@mainmatter
           \thechapter\quad%
        \fi
      \fi
      ##1}{}}%
  \def\sectionmark##1{%
    \markright {%
      \ifnum \c@secnumdepth >\z@
        \thesection\quad%
      \fi
    ##1}}}
%
%
\def\ps@TitlePage{%
  \let\@mkboth\@gobbletwo
  \def\@oddhead{\small\@BookTitle\hss\@RTrule\ \textrm{\upshape\thepage}}
  \let\@evenhead\@empty
  \settowidth{\@tempdima}{{\small\@CopyRight}}%
  \def\@oddfoot{\vbox{%
                  \kern1.5\baselineskip
                  \hbox to \textwidth{\vrule width\@tempdima height .4pt}%
                  \kern.5\baselineskip
                  \hbox{\small pp.\ \firstpagenumber--\pageref{l@stpagenumber}\quad%
                  \@CopyRight\hss}%
                }}%
  \let\@evenfoot\@oddfoot}
%
%
\def\ps@empty{%
  \let\@oddfoot\@empty
  \let\@evenfoot\@empty
  \let\@oddfoot\@empty
  \let\@evenfoot\@empty
}
%
%
\long\def\@makecaption#1#2{\small%
  \setlength{\leftskip}{1.5pc}%
  \vskip .5\baselineskip
  \setbox\@tempboxa\hbox{{\bf #1\quad}#2}
  \ifdim \wd\@tempboxa >\hsize
  {\par
        %\setlength{\rightskip}{1.5pc}
    \hskip-1.5pc\unhcopy\@tempboxa\par}
  \else
    \hbox to\hsize{\hfil{\box\@tempboxa}\hfil}
  \fi
  \vskip.5\baselineskip}
%
%
\def\author#1{%
  \par
  \noindent%\hskip\parindent
  \vbox{%
    \kern.5\baselineskip
    \hbox{%
      \parbox{34.5pc}{\noindent#1}}%
    \kern.7\baselineskip
    \hbox{\vrule width34.5pc height0.5mm depth0pt}%
  }%
  \par
}
%
%
\def\pagenumbering#1{%
  \clearpage
  \global\c@page \@ne%
  \gdef\thepage{\csname @#1\endcsname \c@page}}
\def\footnoterule{\kern-3\p@
 \hrule width \columnwidth
 \kern 2.6\p@}
%
%
%
%
%
%
\def\theequation{\@arabic\c@equation}
%
%
%
%
\renewcommand{\figurename}{Fig.}
\def\thefigure{\@arabic\c@figure.}
%
%
%
%
\def\thetable{\@arabic\c@table.}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% define of local macros
\def\CopyRight#1{%
  \gdef\@CopyRight{#1}
}
\def\@CopyRight{empty}
%
%
\def\BookTitle#1{%
  \gdef\@BookTitle{#1}
}
\def\@BookTitle{empty}
%
%
\def\@RTrule{%
  \setbox\@tempboxa=\hbox{1}
  \hbox{%
    \vbox to \ht\@tempboxa{%
      \vss
      \hbox{\vrule width7mm height.3pt depth.3pt}
      \vss}}}
%
%
\def\makeauthorindex{%
  \if@filesw
    \newwrite\@authorindexfile
    \immediate\openout\@authorindexfile=\jobname.aix
    \gdef\AuthorIndex##1##2{%
      \write\@authorindexfile{%
      \string\indexentry{##1, ##2}{\thepage}}\relax}
    \typeout{Writing AuthorIndex file \jobname.aix}
  \fi
}
\def\AuthorContents#1{%
  \addtocontents{toc}{\protect\par}
  \addtocontents{toc}{\protect\@ContentsWithNoLeader{\@ChapterName}{\empty}}
  \addtocontents{toc}{\protect\@ContentsWithLeader{2em}{0pt}{#1}{\thepage}}%
}
%
%
\def\@ContentsWithNoLeader#1#2{%
  \ifnum \c@tocdepth >\m@ne
    \addpenalty{-\@highpenalty}%
    \vskip .25em \@plus\p@
    \setlength\@tempdima{1.5em}%
    \begingroup
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      \leavevmode
      \bfseries
      \advance\leftskip\@tempdima
      \hskip -\leftskip
      #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}
      \par
      \penalty\@highpenalty
    \endgroup
  \fi}
%
%
\def\@ContentsWithLeader#1#2#3#4{%
  %
  % ==================================================
  %
  %
  %
  %
  %
  %
  %
  {%
    \leftskip #1\relax
    \rightskip \@tocrmarg
    \parfillskip -\rightskip
    \parindent #1\relax
    \@afterindenttrue
    \interlinepenalty\@M
    \leavevmode
    \@tempdima #2\relax
    \advance\leftskip \@tempdima
    \hbox{}\hskip -\leftskip
    %
    %
    #3\nobreak%
    \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep mu$}\hfill\nobreak
    %
    %
    \hbox to\@pnumwidth{\hfil\rm #4}\par
  }
}
%
%
\def\printindex{%
  \@input{\jobname.ind}\relax}
\renewenvironment{thebibliography}[1]
     {\section*{References}%
      \list{\@biblabel{\@arabic\c@enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
            \@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
%
%
\def\printAuthorIndex{%
  %
  %
  %
  %
  \let\@oritheindex\theindex
  \let\theindex\theAuthorIndex
  \@input{\jobname.aid}\relax
  \let\theindex\@oritheindex
}
%
%
\newenvironment{theAuthorIndex}{%
               \if@twocolumn
                  \@restonecolfalse
                \else
                  \@restonecoltrue
                \fi
                \columnseprule \z@
                \columnsep 35\p@
                \twocolumn[\@makeschapterhead{Author Index}]%
                \@mkboth{}%
                        {}%
                \thispagestyle{headings}
                %
                %
                \addtocontents{toc}%
               {\protect\@ContentsWithLeader{0pt}{0pt}{Author Index}{\thepage}}
                \parindent\z@
                \parskip\z@ \@plus .3\p@\relax
                \let\item=\@idxitem}
              {\if@restonecol
                 \onecolumn\else
                 \clearpage
               \fi}
\def\@idxitem{\par\hangindent 40\p@}
\def\subitem{\@idxitem \hspace*{20\p@}}
\def\subsubitem{\@idxitem \hspace*{30\p@}}
\def\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
%
%
\def\theindex{%
  \if@twocolumn
  \@restonecolfalse
  \else
  \@restonecoltrue
  \fi
  \columnseprule \z@
  \columnsep 35\p@
  \twocolumn[\@makeschapterhead{\indexname}]%
  \@mkboth{\indexname}%
  {\indexname}%
  \thispagestyle{headings}
  \addtocontents{toc}
                {\protect\@ContentsWithLeader{0pt}{0pt}{\indexname}{\thepage}}
  \parindent\z@
  \parskip\z@ \@plus .3\p@\relax
  \let\item\@idxitem}
\def\endtheindex{%
  \if@restonecol%
    \onecolumn\else\clearpage
  \fi}
%
% table of contents
\def\tableofcontents{%
  \@restonecolfalse
  \if@twocolumn
    \@restonecoltrue\onecolumn
  \fi\chapter*{Contents\@mkboth{CONTENTS}{CONTENTS}}
  \@starttoc{toc}%
  \if@restonecol%
    \twocolumn
  \fi}
%
% ------------------ avoid label conflict ------------------
% redifine \include, \label, \ref, \pageref, \@citex and \@bibitem
%
\def\@currentfileprocessed{\jobname}
\def\include#1{\xdef\@currentfileprocessed{#1}%
	\@include#1 }
\def\Input#1{\xdef\@currentfileprocessed{#1}%
\input{#1}}
%
\def\label#1{\@bsphack\if@filesw {\let\thepage\relax
   \def\protect{\noexpand\noexpand\noexpand}%
   \edef\@tempa{\write\@auxout{\string
      \newlabel{\@currentfileprocessed:#1}{{\@currentlabel}{\thepage}}}}%
   \expandafter}\@tempa
   \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
\let\@ref@ref\ref
\def\ref#1{\@ref@ref{\@currentfileprocessed:#1}}
\let\@pageref@ref\pageref
\def\pageref#1{\@pageref@ref{\@currentfileprocessed:#1}}
\let\@citex@cite\@citex
\def\@citex[#1]#2{\@citex@cite[#1]{\@currentfileprocessed:#2}}
\let\@lbibitem@item\@lbibitem
\def\@lbibitem[#1]#2{\@lbibitem@item[#1]{\@currentfileprocessed:#2}}
\let\@bibitem@item\@bibitem
\def\@bibitem#1{\@bibitem@item{\@currentfileprocessed:#1}}
%
% from res.sty
\newcommand{\noi}{\noindent}
\newcommand{\re}{\par\hangindent=0.5cm\hangafter=1\noindent}
%\newcommand{\lsim}{\raisebox{0.1mm}{$\, <$}\hspace{-3.0mm}\raisebox{-1.8mm}{\e\m$\sim \,$}}
%\newcommand{\gsim}{\raisebox{0.1mm}{$\, >$}\hspace{-3.0mm}\raisebox{-1.8mm}{\e\m$\sim \,$}}\parindent=3pc
%
% end define
\setcounter{tocdepth}{0}
\ps@headings\@twosidetrue
\raggedbottom
\endinput

