%
% `cctart' class derived from the 'article' class.

\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesClass{cctart}[1997/12/10 Derived from the `article' class]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions
\LoadClass[a4paper]{article}[1996/10/31]
\RequirePackage{cctbase}[1997/12/10]

%
% Redefine some names
\renewcommand\contentsname{{\CC D? {\char33}{\char33} B<}}
\renewcommand\listfigurename{{\CC 2e M< D? B<}}
\renewcommand\listtablename{{\CC 1m 8q D? B<}}
\renewcommand\refname{{\CC 2N ?< ND OW}}
\renewcommand\indexname{{\CC Kw {\char33}{\char33} R{\char125}}}
\renewcommand\figurename{\rm  {\CC M<}}
\renewcommand\tablename{\bf  {\CC 1m}}
\renewcommand\abstractname{{\CC U* {\char33}{\char33} R*}}
\renewcommand\partname{{\CC 5Z} \ccnospace{\CS\chnno{part}\CS} {\CC 2? 7V}}
\renewcommand\appendixname{{\CC 8= B<} \ccnospace{\CS\chnno{chapter}}}

% headings
\if@twoside
  \def\ps@headings{%
      \let\@oddfoot\@empty\let\@evenfoot\@empty
%org  \def\@evenhead{\thepage\hfil\slshape\leftmark}%
%org  \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
      \def\@evenhead{\pushziti\thepage\hfil\slshape\leftmark\popziti}%   !!!
      \def\@oddhead{{\pushziti\slshape\rightmark}\hfil\thepage\popziti}% !!!
      \let\@mkboth\markboth
    \def\sectionmark##1{%
%org  \markboth {\MakeUppercase{%
      \markboth {%                         !!!
        \ifnum \c@secnumdepth >\z@
%org      \thesection\quad
          \sectionname\ \ %                !!!
        \fi
%org    ##1}}{}}%
        ##1}{}}%                           !!!
    \def\subsectionmark##1{%
      \markright {%
        \ifnum \c@secnumdepth >\@ne
%org      \thesubsection\quad
          \subsectionname\ \ %             !!!
        \fi
        ##1}}}
\else
  \def\ps@headings{%
    \let\@oddfoot\@empty
%org \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
    \def\@oddhead{\pushziti{\slshape\rightmark}\hfil\thepage\popziti}%  !!!
    \let\@mkboth\markboth
    \def\sectionmark##1{%
%org  \markright {\MakeUppercase{%
      \markright {%                       !!!
        \ifnum \c@secnumdepth >\m@ne
%org      \thesection\quad
          \sectionname\ \ %               !!!
        \fi
%org    ##1}}}}
        ##1}}}%                           !!!
\fi
\ps@headings%                             !!!

\def\@part[#1]#2{%
    \ifnum \c@secnumdepth >\m@ne
      \refstepcounter{part}%
%org  \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
      \addcontentsline{toc}{part}{\partname\hspace{1em}#1}%      !!!
    \else
      \addcontentsline{toc}{part}{#1}%
    \fi
    {\parindent \z@ \raggedright
     \interlinepenalty \@M
     \normalfont
     \ifnum \c@secnumdepth >\m@ne
%org   \Large\bfseries \partname~\thepart
       \Large\bfseries \partname \quad%          !!!
     \fi
%org \huge \bfseries #2%
     \Large \bfseries #2%                        !!!
     \markboth{}{}\par}%
    \nobreak
    \vskip 3ex
    \@afterheading}%
\def\@spart#1{%
    {\parindent \z@ \raggedright
     \interlinepenalty \@M
     \normalfont
%org \huge \bfseries #1\par}%
     \Large \bfseries #1\par}%                !!!
     \nobreak
     \vskip 3ex
     \@afterheading}%

\renewcommand\section{\@startsection
   {section}{1}{\z@}%   {name}{depth}{}
          {3.5ex \@plus1ex \@minus .2ex}% leave parindent
          {2.3ex \@plus.2ex}%
          {\reset@font\large\bfseries\sectionformat}}%
\newcommand\sectionname{\S\arabic{section}}
\newcommand\sectionformat{\centering}

\renewcommand\subsection{\@startsection
   {subsection}{2}{\z@}%   {name}{depth}{}
          {1.75ex \@plus.5ex \@minus .1ex}% leave parindent
          {1.15ex \@plus.1ex}%
          {\reset@font\normalsize\bfseries\subsectionformat}}
\newcommand\subsectionname{\S\arabic{section}.\arabic{subsection}}
\newcommand\subsectionformat{}

\renewcommand\subsubsection{\@startsection
   {subsubsection}{3}{\z@}%   {name}{depth}{}
          {1.75ex \@plus 0.5ex \@minus .1ex}% positive->leave parindent
          {1.15ex \@plus.1ex}%
          {\reset@font\normalsize\bfseries\subsubsectionformat}}
\newcommand\subsubsectionname{\S\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}
\newcommand\subsubsectionformat{}

% abstract
\renewenvironment{abstract}{%
      \leftskip=2\ccwd \rightskip=2\ccwd
      \small\parindent2\ccwd
      \bigskip
      \begin{center}%
        {\bfseries \abstractname\vspace{\z@}}%
      \end{center}%
      \par\nopagebreak\medskip\nopagebreak}
    {\par\bigskip}

%
% Change definition of `thebibliography' environment
\renewenvironment{thebibliography}[1]
     {\section*{\refname
%org        \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}}%
        \@mkboth{\refname}{\refname}}%                                  !!!
      \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
      \small%                                                    !!!
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}

\endinput
