%%% STYLE of the Proceedings of Turkish Journal of Mathematics.
%%% Author: Abdullah Can
%%% Revision : 1.0
%%% ====================================================================
%%%  @LaTeX-file{
%%%     filename        = "mathematic.cls"
%%%     author          = "Abdullah Can"
%%%     address         = "Abdullah Can
%%%                        Baß Teknisyen
%%%                        Tubitak
%%%                        Kavaklidere Ankara/Turkey"
%%%     telephone       = "(+90) 312-4685300/2106"
%%%     email           = "abdullah.can@tubitak.gov.tr"
%%%     keywords        = "Mathematik.cls"
%%%  }
%%% ====================================================================
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{Mathematics}[1998/06/18 v1.0
    TUBITAK - Turkish Journal of Mathematics]
    
\newif\if@draftcopy
\@draftcopyfalse
\DeclareOption{a5paper}
    {\ClassError{matematik}{Option `a5paper' not supported}{}}
\DeclareOption{b5paper}
    {\ClassError{matematik}{Option `b5paper' not supported}{}}
\DeclareOption{twocolumn}%
    {\ClassError{matematik}{Option `twocolumn' not supported}{}}
\DeclareOption{titlepage}%
    {\ClassError{matematik}{Option `titlepage' not supported}{}}
\DeclareOption{draft}
    {\@draftcopytrue
    \setlength\overfullrule{5pt}}
\DeclareOption{final}
    {\@draftcopyfalse
     \setlength\overfullrule{0pt}}

\PassOptionsToClass{a4paper,twoside,fleqn}{article}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions
\LoadClass{article}
\ExecuteOptions{10pt,final}
%%%%%%%%%%%%%%%%% CAPTION %%%%%%%%%%%%%%%%%%%%%%

\setlength\abovecaptionskip{10\p@}
\setlength\belowcaptionskip{0\p@}

\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \sbox\@tempboxa{\small{\bfseries #1}. #2}%
  \ifdim \wd\@tempboxa >\hsize
    {\small {\bfseries #1}. #2\par}
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%% PAGE SIZE DEFINITIONS %%%%%%%%%%%%%%%%
\tolerance=300
\pretolerance=200
\setlength\textwidth{5.35in}
\@settopoint\textwidth
\setlength\textheight{6.9in}
\advance\textheight by \topskip
\setlength\oddsidemargin{-10\p@}
\setlength\evensidemargin{-10\p@}
\setlength\marginparwidth {\z@}
\setlength\topmargin{-47\p@}
%\setlength\headheight{30\p@}
%\setlength\topmargin{27\p@}
\setlength\headheight{12\p@}
\setlength\headsep{25\p@}
\setlength\footskip{30\p@}
\normallineskiplimit=.99pt
\hoffset=.5in
\voffset=1in
\baselineskip=16pt
\lineskiplimit=3pt
\lineskip=5pt


\def\firstpage@putlabel{
   \immediate\write\@auxout{\string
   \newlabel{FirstPage}{{}{\thepage}}}%
}
\AtBeginDocument{
        \firstpage@putlabel%
        \settoheight{\footnotesep}{\footnotesize M$^1$}}%
\def\lastpage@putlabel{\addtocounter{page}{-1}%
   \immediate\write\@auxout{\string
   \newlabel{LastPage}{{}{\thepage}}}%
   \addtocounter{page}{1}}
\AtEndDocument{\clearpage\lastpage@putlabel}%

\renewcommand{\author}[2][]{
   \gdef\@surnames{#1}\gdef\@author{#2}
   \ifx\@empty\@surnames \gdef\@surnames{*****YOU MUST SUPPLY SURNAMES*****}\fi
}

\def\vol #1{\gdef\@vol{#1}
            \ifx\@empty\@vol\gdef\@vol{1}\fi}
\def\pyear #1{\gdef\@pyear{#1}
            \ifx\@empty\@pyear \gdef\@pyear{\number\year}\fi}
%\def\received #1{\gdef\@received{#1}
%            \ifx\@empty\@received \gdef\@received{\today}\fi}
%%\def\turktitle#1{\gdef\@turktitle{#1}}

\def\@oddhead{\normalfont\hfil\small\@surnames\hfil}
\def\@oddfoot{\normalfont\hfil\thepage }
\def\@evenhead{\normalfont\hfil\small\@surnames\hfil}
\def\@evenfoot{\normalfont\thepage\hfil}
%%%%%%%%%%%%%00000

\def\verse{\let\\=\@centercr 
 \list{}{\itemsep\z@ \itemindent -1.5em\listparindent \itemindent 
 \rightmargin\leftmargin\advance\leftmargin 1.5em}\item[]}
\let\endverse\endlist
\def\quotation{\list{}{\listparindent 1.5em
 \itemindent\listparindent
 \rightmargin\leftmargin \parsep 0pt plus 1pt}\item[]}
\let\endquotation=\endlist
\def\quote{\list{}{\rightmargin\leftmargin}\item[]}
\let\endquote=\endlist

\def\descriptionlabel#1{\hspace\labelsep \bf #1}
\def\description{\list{}{\labelwidth\z@ \itemindent-\leftmargin
 \let\makelabel\descriptionlabel}}
\let\enddescription\endlist


\def\theequation{\arabic{equation}}


\def\titlepage{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
 \else \newpage \fi \thispagestyle{empty}\c@page\z@}
\def\endtitlepage{\if@restonecol\twocolumn \else \newpage \fi}
%%%%%%%%%%%%%%0000

\def\serieslogo@{\vtop to 5pt{%
  \parindent\z@ \small\normalfont
  \hbox{Proceedings of \@volume $^{th}$ G\"{o}kova}
  \hbox{Geometry-Topology Conference,}
  \hbox{pp, \pageref{FirstPage}\ -- \pageref{LastPage} %
  } \endgraf\vss}}


\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.3em{%
                \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
      \newpage
      \global\@topnum\z@   % Prevents figures from going at top of page.
      \@maketitle
    \thispagestyle{myheadings}\@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\serieslogo@{\vtop to 5pt{%
  \parindent\z@ \small\normalfont
  \hbox{Turk J Math\hfil}
  \hbox{\@vol\ (\@pyear)\ , \pageref{FirstPage}\ -- \pageref{LastPage}.\hfil}
  \hbox{\copyright\ T\"{U}B\.{I}TAK\hfil}
   \endgraf\vss}}

\def\surname #1{\gdef\@surname{#1}}
\def\vol #1{\gdef\@vol{#1}}
\def\pyear #1{\gdef\@pyear{#1}}
\def\adres #1{\gdef\@adres{#1}}
\def\received #1{\gdef\@received{#1}}
\def\freceived #1{\gdef\@freceived{#1}}
\gdef\@amssayi{ }
\def\amssayisi #1{\gdef\@amssayi{#1}}
%
\def\amsfoot{\xdef\@thefnmark{}\@footnotemark\@footnotetext}
%


\def\maketitle{\par
 \begingroup
 \def\thefootnote{\fnsymbol{footnote}}
 \def\@makefnmark{\hbox 
 to 0pt{$^{\@thefnmark}$\hss}\hspace*{1.5mm}} 
 \newpage 
 \global\@topnum\z@ \@maketitle \thispagestyle{myheadings} \@thanks
 \endgroup
 \setcounter{footnote}{0}
 \let\maketitle\relax
 \let\@maketitle\relax
\gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax }
\def\@maketitle{\newpage
    \def\bos{ }
    \if\@amssayi\bos \else \amsfoot{\@amssayi} \fi
 \null
 \vskip 2em \begin{center}
 {\Large\bf \@title \par} \vskip 1.55em {\it \lineskip .5em
\begin{tabular}[t]{c}\@author 
 \end{tabular}\par } 
 \vskip 3.5em \end{center}
 \par } 
\def\abstract{
\small
\begin{center} 
{\bf Abstract\vspace{-.5em}\vspace{0pt}} 
\end{center}
\quotation 
}
\def\endabstract{\endquotation}

\mark{{}{}}  %%%%%%%

\def\ps@myheadings{%
    \def\@oddhead{\vbox{\serieslogo@}\hss}
    \def\@oddfoot{\normalfont  \hfil \thepage}
    \let\@evenhead\@oddhead
    \def\@evenfoot{\normalfont \thepage \hfil}
    \let\@mkboth\@gobbletwo
    \let\sectionmark\@gobble
    \let\subsectionmark\@gobble
}


\renewenvironment{thebibliography}[1]
     {\vspace*{-1mm}\zsection*{\refname
        \@mkboth{\MakeUppercase\refname}{\MakeUppercase\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}

\newenvironment{reference}{\begin{thebibliography}{99}
\baselineskip=4mm\lineskiplimit=-6pt
\lineskip=-3pt}
                        {\end{thebibliography}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newbox{\tempbox}
\newlength{\tcaplen}
\newlength{\ttcaplen}
\newcommand{\tablo}[2]{
    \par\vspace{10pt}\sbox{\tempbox}{\small{\textbf #1} #2}
    \ifdim \wd\tempbox > \linewidth
       \settowidth\tcaplen{\small\textbf #1\ }
        \setlength\ttcaplen\linewidth
        \addtolength{\ttcaplen}{-\tcaplen}
        {\noindent\small\mbox{{\bf #1\ }}\parbox[t]{\ttcaplen}{#2}}
    \else
    {\centerline{\small{\bf #1\ } #2}}
    \fi
}

\newcommand{\sekil}[2]{
    \par\vspace{2pt}\sbox{\tempbox}{\small{\textbf #1} #2}
    \ifdim \wd\tempbox > \linewidth
       \settowidth\tcaplen{\small\textbf #1\ }
        \setlength\ttcaplen\linewidth
        \addtolength{\ttcaplen}{-\tcaplen}
        {\noindent\small\mbox{\bf #1\ }\parbox[t]{\ttcaplen}{#2}}
    \else
    {\centerline{\small{\bf #1\ } #2}}
    \fi
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\@oddhead{\rm \hfil \small\@surname \hfil}
\def\@oddfoot{\rm  \hfil \thepage }
\def\@evenhead{\rm \hfil \small\@surname \hfil}
\def\@evenfoot{\rm \thepage \hfil}
\gdef\@surname{}\gdef\@vol{}\gdef\@pyear{}
\gdef\@ilksayfa{}\gdef\@sonsayfa{}
\def\hquad{\hskip 0.3em \relax}

\def\baslik#1{ \vskip -\parskip
%               \vskip0pt plus.1\vsize\penalty-250
               \vskip0pt plus-.1\vsize \vskip.5cm plus 0.1cm
               \noindent {\bf #1 } \par\nobreak \vskip\medskipamount\nobreak }

\def\arabaslik#1{\vskip -\parskip
%               \vskip0pt plus.1\vsize\penalty-250
               \vskip0pt plus-.1\vsize \vskip.5cm plus 0.1cm
               \noindent {\bf #1 } \par\nobreak \vskip\medskipamount\nobreak }
               
\newcommand\zsection{\@startsection {section}{1}{\z@}%
                      {-3.5ex \@plus -1ex \@minus -.2ex}%
                      {2.3ex \@plus.2ex}%
                      {\centering\normalfont\normalsize\bfseries}}
\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {5ex \@plus -1ex \@minus -.2ex}%
                                   {2.3ex \@plus.2ex}%
                                   {\normalfont\normalsize\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\normalsize\bfseries}}

\renewcommand\@seccntformat[1]{\csname the#1\endcsname.\quad}

%\def\claim#1{\bigbreak \vskip -\parskip
%             \noindent{\bf #1}\quad\it }
%\def\endclaim{\vskip\medskipamount}

%\def\remark#1{\bigbreak \vskip -\parskip
%             \noindent{\bf #1}\quad}
%\def\endremark{\vskip\medskipamount }

\def\proof{\ifdim\lastskip <\bigskipamount\removelastskip\fi
             \vskip -\parskip
             \vskip\smallskipamount\noindent \rm{\bf Proof.}\quad}
\def\endproof{\smallskip\nopagebreak\hfill$\Box$\\[\smallskipamount]}

\def\ozet{
\small 
\begin{center}
{\bf \"{O}zet\vspace{-.5em}\vspace{0pt}} 
\end{center}
\quotation 
}
\def\endozet{\endquotation}

\def\kaynak{\vskip -\parskip
               \vskip0pt plus.3\vsize\penalty-100
               \vskip0pt plus-.3\vsize \vskip1.0cm  
               \begin{center}{\bf Kaynak\c{c}a}\end{center}
               \nobreak\medskip\nobreak
               \small \frenchspacing
         \begin{list}%
          {[\arabic{enumi}]}{\usecounter{enumi}} }

\def\endkaynak{ \end{list}\normalsize}

%\def\sontitle #1{\gdef\@sontitle{#1}}

\def\addres{  \vskip -0.6em plus  -0.1em minus  -0.1em
              % \begin{center} {\@sontitle}\vskip 1.0em plus.1em minus.1em
              % \end{center}
               }%\gdef\@sontitle{} }
\def\endaddres{\vskip2.0em  
               \def\bos{ }\vskip  -0.5cm plus  0.1cm minus  0.1cm
               \noindent\small\begin{tabular}[t]{l}\@adres\end{tabular}
               \hfill\begin{tabular}[t]{l}
               Received \@received \\
               \if\@freceived\bos \mbox{ }\else Revised \fi
               \@freceived 
               \end{tabular}\par}  

 \if@draftcopy\renewcommand\baselinestretch{2}\else
  \renewcommand\baselinestretch{}\fi
  
\newcommand{\keywords}[1]{\par\vskip 0.5cm \noindent
{\bf Key Words:} #1}

\newcommand{\keywor}[1]{\par\vskip 0.5cm \noindent
{\bf Key words and phrases:} #1}

\endinput
%%
%% End of file `matematik.cls'.
