% This is the file `notemata.cls',
% obtained from the file `article.cls', part of the
% LaTeX2e distribution 1999/09/10 v1.4a
% Version for Authors
%
\def\filedate{2020/12/26}
\def\NoteMatVer{1.2}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{notemata}
              [\filedate\space
 Note di Matematica v.\NoteMatVer\space LaTeX document class]
%----------------------------------------------------------------------------%
% STYLE OPTIONS
%----------------------------------------------------------------------------%
\DeclareOption{a4paper}
   {\setlength\paperheight {297mm}%
    \setlength\paperwidth  {210mm}}
\DeclareOption{a5paper}
   {\setlength\paperheight {210mm}%
    \setlength\paperwidth  {148mm}}
\DeclareOption{b5paper}
   {\setlength\paperheight {250mm}%
    \setlength\paperwidth  {176mm}}
\DeclareOption{letterpaper}
   {\setlength\paperheight {11in}%
    \setlength\paperwidth  {8.5in}}
\DeclareOption{legalpaper}
   {\setlength\paperheight {14in}%
    \setlength\paperwidth  {8.5in}}
\DeclareOption{executivepaper}
   {\setlength\paperheight {10.5in}%
    \setlength\paperwidth  {7.25in}}
\DeclareOption{landscape}
   {\setlength\@tempdima   {\paperheight}%
    \setlength\paperheight {\paperwidth}%
    \setlength\paperwidth  {\@tempdima}}
\DeclareOption{twoside}{\@twosidetrue  \@mparswitchtrue}
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\DeclareOption{final}{\setlength\overfullrule{0pt}}
\ExecuteOptions{a4paper,twoside,final}
\ProcessOptions
\input{leqno.clo}
%-----------------------------------------------------------------------------%
% SIZE
%-----------------------------------------------------------------------------%
% 1pt = 0.3514598mm   1in = 25.4mm   1in = 72.27pt
\renewcommand\normalsize{%
   \@setfontsize\normalsize\@xipt{13.6}%
   \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
   \belowdisplayskip \abovedisplayskip
   \let\@listi\@listI}
\normalsize
\newcommand\small{%
   \@setfontsize\small\@xpt\@xiipt
   \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
   \def\@listi{\leftmargin\leftmargini
               \topsep 6\p@ \@plus2\p@ \@minus2\p@
               \parsep 3\p@ \@plus2\p@ \@minus\p@
               \itemsep \parsep}%
   \belowdisplayskip \abovedisplayskip
}
\newcommand\footnotesize{%
   \@setfontsize\footnotesize\@ixpt{11}%
   \abovedisplayskip 8\p@ \@plus2\p@ \@minus4\p@
   \abovedisplayshortskip \z@ \@plus\p@
   \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
   \def\@listi{\leftmargin\leftmargini
               \topsep 4\p@ \@plus2\p@ \@minus2\p@
               \parsep 2\p@ \@plus\p@ \@minus\p@
               \itemsep \parsep}%
   \belowdisplayskip \abovedisplayskip
}
\newcommand\scriptsize{\@setfontsize\scriptsize\@viiipt{9.5}}
\newcommand\tiny{\@setfontsize\tiny\@vipt\@viipt}
\newcommand\large{\@setfontsize\large\@xiipt{14}}
\newcommand\Large{\@setfontsize\Large\@xivpt{18}}
\newcommand\LARGE{\@setfontsize\LARGE\@xviipt{22}}
\newcommand\huge{\@setfontsize\huge\@xxpt{25}}
\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
%--------------------------------------------------------------------%
% PAGE SIZES
%--------------------------------------------------------------------%
% Horizontal length parameters
% 25.4mm (one inch)+\oddsidemargin+\textwidth+
% \marginparsep+\marginparwidth - 210mm (A4 width) = extra right space
% Vertical length parameters
% 25.4mm+\topmargin+\headheight+\headsep+\textheight
%       +\footskip+20mm=295mm
% (A4 height)

\setlength\parindent        {17\p@}
\setlength\smallskipamount  {3\p@ \@plus 1\p@ \@minus 1\p@}
\setlength\medskipamount    {6\p@ \@plus 2\p@ \@minus 2\p@}
\setlength\bigskipamount    {12\p@ \@plus 4\p@ \@minus 4\p@}
\setlength\headheight       {12\p@}
\setlength\headsep          {25\p@}
\setlength\topskip          {11\p@}
\setlength\footskip         {30\p@}
\setlength\maxdepth         {.5\topskip}
\setlength\textwidth        {132.64mm}% text width proportional
                                      % to 12pt size
\setlength\textheight       {190mm}   % text body height for 44 lines
\addtolength\textheight     {\topskip}
\setlength\marginparsep     {10\p@}
\setlength\marginparpush    {5\p@}
\setlength\@tempdima        {\paperwidth}
\addtolength\@tempdima      {-\textwidth}
\setlength\oddsidemargin    {.4\@tempdima}
\addtolength\oddsidemargin  {-1in}
\setlength\marginparwidth   {.6\@tempdima}
\addtolength\marginparwidth {-\marginparsep}
\addtolength\marginparwidth {-0.4in}
%\setlength\evensidemargin   {.4\@tempdima}
\setlength\topmargin        {\paperheight}
\addtolength\topmargin      {-2in}
\addtolength\topmargin      {-\headheight}
\addtolength\topmargin      {-\headsep}
\addtolength\topmargin      {-\textheight}
\addtolength\topmargin      {-\footskip}     % this might be wrong!
\addtolength\topmargin      {-.5\topmargin}
\@settopoint\topmargin
\setlength\footnotesep      {7.7\p@}
\setlength{\skip\footins}   {10\p@ \@plus 4\p@ \@minus 2\p@}
\setlength\floatsep         {12\p@ \@plus 2\p@ \@minus 2\p@}
\setlength\textfloatsep     {20\p@ \@plus 2\p@ \@minus 4\p@}
\setlength\intextsep        {12\p@ \@plus 2\p@ \@minus 2\p@}
\setlength\dblfloatsep      {12\p@ \@plus 2\p@ \@minus 2\p@}
\setlength\dbltextfloatsep  {20\p@ \@plus 2\p@ \@minus 4\p@}
\setlength\@fptop           {0\p@ \@plus 1fil}
\setlength\@fpsep           {8\p@ \@plus 2fil}
\setlength\@fpbot           {0\p@ \@plus 1fil}
\setlength\@dblfptop        {0\p@ \@plus 1fil}
\setlength\@dblfpsep        {8\p@ \@plus 2fil}
\setlength\@dblfpbot        {0\p@ \@plus 1fil}
\setlength\partopsep        {3\p@ \@plus 1\p@ \@minus 1\p@}
%--------------------------------------------------------------------%
% LIST PARAMETERS
%--------------------------------------------------------------------%
\def\@listi{\leftmargin\leftmargini
            \parsep 4.5\p@ \@plus2\p@ \@minus\p@
            \topsep 9\p@   \@plus3\p@ \@minus5\p@
            \itemsep4.5\p@ \@plus2\p@ \@minus\p@}
\let\@listI\@listi
\@listi
\def\@listii {\leftmargin\leftmarginii
              \labelwidth\leftmarginii
              \advance\labelwidth-\labelsep
              \topsep    4.5\p@ \@plus2\p@ \@minus\p@
              \parsep    2\p@   \@plus\p@  \@minus\p@
              \itemsep   \parsep}
\def\@listiii{\leftmargin\leftmarginiii
              \labelwidth\leftmarginiii
              \advance\labelwidth-\labelsep
              \topsep    2\p@ \@plus\p@\@minus\p@
              \parsep    \z@
              \partopsep \p@ \@plus\z@ \@minus\p@
              \itemsep   \topsep}
\def\@listiv {\leftmargin\leftmarginiv
              \labelwidth\leftmarginiv
              \advance\labelwidth-\labelsep}
\def\@listv  {\leftmargin\leftmarginv
              \labelwidth\leftmarginv
              \advance\labelwidth-\labelsep}
\def\@listvi {\leftmargin\leftmarginvi
              \labelwidth\leftmarginvi
              \advance\labelwidth-\labelsep}
%% End of size 10pt specifications.
\setlength\lineskip{1\p@}
\setlength\normallineskip{1\p@}
\renewcommand\baselinestretch{}
\setlength\parskip{0\p@ \@plus \p@}
\@lowpenalty   51
\@medpenalty  151
\@highpenalty 301
\setcounter{topnumber}{2}
\renewcommand\topfraction{.7}
\setcounter{bottomnumber}{1}
\renewcommand\bottomfraction{.3}
\setcounter{totalnumber}{3}
\renewcommand\textfraction{.2}
\renewcommand\floatpagefraction{.5}
\setcounter{dbltopnumber}{2}
\renewcommand\dbltopfraction{.7}
\renewcommand\dblfloatpagefraction{.5}
%-----------------------------------------------------------------------------%
% ARTICLE ENVIRONMENT
%-----------------------------------------------------------------------------%
% frontmatter
\def\frontmatter{\begingroup\thispagestyle{empty}%
    \renewcommand{\thepage}{\roman{page}}\setcounter{page}{1}}
\def\endfrontmatter{\newpage\endgroup\setcounter{page}{1}}

% \newenvironment{notes}{\sectioncmd*{\notesname}\footnotesize
%                     \begin{enumerate}}{\end{enumerate}%
%                       \par \vskip 6pt \@plus 12pt \@minus 2pt}

% acknowledgements
\def\acknowledgementsname{Acknowledgements.}%
\def\acknowledgements{\paragraph{\acknowledgementsname}%
  \message{\acknowledgementsname}}
\def\endacknowledgements{\par \bigskip}
% titlepage
\gdef\title#1{\title@{#1}}
\gdef\author#1{\author@{#1}}
\gdef\date#1{\date@{#1}}
\gdef\nodagger@{%
  \def\@fnsymbol##1{\ensuremath{\ifcase##1\or *\or \ddagger\or
  \mathsection\or \mathparagraph\or \|\or **
  \or \ddagger\ddagger \else\@ctrerr\fi}}}
\def\opening{%
  \let\title=\title@
  \let\author=\author@
  \let\date=\date@
  \let\doi=\@doi
  \let\subtitle=\subtitle@
  \let\dedication=\dedication@
  \let\received=\received@
  \let\accepted=\accepted@
  \let\revised=\revised@
  \let\institute=\institute@
  \hsize\textwidth
  \let\nodagger\nodagger@
  }
\gdef\maketitle{\endopening}
\def\endopening{%
   \ifx\listfiles\@notprerr \maketitle@@ \else
   \AtBeginDocument{\maketitle@@}\fi
  \gdef\title##1{\opening@only\title}
  \gdef\subtitle##1{\opening@only\subtitle}
  \gdef\dedication##1{\opening@only\dedication}
  \gdef\received##1{\opening@only\received}
  \gdef\revised##1{\opening@only\revised}
  \gdef\author##1{\opening@only\author}
  \gdef\institute##1{\opening@only\institute}
  \gdef\date##1{\opening@only\date}%
  \gdef\nodagger{\opening@only\nodagger}
  }
\def\opening@only#1{\PackageWarning{notemat}{\string#1\space
                effective only inside opening environment.}}
\def\authorsize{\normalsize\bfseries \raggedright}
\def\authorcase#1{#1}
\def\authorindent{0pt}
\def\afterallauthorsskip{1em\relax}
\def\afterauthorskip{0pt}
\def\institutesize{\footnotesize\it}
\def\institutecase#1{#1}
\def\instituteindent{0pt}
\def\institutesep{.4\baselineskip}
\def\authorand{and}
\newtoks\@temptokenb
\long\def\append@item#1\to#2{%
  \@temptokena={\@k@p{#1}}%
  \@temptokenb=\expandafter{#2}%
  \xdef#2{\the\@temptokenb\the\@temptokena}}
\def\get@left#1\to#2{\expandafter\g@l#1\g@l#1#2}
\long\def\g@l\@k@p#1#2\g@l#3#4{\def#4{#1}\def#3{#2}}
\def\@authors{}%
\def\@allauthors{}%
\def\@institutes{}%
\def\@instituteauthors{}%
\def\@curauths{}
\def\@curinst{}
\def\author@#1{\append@item#1\to\@authors
  \append@item#1\to\@allauthors }
\def\institute@#1{\append@item#1\to\@institutes
  \expandafter\append@item\expandafter{\@authors}\to\@instituteauthors
  \gdef\@authors{}}
\newif\ifthanks
\def\@formatname#1#2{\begingroup
   \def\thanks##1{\global\thankstrue}\setbox0\vbox{#1}%
   \endgroup
   \begingroup
   \ifthanks
     \edef\fn##1\thanks##2{\authorcase{##1}\/%
        \noexpand\thanks{##2}#2}\expandafter\fn#1
   \else
      \edef\fn##1{{\authorcase{##1}}#2}%
        \expandafter\fn\expandafter{#1}%
   \fi
   \endgroup\global\thanksfalse }
\newcount\cnt@authors
\def\@formatauthors{\begingroup
  \authorsize
  \leavevmode
  \gdef\surname##1{##1}%
  \gdef\email##1{ \hbox{{\tt \lowercase{##1}}}}%
  \cnt@authors=0
  \def\@k@p##1{\advance\cnt@authors by 1}\@curauths
  \def\@k@p##1{\advance\cnt@authors by -1
    \ifnum\cnt@authors>1
    \@formatname{##1}{,}\penalty0\ \fi     % signif. space
    \ifnum\cnt@authors=1                               % before \fi's !!
    \@formatname{##1}{} \authorand \penalty0\ \fi
    \ifnum\cnt@authors<1
    \@formatname{##1}{}\par\fi}\@curauths
   \vskip \afterauthorskip
  \endgroup}
\def\@formatinstitute{{\institutesize \institutecase{\@curinst}\par}}
\newcount\cnt@institutes
\def\@authorsandinstitutes{\begingroup
  \authorsize
  \cnt@authors=0
  \def\@k@p##1{\advance\cnt@authors by 1}\@allauthors
  \cnt@institutes=0
  \def\@k@p##1{\advance\cnt@institutes by 1}\@institutes\relax
  \ifnum\cnt@institutes=0
    \let\@curauths\@allauthors
    \parindent=\authorindent
    \hangindent=\authorindent
    \@formatauthors
  \fi
  \loop\ifnum\cnt@institutes>0
    \get@left\@instituteauthors\to\@curauths
    \parindent=\authorindent
    \hangindent=\authorindent
    \@formatauthors
    \get@left\@institutes\to\@curinst
    \parindent=\instituteindent
    \hangindent=\instituteindent
    \@formatinstitute
    \ifnum\cnt@institutes>1 \vskip \institutesep\relax \fi
    \advance\cnt@institutes by -1
  \repeat
  \vskip \afterallauthorsskip
  \gdef\@authors{}%
  \gdef\@allauthors{}%
  \gdef\@institutes{}%
  \gdef\@instituteauthors{}%
  \gdef\@curauths{}%
  \gdef\@curinst{}%
\endgroup}
\def\titleflushstyle{\raggedright}
\def\titlefont{\LARGE\bf}
\def\titlecase#1{#1}
\def\titleindent{0pt}
%\def\pretitleskip{5cm }
\def\aftertitleskip{1.8pc }
\def\presubtitleskip{-1.4pc }
\def\aftersubtitleskip{1pc }
\def\subtitlefont{\large\it}
\def\subtitleflushstyle{}
\def\title@#1{\gdef\@title{%\par\vskip\pretitleskip\par%
    \@formattitle{#1}\par \vskip \aftertitleskip }}
\def\@title{}
\def\@formattitle#1{\begingroup
  \def\thanks##1{\global\thankstrue}%
  \setbox\@tempboxa\vbox{#1}\endgroup
  \begingroup
    \titleflushstyle
    \ifthanks
      \def\fn##1\thanks##2{\ititle@{##1}{\,\thanks{##2}}}%
      \expandafter\fn#1
    \else
      \def\fn##1{\ititle@{##1}{}}\expandafter\fn\expandafter{#1}%
    \fi
  \endgroup\global\thanksfalse }
\def\titlebaselinefactor{1.05}
\def\ititle@#1#2{\begingroup
    \parindent \titleindent
    \hangindent \titleindent
    \hyphenpenalty10000
    {\titlefont\titlecase{#1}#2%
    \baselineskip=\titlebaselinefactor\baselineskip
    \par}
    \endgroup}
\def\@subtitle{}
\def\subtitle@#1{\gdef\@subtitle{\vskip \presubtitleskip
    \@formatsubtitle{#1}\par \vskip \aftersubtitleskip }}
\def\@formatsubtitle#1{\begingroup
  \def\thanks##1{\global\thankstrue}\setbox0\vbox{#1}\endgroup
  \begingroup \subtitleflushstyle
    \ifthanks
  \def\fn##1\thanks##2{\subtitle@thanks{##1}{##2}}\expandafter\fn#1
    \else
      \def\fn##1{\subtitle@@{##1}}\expandafter\fn\expandafter{#1}\fi
  \endgroup
  \par\global\thanksfalse}
\def\subtitle@thanks#1#2{\isubtitle@{#1}\thanks{#2}\par
    \ignorespaces}
\def\subtitle@@#1{\isubtitle@{#1}\par\ignorespaces}
\def\isubtitle@#1{{\subtitlefont #1}}
\def\afterdateskip{.7\baselineskip}
\def\datesize{\footnotesize}
\def\@date{{\datesize Received: \@received ;
    accepted\@accepted}\vskip \afterdateskip
    \gdef\@received{\ldots\ldots}%
    \gdef\@accepted{\ldots\ldots}}
\def\date@#1{\gdef\@date{{\datesize #1\par}\vskip \afterdateskip
    \gdef\@received{\ldots\ldots}%
    \gdef\@accepted{\ldots\ldots}}}
\def\@received{\ldots\ldots}
\def\@accepted{: \ldots\ldots}
%\def\revised@#1{\gdef\@accepted{ in revised form: #1}}
\def\received@#1{\gdef\@received{#1}}
\def\accepted@#1{\gdef\@accepted{%
%in final form:
: #1.}}
\def\artsize{\normalsize\it}
\def\afterartskip{1.5pc}
\def\beforeartskip{0pc}
\def\@dedication{}
\def\dedicationsize{\normalsize\it\raggedright}
\def\prededicationskip{18pt}
\def\afterdedicationskip{18pt}
\def\dedication@#1{\gdef\@dedication{%
     \unskip\vskip \prededicationskip
     {\dedicationsize #1\par}%
     \vskip \afterdedicationskip}}
\providecommand{\abstractname}{Abstract}
\providecommand{\keywordsname}{Keywords}
\providecommand{\classificationname}{MSC 2020 classification}
\def\abstractsize{\footnotesize}
\def\abstractnamefont{\bf}
\def\abstractdot{.~}
\def\keynamefont{\bf}
\def\classnamefont{\bf}
\def\afterabstractskip{.7\baselineskip\relax}
\def\preabstractskip{0pt\relax}
\newbox\@abstractbox
\def\@abstract{}
\newenvironment{abstract}{%
  \gdef\@abstract{\message{\abstractname}%
    {\vskip\preabstractskip
    \noindent
    \unvbox\@abstractbox
    \vskip\afterabstractskip }}%
  \global\setbox\@abstractbox\vbox\bgroup \abstractsize \noindent
    {\abstractnamefont\small\abstractname\abstractdot}}{\par\egroup }
\def\@keywords{}
\long\def\keywords#1{%
    \gdef\@keywords{\message{\keywordsname}%
        {\abstractsize\noindent{\keynamefont
      \small\keywordsname:~}#1\par \vskip.7\baselineskip}}}
\def\@classification{}
\long\def\classification#1{%
     \gdef\@classification{\message{\classificationname}%
       {\abstractsize\noindent{\classnamefont\small\classificationname:~}%
       #1\par \vskip.7\baselineskip}}}
\def\@maketitle{%
   \@title \@subtitle \@authorsandinstitutes \@date
   \@abstract \@keywords \@classification
   \@dedication}
\def\openingflushstyle{}
\def\maketitle@@{%
  \begingroup
     \setcounter{footnote}{0}%
     \def\thefootnote{\roman{footnote}}%
     \newpage\global\@topnum\z@
     \thispagestyle{opening}%
     {\openingflushstyle \parindent 0pt \@maketitle}%
     \markboth{\@runningauthor}{\@runningtitle}%
     \@thanks
     \footnotetext[0]{\small\texttt{https://ese-journals.unisalento.it/}
       \copyright\ \@pubyear\ Universit\`a del Salento}
   \endgroup
   \setcounter{footnote}{0}%
   \let\@maketitle\relax%
   \gdef\@thanks{}%
   \gdef\@title{}%
   \let\thanks\relax }
\def\runningtitle#1{\gdef\@runningtitle{#1}}
\gdef\@runningtitle{}
\def\runningauthor#1{\gdef\@runningauthor{#1}}
\gdef\@runningauthor{}
% titlepage headings -------------------------------------------------
\def\@issndata{}
\def\@journal{Note di Matematica}
\newcommand\volume[1]{\gdef\@volume{#1}}
\def\@volume{00}
\newcommand\pubyear[1]{\gdef\@pubyear{#1}}
\def\@pubyear{\number\year}
\newcommand\no[1]{\gdef\@no{#1}}
\def\@no{0}
%\newcommand\doi[1]{\gdef\@doi{#1}}
%\def\@doi{doi:}
\newcommand\doi{\gdef\@doi}
\def\@doi{}
% --------------------------------------------------------------------
\newif\iflastpagegiven\lastpagegivenfalse
\newcommand\firstpage[1]{%
  \gdef\@firstpage{#1}%
  \ifnum\@firstpage>\c@page
    \setcounter{page}{#1}%
    \PackageWarning{notemat}{Increasing pagenumber to \@firstpage}%
  \else \ifnum\@firstpage<\c@page
    \PackageWarning{notemat}{Firstpage lower than pagenumber}\fi\fi
    \xdef\@firstpage{\the\c@page}%
    }
\def\@firstpage{1}
\def\pagenumbering#1{%
    \global\c@page \@ne
    \gdef\thepage{\csname @#1\endcsname \c@page}%
    \gdef\thefirstpage{%
            \csname @#1\endcsname \@firstpage}%
    \gdef\thelastpage{%
            \csname @#1\endcsname \@lastpage}%
    }
\pagenumbering{arabic}
\newcommand\lastpage[1]{\xdef\@lastpage{#1}%
  \global\lastpagegiventrue}
\def\@lastpage{0}
\def\setlastpage{\iflastpagegiven\else
    \edef\@tempa{@lastpage@\the\c@article}%
    \expandafter
    \ifx \csname \@tempa \endcsname \relax
        \gdef\@lastpage{0}%
    \else
        \xdef\@lastpage{\@nameuse{@lastpage@\the\c@article}}%
    \fi
    \fi }
\def\writelastpage{%
    \iflastpagegiven \else
    \immediate\write\@auxout%
    {\string\global\string\@namedef{@lastpage@\the\c@article}{\the\c@page}}%
    \fi
    }
\def\thepagerange{%
  \ifnum\@lastpage =0 {\ \bf PLEASE RUN AGAIN} \else
  \ifnum\@lastpage = \@firstpage \ \thefirstpage\else
  \ \thefirstpage--\thelastpage \fi\fi}
\def\volsep{, }
\def\thejournal{
  % \ifx\@journal\empty\else
%\leavevmode
     {Note di Matematica, manuscript, pages}~{}\thepagerange. \hfill\hbox{}%
%\fi
}
\gdef\@notemathead{\parindent 0pt
        \parbox{\textwidth}{{\small\thejournal\hfill\@issndata}}}
\gdef\@notematfoot{}
%-----------------------------------------------------------------------------%
% PAGE STYLES
%-----------------------------------------------------------------------------%
\gdef\markboth#1#2{{\let\protect=\noexpand
    \xdef\myleftmark{\small{#1}}%
    \xdef\myrightmark{\small{#2}}}}
\let\imarkboth\markboth
\def\myleftmark{}
\def\myrightmark{}
\def\@markfont{\rm\scriptsize}
\def\@pgnumfont{\rm\normalsize}
\def\ps@headings{%
  \def\@oddfoot{}%
  \let\@evenfoot\@oddfoot
  \def\@evenhead{\hbox{}\@pgnumfont\rlap{\thepage}\hfil
    \@markfont\myleftmark\hfil}%
  \def\@oddhead{\hbox{}\hfil\@markfont\myrightmark\hfil
    \@pgnumfont\llap{\thepage}}%
  \let\@mkboth\@gobbletwo
  \def\sectionmark##1{}%
  \def\subsectionmark##1{}}
\def\ps@myheadings{%
  \def\@oddfoot{}%
  \let\@evenfoot\@oddfoot
  \def\@evenhead{\hbox{}\@pgnumfont\rlap{\thepage}\hfill
    \@markfont\myleftmark}%
  \def\@oddhead{\hbox{}\@markfont\myrightmark\hfill
    \@pgnumfont\llap{\thepage}}%
  \let\@mkboth\@gobbletwo
  \def\sectionmark##1{}%
  \def\subsectionmark##1{}}
\def\ps@empty{%
  \def\@oddfoot{}%
  \let\@evenfoot\@oddfoot
  \def\@evenhead{}%
  \def\@oddhead{}%
  \let\@mkboth\@gobbletwo
  \def\sectionmark##1{}%
  \def\subsectionmark##1{}}
%\let\ps@title\ps@empty
\def\theinheadpage{\thepage}
\def\ps@opening{%
  \def\@oddhead{\@notemathead \hss}%
  \let\@evenhead\@oddhead
%  \def\@oddfoot{\hss}
  \def\@oddfoot{%
%\hfil\theinheadpage\hfil
}
  \let\@evenfoot\@oddfoot}
% article environment
\newcounter{article}
\renewcommand{\thearticle}{}
\let\art@intdefinecounter\@definecounter
\newif\ifinarticle % \inarticlefalse
\newenvironment{article}{%
  \def\@definecounter##1{\art@intdefinecounter{##1}%
    \@addtoreset{##1}{article}}%
  \renewcommand{\thearticle}{\roman{article}}%
  \refstepcounter{article}%
  \message{Article \number\c@article}%
  \gdef\@firstpage{\the\c@page}%
  \@addtoreset{equation}{article}%
  \@addtoreset{section}{article}%
  \@addtoreset{table}{article}%
  \@addtoreset{figure}{article}%
  \setlastpage
  \global\inarticletrue
  }{\writelastpage
    \clearpage
      \ifodd \c@page \else ~\thispagestyle{empty}\newpage \fi
    \gdef\@dedication{}%
    \gdef\@title{}\gdef\@subtitle{}%
    \gdef\@keywords{}\gdef\@classification{}%
    \gdef\@abstract{}%
   % \gdef\@notemathead{}\gdef\@notematfoot{}%
    \gdef\@firstpage{\thepage}%
    \global\lastpagegivenfalse
    \global\inarticlefalse
    }
\AtBeginDocument{\setlastpage}
\AtEndDocument{\ifnum \c@article=0
    \writelastpage
    \clearpage\fi}
%-----------------------------------------------------------------------------%
% SECTIONING
%-----------------------------------------------------------------------------%
\setcounter {secnumdepth}{3}
\newcounter {section}
\newcounter {subsection}[section]
\newcounter {subsubsection}[subsection]
\newcounter {paragraph}[subsubsection]
\newcounter {subparagraph}[paragraph]

\renewcommand \thesection {\@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}

\newcommand\section{\@startsection {section}{1}{0pt}%
                                   {3.5ex \@plus 1ex \@minus .2ex}%
                                   {2.3ex \@plus.2ex}%
                                   {\normalfont\Large\bfseries}}
\newcommand\subsection{\@startsection{subsection}{2}{0pt}%
                                     {3.25ex\@plus 1ex \@minus .2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\large\bfseries}}
\newcommand\subsubsection{\@startsection{subsubsection}{3}
                                     {0pt}%
                                     {3.25ex\@plus 1ex \@minus .2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\normalsize\bfseries}
                                     }
\newcommand\paragraph{\@startsection{paragraph}{4}{\parindent}%
                                    {3.25ex \@plus1ex \@minus.2ex}%
                                    {-1em}%
                                    {\normalfont\normalsize\bfseries}}
\newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
                                    {3.25ex \@plus1ex \@minus.2ex}%
                                    {-1em}%
                                    {\normalfont\normalsize\bfseries}}
%-----------------------------------------------------------------------------%
% LIST PARAMETERS
%-----------------------------------------------------------------------------%
\setlength\leftmargini  {2.5em}
\leftmargin  \leftmargini
\setlength\leftmarginii  {2.2em}
\setlength\leftmarginiii {1.87em}
\setlength\leftmarginiv  {1.7em}
\setlength\leftmarginv  {1em}
\setlength\leftmarginvi {1em}
\setlength  \labelsep  {.5em}
\setlength  \labelwidth{\leftmargini}
\addtolength\labelwidth{-\labelsep}
\@beginparpenalty -\@lowpenalty
\@endparpenalty   -\@lowpenalty
\@itempenalty     -\@lowpenalty
\renewcommand\theenumi{\@arabic\c@enumi}
\renewcommand\theenumii{\@alph\c@enumii}
\renewcommand\theenumiii{\@roman\c@enumiii}
\renewcommand\theenumiv{\@Alph\c@enumiv}
\newcommand\labelenumi{(\theenumi)}   %
\newcommand\labelenumii{\theenumii.}   %
\newcommand\labelenumiii{\theenumiii.}
\newcommand\labelenumiv{\theenumiv.}
\renewcommand\p@enumii{\theenumi}
\renewcommand\p@enumiii{\theenumi(\theenumii)}
\renewcommand\p@enumiv{\p@enumiii\theenumiii}
\newcommand\labelitemi{\textbullet}
\newcommand\labelitemii{\normalfont\bfseries \textendash}
\newcommand\labelitemiii{\textasteriskcentered}
\newcommand\labelitemiv{\textperiodcentered}
%-----------------------------------------------------------------------------%
% ENVIRONMENTS
%-----------------------------------------------------------------------------%
% Appendix
\newcommand{\nmappendix}{
\section*{\indent\appendixname}
\addcontentsline{toc}{section}{\hspace*{1.5em}\appendixname}
\refstepcounter{section}
\renewcommand{\thesection}{\Alph{section}}
}
% Description
\newenvironment{description}
               {\list{}{\labelwidth\z@ \itemindent-\leftmargin
                        \let\makelabel\descriptionlabel}}
               {\endlist}
\newcommand*\descriptionlabel[1]{\hspace\labelsep
                                \normalfont\bfseries #1}
% Verse
\newenvironment{verse}
               {\let\\\@centercr
                \list{}{\itemsep      \z@
                        \itemindent   -1.5em%
                        \listparindent\itemindent
                        \rightmargin  \leftmargin
                        \advance\leftmargin 1.5em}%
                \item\relax}
               {\endlist}
% Quotation
\newenvironment{quotation}
               {\list{}{\listparindent 1.5em%
                        \itemindent    \listparindent
                        \rightmargin   \leftmargin
                        \parsep        \z@ \@plus\p@}%
                \item\relax}
               {\endlist}
% Quote
\newenvironment{quote}
               {\list{}{\rightmargin\leftmargin}%
                \item\relax}
               {\endlist}
% tab parameters
\setlength\arraycolsep{5\p@}
\setlength\tabcolsep{6\p@}
\setlength\arrayrulewidth{.4\p@}
\setlength\doublerulesep{2\p@}
\setlength\tabbingsep{\labelsep}
\skip\@mpfootins = \skip\footins
\setlength\fboxsep{3\p@}
\setlength\fboxrule{.4\p@}
\renewcommand \theequation {\@arabic\c@equation}
% Figure
\newcounter{figure}
\renewcommand \thefigure {\@arabic\c@figure}
\def\fps@figure{tbp}
\def\ftype@figure{1}
\def\ext@figure{lof}
\def\fnum@figure{\figurename~\thefigure}
\newenvironment{figure}
               {\@float{figure}}
               {\end@float}
\newenvironment{figure*}
               {\@dblfloat{figure}}
               {\end@dblfloat}
% Table
\newcounter{table}
\renewcommand\thetable{\@arabic\c@table}
\def\fps@table{tbp}
\def\ftype@table{2}
\def\ext@table{lot}
\def\fnum@table{\tablename~\thetable}
\newenvironment{table}
               {\@float{table}}
               {\end@float}
\newenvironment{table*}
               {\@dblfloat{table}}
               {\end@dblfloat}
\newlength\abovecaptionskip
\newlength\belowcaptionskip
\setlength\abovecaptionskip{10\p@}
\setlength\belowcaptionskip{0\p@}
\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \sbox\@tempboxa{#1. #2}%
  \ifdim \wd\@tempboxa >\hsize
    #1. #2\par
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}
%-----------------------------------------------------------------------------%
% FONTS
%-----------------------------------------------------------------------------%
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}
\DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal}
%-----------------------------------------------------------------------------%
% TABLE OF ARTICLES, CONTENTS, FIGURES, ...
%-----------------------------------------------------------------------------%
\newcommand\@pnumwidth{1.55em}
\newcommand\@tocrmarg{2.55em}
\newcommand\@dotsep{4.5}
\setcounter{tocdepth}{3}
% Table of contents
\newcommand\tableofcontents{%
    \section*{\indent\contentsname
    \@starttoc{toc}%
    }}
\newcommand*\l@section[2]{%
  \ifnum \c@tocdepth >\z@
    \addpenalty\@secpenalty
    \addvspace{1.0em \@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
    \endgroup
  \fi}
\newcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}}
\newcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
\newcommand*\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}}
\newcommand*\l@subparagraph{\@dottedtocline{5}{10em}{5em}}
% List of figures
\newcommand\listoffigures{%
    \section*{\indent\listfigurename
      \@mkboth{\scshape\listfigurename}%
              {\scshape\listfigurename}}%
    \@starttoc{lof}%
    }
\newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
% List of tables
\newcommand\listoftables{%
    \section*{\indent\listtablename
      \@mkboth{%
          \scshape\listtablename}{\scshape\listtablename}}%
    \@starttoc{lot}%
    }
\let\l@table\l@figure
%-----------------------------------------------------------------------------%
% BIBLIOGRAPHY
%-----------------------------------------------------------------------------%
\newdimen\bibindent
\setlength\bibindent{1.5em}
\newenvironment{thebibliography}[1]
     {\section*{\refname%
      \addcontentsline{toc}{section}{\hspace*{1.5em}\refname}%
      }%
     \footnotesize
     \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}
\newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em}
\let\@openbib@code\@empty
%-----------------------------------------------------------------------------%
% INDEX
%-----------------------------------------------------------------------------%
\newenvironment{theindex}
               {\columnseprule \z@
                \columnsep 35\p@
                \twocolumn[\section*{\indent\indexname}]%
                \addcontentsline{toc}{section}{\hspace*{1.5em}
                \indexname}%
                \@mkboth{\scshape\indexname}%
                        {\scshape\indexname}%
                \thispagestyle{plain}\parindent\z@
                \parskip\z@ \@plus .3\p@\relax
                \let\item\@idxitem}
               {\onecolumn}
\newcommand\@idxitem{\par\hangindent 40\p@}
\newcommand\subitem{\@idxitem \hspace*{20\p@}}
\newcommand\subsubitem{\@idxitem \hspace*{30\p@}}
\newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
%-----------------------------------------------------------------------------%
% FOOTNOTES
%-----------------------------------------------------------------------------%
\renewcommand\footnoterule{%
  \kern-3\p@
  \hrule\@width.4\columnwidth
  \kern2.6\p@}
\newcommand\@makefntext[1]{%
    \parindent 1em%
    \noindent
    \hb@xt@1.8em{\hss\@makefnmark}#1}
%-----------------------------------------------------------------------------%
% DEFAULT ENGLISH NAMES
%-----------------------------------------------------------------------------%
\newcommand\contentsname{Contents}
\newcommand\listfigurename{List of Figures}
\newcommand\listtablename{List of Tables}
\newcommand\refname{References}
\newcommand\indexname{Index}
\newcommand\figurename{Figure}
\newcommand\tablename{Table}
\newcommand\appendixname{Appendix}
%-----------------------------------------------------------------------------%
% INITIALIZING
%-----------------------------------------------------------------------------%
\newcommand\today{}
\edef\today{\number\day \space \ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \space \number\year}   %
\setlength\columnsep{10\p@}
\setlength\columnseprule{0\p@}
\pagestyle{plain}
\pagenumbering{arabic}
\endinput
%%
%% End of file `notemat.cls'.
