%% Identification part:

\NeedsTeXFormat{LaTeX2e}

\def \filedate {1999/03/05}
\def \fileversion {1}
\def \filename {dis.cls}


\ProvidesClass{dis}[\filedate\space
  Private LaTeX2e document class <\filedate>]

\LoadClass[10pt,twoside]{book}

\RequirePackage{multicol}
\RequirePackage{amsthm}
\RequirePackage[pdftex,
     papersize={168mm,238mm},
textwidth=30cc, 
textheight=44cc
   ]%
  {geometry}

\usepackage[bookmarksnumbered]{hyperref}
\parindent15pt
\oddsidemargin=0pt
\evensidemargin=0pt
\headsep16pt
\overfullrule5pt
\footskip18.16pt

\setlength{\topmargin}{-78pt}
\setlength{\oddsidemargin}{-72pt}
\setlength{\evensidemargin}{-72pt}
\addtolength{\topmargin}{14mm}
\addtolength{\oddsidemargin}{18mm}
\addtolength{\evensidemargin}{168mm}
\addtolength{\evensidemargin}{-30cc}
\addtolength{\evensidemargin}{-18mm}

\renewcommand\large{%
   \@setfontsize\largesize\@xiipt{14}%
   \let\@listi\@listI}

\renewcommand\normalsize{%
   \@setfontsize\normalsize\@xpt{13}%
   \abovedisplayskip 4\p@ \@plus2\p@
   \abovedisplayshortskip \z@ \@plus2\p@
   \belowdisplayshortskip 4\p@ \@plus2\p@
   \belowdisplayskip \abovedisplayskip
\topsep4pt plus2pt
\let\@listi\@listI
\let\@listii\@listII}
\normalsize
\def\@listi{\leftmargin\leftmargini
            \parsep 0\p@ 
            \topsep 4\p@   \@plus2\p@ 
            \itemsep0\p@}
\let\@listI\@listi

\renewcommand\footnotesize{%
   \@setfontsize\footnotesize\@ixpt{11}%
   \abovedisplayskip 4\p@ \@plus2\p@
   \abovedisplayshortskip \z@ \@plus2\p@
   \belowdisplayshortskip 4\p@ \@plus2\p@
   \belowdisplayskip \abovedisplayskip
   \def\@listi{\leftmargin\leftmargini
               }%
   \belowdisplayskip \abovedisplayskip
}

\topsep 4\p@   \@plus2\p@ 
\parsep 0\p@
\itemsep \parsep


\setcounter{topnumber}{2}
\def\topfraction{1}
\setcounter{bottomnumber}{1}
\def\bottomfraction{1}
\setcounter{totalnumber}{5}
\def\textfraction{0}
\def\floatpagefraction{.5}

\newif\iffig
\newif\iftab

\long\def\@makecaption#1#2{\footnotesize
\iffig\vskip6pt\fi
   \setbox\@tempboxa\hbox{\iftab\bf\fi#1.\hods \rm#2}%
   \ifdim \wd\@tempboxa >\hsize\noindent
       \iftab\bf\fi#1.\hods \rm#2\par
     \else
       \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
   \fi
\iftab\vskip6pt\fi
\tabfalse\figfalse
}

\def\thefigure{\@arabic\c@figure}

\def\fps@figure{tbp}
\def\ftype@figure{1}
\def\ext@figure{lof}
\def\fnum@figure{\figurename~\thefigure}
\def\figure{\figtrue\@float{figure}}
\let\endfigure\end@float
\@namedef{figure*}{\@dblfloat{figure}}
\@namedef{endfigure*}{\end@dblfloat}

\def\thetable{\@arabic\c@table}

\def\fps@table{tbp}
\def\ftype@table{2}
\def\ext@table{lot}
\def\fnum@table{\tablename~\thetable}
\def\table{\tabtrue\@float{table}}
\let\endtable\end@float
\@namedef{table*}{\@dblfloat{table}}
\@namedef{endtable*}{\end@dblfloat}

\def\figurename{Fig.}
\def\tablename{Table}


\def\ps@plain{\let\@mkboth\@gobbletwo
     \let\@oddhead\@empty\def\@oddfoot{\reset@font\hfil{\scriptsize[\thepage]}\hfil}\let\@evenhead\@empty\let\@evenfoot\@oddfoot}
\def\sectionmark#1{}
\newif\ifheadings
\headingsfalse
\def\ps@headings{\headingstrue\let\@mkboth\markboth
    \def\chaptermark##1{%
      \markboth {{%
        \ifnum \c@secnumdepth >\m@ne
          \if@mainmatter
            \thechapter.  %
          \fi
        \fi
        ##1}}{%
        \ifnum \c@secnumdepth >\m@ne
          \if@mainmatter
            \thechapter.  %
          \fi
        \fi
        ##1}}\def\sectionmark##1{%
      \markright {{%
        \ifnum \c@secnumdepth >\z@
         \thesection.  %
        \fi
        ##1}}}%
\def\@oddhead{\hbox{}\hfil{\footnotesize\rightmark \hfil\llap{\thepage}}}%
\def\@evenhead{{\footnotesize\rlap{\thepage}\hfil \leftmark\hfil\hbox{}}}%
\let\@oddfoot\@empty
\let\@evenfoot\@empty}


\def\ps@myheadings{\let\@mkboth\@gobbletwo
    \let\chaptermark\@gobble

\def\@oddhead{\hbox{}\hfil{\footnotesize\rightmark \hfil\llap{\thepage}}}%
\def\@evenhead{{\footnotesize\rlap{\thepage}\hfil \leftmark\hfil\hbox{}}}%
\let\@oddfoot\@empty
\let\@evenfoot\@empty}

\pagestyle{myheadings}

\def\@oparg#1[#2]{\@ifnextchar[{#1}{#1[#2]}}
\def\@thm#1#2#3{%
  \ifhmode\unskip\unskip\par\fi
  \normalfont
  \trivlist
  \let\thmheadnl\relax
  \let\thm@swap\@gobble
  \thm@headpunct{.}% add period after heading
  \thm@headsep .55em\relax
  \thm@space@setup
  #1% style overrides
  \@topsep \thm@preskip               % used by thm head
  \@topsepadd \thm@postskip           % used by \@endparenv
  \def\@tempa{#2}\ifx\@empty\@tempa
    \def\@tempa{\@oparg{\@begintheorem{#3}{}}[]}%
  \else
    \refstepcounter{#2}%
    \def\@tempa{\@oparg{\@begintheorem{#3}{\csname the#2\endcsname}}[]}%
  \fi
  \@tempa
}
\thm@bodyfont{\itshape}
\thm@notefont{\normalfont}
\let\thm@indent\noindent
\thm@headfont{\scshape}
\def\swappedhead#1#2#3{%
  {\thmnumber{#2}.}%
  \thmname{\@ifnotempty{#2}{~}#1}%
  \thmnote{ {\the\thm@notefont(#3)}}}
\def\th@plain{%
%%  \let\thm@indent\noindent % no indent
%%  \thm@headfont{\bfseries}% heading font is bold
%%  \thm@notefont{}% same as heading font
%%  \thm@headpunct{.}% add period after heading
%%  \let\thm@swap\@gobble
%%  \thm@postskip\theorempreskipamount
  \itshape % body font
}


\renewcommand \thechapter {\@arabic\c@chapter}
\renewcommand \thesection {\thechapter.\@arabic\c@section}
\renewcommand\thesubsection   {\thesection.\@arabic\c@subsection}
\renewcommand\thesubsubsection{\thesubsection.\@arabic\c@subsubsection}
\renewcommand\theparagraph    {\thesubsubsection.\@arabic\c@paragraph}
\renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph}

\newif\ifop
\optrue
\def\opust{\ifop\vrule height7.8cc width0pt\fi}

\newif\ifchaptersnewpage
\chaptersnewpagefalse
\def\chaptersnewpage{\chaptersnewpagetrue}
\renewcommand\chapter{\vskip-\lastskip
\vskip24pt plus2pt minus2pt 
\ifchaptersnewpage\clearpage
\thispagestyle{plain}%
\optrue\fi
\global\@topnum\z@
                    \@afterindentfalse
                    \secdef\@chapter\@schapter}

\def\@makechapterhead#1{%
  {\parindent \z@ \centering
    \normalfont
    \interlinepenalty\@M
    \large \bfseries \opust\thechapter. #1\par\nobreak
    \vskip12pt plus2pt minus2pt 
  }\opfalse}

\def\@schapter#1{\if@twocolumn
                   \@topnewpage[\@makeschapterhead{#1}]%
                 \else
                   \@makeschapterhead{#1}%
                   \@afterheading
                 \fi}
\def\@makeschapterhead#1{%
  {\parindent \z@ \centering
    \normalfont
    \interlinepenalty\@M
    \large \bfseries\opust  #1\par\nobreak
    \vskip12pt plus2pt minus2pt 
  }}


\newif\ifkropka
\kropkatrue
\def\bezkropki{\kropkafalse}
\def\@xsect#1{%
  \@tempskipa #1\relax
  \ifdim \@tempskipa>\z@
    \par \nobreak
    \vskip \@tempskipa
    \@afterheading
  \else
    \@nobreakfalse
    \global\@noskipsectrue
    \everypar{%
      \if@noskipsec
        \global\@noskipsecfalse
       {\setbox\z@\lastbox}%
        \clubpenalty\@M
        \begingroup \@svsechd\ifkropka.\fi\global\kropkatrue \endgroup
        \unskip
        \@tempskipa #1\relax
        \hskip -\@tempskipa
      \else
        \clubpenalty \@clubpenalty
        \everypar{}%
      \fi}%
  \fi
  \ignorespaces}

\def \section {\@startsection{section}{1}{0pt}%
  {-10pt plus-2pt}{-.55em}{\bf}}

\def \subsection {\@startsection{subsection}{2}{0pt}%
  {-4pt plus-2pt}{-.55em}{\bf}}

\def \subsubsection {\@startsection{subsubsection}{3}{0pt}%
  {-4pt plus-2pt}{-.55em}{\it}}

\def \paragraph {\@startsection{paragraph}{4}{0pt}%
  {-4pt plus-2pt}{-.55em}{\it}}

\def\@seccntformat#1{{\bf\csname the#1\endcsname.}\ \ignorespaces}

\def\sq{\unskip\kern5pt\vrule height4pt width4pt depth0pt}
\renewenvironment{proof}[1][\proofname]{\vskip-\lastskip\vskip4pt plus2pt
\noindent{\it#1.}\hods}{%
\sq\vskip4pt plus2pt
}
\renewcommand{\proofname}{Proof}
\def\qed{\sq}

\newif\ifrefnewpage
\refnewpagefalse
\def\refnewpage{\refnewpagetrue}
\renewenvironment{thebibliography}[1]
{\ifrefnewpage\clearpage\thispagestyle{plain}\optrue\fi
\ifheadings\markboth{References}{References}\fi
\phantomsection\chapter*{References}
\refstepcounter{chapter}%
\addcontentsline{toc}{chapter}{References}
 \footnotesize\baselineskip12pt plus.1pt minus.1pt
\labelsep6pt \advance\labelsep by.5em
      \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}}%
}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}

\renewenvironment{theindex}
               {\overfullrule0pt\if@twocolumn
                  \@restonecolfalse
                \else
                  \@restonecoltrue
                \fi
\chapter*{Index}\pdfbookmark[0]{Index}{index}\label{index}%
%\markboth{Index}{Index} 
\addcontentsline{toc}{chapter}{Index}
 \footnotesize\baselineskip12pt plus.1pt minus.1pt%\section*{\indexname}
%
\begin{multicols}2\markboth{Index}{Index}
\parindent\z@
                \parskip\z@ \@plus .3\p@\relax
                \let\item\@idxitem}
               {\end{multicols}}
\renewcommand\indexspace{\par \vskip 8\p@ \@plus5\p@ \@minus3\p@\relax}
\renewcommand\@idxitem{\par\hangindent 30\p@}
\renewcommand\subitem{\@idxitem \hspace*{15\p@}}
\renewcommand\subsubitem{\@idxitem \hspace*{30\p@}}

%% Footnotes:

\footnotesep = 0pt
\def \footnoterule {\kern -3.3\p@
  \hrule \@width 4cc \relax
  \kern 2.9\p@ }
\def\@makefnmark{\hbox{\rm(\@textsuperscript{\normalfont\@thefnmark})}}
\renewcommand\@makefntext[1]{%
    \parindent 15\p@
\leavevmode\@makefnmark~\strut#1\strut}
\def\thefootnote{\arabic{footnote}}

\newenvironment{abstract}{\vfill\eject%
\chapter*{Abstract}\pdfbookmark[0]{Abstract}{abstract}\label{abstract}%
\@beginparpenalty\@lowpenalty
\thispagestyle{plain}\footnotesize
}%
     {\par}


\def\keyw{***}
\def\mathcl{***}
\def\keywords#1{\def\keyw{#1}}
\def\mathclass#1{\def\mathcl{#1}}
\def\xrec{***}
\def\xrevd{***}
\def\rec#1{\def\xrec{#1}}
\def\revd#1{\def\xrevd{#1}}
\def\ack{}
\long\def\thanks#1{\def\ack{\noindent{\it Acknowledgements.}\hods#1\vskip24pt plus2pt minus2pt}}
\long\def\makeabstract{\vskip24pt plus2pt minus2pt
\footnotesize
\ack
\hangindent=15pt\hangafter1\noindent
{2020 \it Mathematics Subject Classification}\/: \mathcl\par
\hangindent=15pt\hangafter1\noindent
{\it Key words and phrases}\/: \keyw\par
%\noindent Received \xrec\setbox0=\hbox{\xrevd}\ifdim\wd0>30pt; revised version \xrevd\fi.
\par\vfill\eject\thispagestyle{plain}\normalsize}

\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\renewcommand\tableofcontents{%
  \chapter*{\contentsname}\pdfbookmark[0]{\contentsname}{contents}\label{contents}\thispagestyle{plain}%
\footnotesize 
  \@starttoc{toc}%
\par\normalsize
   }

\def\@dottedtocline#1#2#3#4#5{%
  \ifnum #1>\c@tocdepth \else
    {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
     \parindent #2\relax\@afterindenttrue
     \interlinepenalty\@M
     \leavevmode
     \@tempdima #3\relax
     \advance\leftskip \@tempdima 
\null\nobreak\hskip -\leftskip
     {#4}\nobreak
     \leaders\hbox{$\m@th
        \mkern1.5mu% \@dotsep mu
\hbox{.}\mkern 1.5mu%\@dotsep        mu
$}\hfill
     \nobreak
     \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5}%
     \par}%
  \fi}

\def\numberline#1{\hb@xt@\@tempdima{#1.\hfil}}
\def\numberline#1{{#1.\enskip}}

\renewcommand*\l@chapter{\@dottedtocline{1}{0em}{1.1em}}%
\renewcommand*\l@section{\@dottedtocline{2}{1.1em}{2em}}%
\renewcommand*\l@subsection{\@dottedtocline{3}{3.1em}{2.7em}}%
\renewcommand*\l@subsubsection{\@dottedtocline{4}{5.8em}{3.6em}}%
\renewcommand*\l@paragraph{\@dottedtocline{5}{9.4em}{4.3em}}%

\renewcommand*\l@chapter{\@dottedtocline{1}{0em}{0em}}%
\renewcommand*\l@section{\@dottedtocline{2}{2em}{0em}}%
\renewcommand*\l@subsection{\@dottedtocline{3}{4em}{0em}}%
\renewcommand*\l@subsubsection{\@dottedtocline{6}{3em}{0em}}%
\renewcommand*\l@paragraph{\@dottedtocline{5}{8em}{0em}}%


\def\eqnarray{\stepcounter{equation}\let\@currentlabel\theequation
\global\@eqnswtrue\m@th
\global\@eqcnt\z@\tabskip\@centering\let\\\@eqncr
$$\halign to\displaywidth\bgroup\@eqnsel\hskip\@centering
  $\displaystyle\tabskip\z@{##}$&\global\@eqcnt\@ne
  \hfil${{}##{}}$\hfil
  &\global\@eqcnt\tw@ $\displaystyle\tabskip\z@{##}$\hfil
   \tabskip\@centering&\llap{##}\tabskip\z@\cr}

\def\hods{\unskip\kern.55em\ignorespaces}
\def\mods{\vskip-\lastskip\vskip4pt}
\def\ods{\vskip-\lastskip\vskip4pt plus2pt}
\def\bods{\vskip-\lastskip\vskip12pt plus2pt minus2pt}

\newbox\aubox
\newbox\auadbox
\newbox\abox
\newbox\bbox
\def\title#1{\def\tyt{#1}}
\def\author#1{\setbox\auadbox=\vbox{\unvbox\auadbox\noindent #1\strut}%
\global\setbox\bbox=\hbox{\bf\ifdim\wd\bbox>0pt\unhbox\bbox, \else\unhbox\bbox\fi \unhbox\abox}%
\global\setbox\abox=\hbox{\bf\MakeUppercase{#1}}%
}

\def\address#1{\setbox\auadbox=\vbox{\unvbox\auadbox\noindent\strut #1\vskip10pt}}

\def\abbrevauthors#1{\def\lmark{#1}}
\def\abbrevtitle#1{\def\rmark{#1}}
\long\def\maketitledis{\thispagestyle{empty}\null\vfill\markboth{\lmark}{\rmark}%
\begin{center}\normalsize\bf\leavevmode\ifdim\wd\bbox>0pt\box\bbox\ and 
\box\abox\else \box\abox\fi\vskip14dd\large\bf\tyt\end{center}\vfill\null
\newpage\thispagestyle{empty}
\box\auadbox\newpage}

\frenchspacing

\flushbottom


