% MJTU DOCUMENT CLASS -- version 1.6 for LaTeX2e
%
% LaTeX document class for Mathematics Journal of Toyama University
%   for Ediors use only
%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{mjtu2ed}[2016/02/18]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ExecuteOptions{a4paper,11pt,twoside,onecolumn,final}
\ProcessOptions\relax
\LoadClass[11pt,twoside]{article}
%\setlength\paperheight{195mm}%
%\setlength\paperwidth{120mm}%
\setlength\textheight{195mm}%
\setlength\textwidth{125mm}%
%
\setlength\oddsidemargin{18truemm}%
\setlength\evensidemargin{18truemm}%
%
\def\baselinestretch{1.2}\normalsize%
\setlength\footskip{40truemm}%
\newdimen\normalparindent
\setlength\normalparindent{12pt}
\setlength\parindent{\normalparindent}
%
%\font\fontA=cmtex10
\font\fontA=cmvtt10
%
%  title page setting
%   maketile parameter : title, author, date, affiliation, correspondence
%
  \if@titlepage
  \renewcommand\maketitle{\begin{titlepage}%
  \let\footnotesize\small
  \let\footnoterule\relax
  \let \footnote \thanks
  \null\vfil
  \vskip 60\p@
  \begin{center}%
    {\sc\Large \@title \par}%
    \vskip 3em%
    {\large
     \lineskip .75em%
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
      \vskip 1.5em%
    {\large \@date \par}%       % Set date in \large size.
  \end{center}\par
  \@thanks
  \vfil\null
  \end{titlepage}%
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\@mjtuvol\@empty%  added for MJTU
  \global\let\@mjtuyear\@empty% added for MJTU
  \global\let\@mjtupages\@empty% added for MJTU
  \global\let\@dedicatory\@empty% added for MJTU
  \global\let\@thankswomark\@empty% added for MJTU
  \global\let\@subjclass\@empty
  \global\let\@setsubjclass\@empty
  \global\let\@keywords\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
  \global\let\mjtuvol\relax%  added for MJTU
  \global\let\mjtuyear\relax%  added for MJTU
  \global\let\mjtupages\relax%  added for MJTU
  \global\let\dedicatory\relax%  added for MJTU
  \global\let\thankswomark\relax%  added for MJTU
  \global\let\subjclass\relax%
}
\else
\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.8em{%
                \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
    \if@twocolumn
      \ifnum \col@number=\@ne
        \@maketitle
      \else
        \twocolumn[\@maketitle]%
      \fi
    \else
      \newpage
      \global\@topnum\z@   % Prevents figures from going at top of page.
      \@maketitle
    \fi
    \thispagestyle{plain}\@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\@mjtuvol\@empty%  added for MJTU
  \global\let\@mjtuyear\@empty% added for MJTU
  \global\let\@mjtupages\@empty% added for MJTU
  \global\let\@dedicatory\@empty% added for MJTU
  \global\let\@thankswomark\@empty% added for MJTU
  \global\let\@subjclass\@empty
  \global\let\@setsubjclass\@empty
  \global\let\@keywords\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
  \global\let\mjtuvol\relax%  added for MJTU
  \global\let\mjtuyear\relax%  added for MJTU
  \global\let\mjtupages\relax%  added for MJTU
  \global\let\dedicatory\relax%  added for MJTU
  \global\let\thankswomark\relax%  added for MJTU
  \global\let\subjclass\relax%
}
\def\@maketitle{%
  \newpage
  \null
  \vskip -17truemm%
  \noindent
  {\def\baselinestretch{1.1}\small\begin{ttfamily}%
%  {\fontA Math.~J.~Toyama Univ.}\\%
  {\fontA Toyama Math.~J.}\\%
  \vskip -1.5em%
  \noindent%
  {\fontA Vol.}~\@mjtuvol (\@mjtuyear ), \@mjtupages\end{ttfamily}\par}%
  \vskip 42truemm%  2em%
  \begin{center}%
  \let \footnote \thanks
  \ifx\@empty\@thanks\else \@footnotetext{\@thanks}\fi
%  \let\@makefnmark\relax  \let\@thefnmark\relax
  \let\@thefnmark\relax
  \ifx\@empty\@thankswomark\else \@footnotetext{\@thankswomark}\fi
  \ifx\@empty\@subjclass\else \@footnotetext{\@setsubjclass}\fi
  \ifx\@empty\@keywords\else \@footnotetext{\@setkeywords}\fi
    {\large\bf \@title \par}%
    \vskip 1.5em%
    {
      \lineskip .5em%
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
%    \vskip 1em%
%    {\large \@date}%
  \ifx\@empty\@dedicatory\else
%    \vskip .5em%
     {\small\it \@dedicatory}%
    \fi
  \end{center}%
  \par
  \vskip 1.5em}
\fi
%
\def\mjtuvol#1{\gdef\@mjtuvol{#1}}
\def\mjtuyear#1{\gdef\@mjtuyear{#1}}
\def\mjtupages#1{\gdef\@mjtupages{#1}}
\def\@mjtuvol{**}
\def\@mjtuyear{****}
\def\@mjtupages{***-***}
\let\@subjclass\@empty
\let\@keywords\@empty
\let\@dedicatory\@empty
\def\dedicatory#1{\def\@dedicatory{#1}}
\let\@thankswomark\@empty
\def\thankswomark#1{\def\@thankswomark{#1}}
\def\@setsubjclass{%
%{1991\ \itshape{Mathematics Subject Classification.}}
%{2000\ \itshape{Mathematics Subject Classification.}}
%{2010\ \itshape{Mathematics Subject Classification.}}
{2020\ \itshape{Mathematics Subject Classification.}}
\enspace\@subjclass.}
\def\subjclass#1{\def\@subjclass{#1}}
\def\keywords#1{\def\@keywords{#1}}
\def\@setkeywords{%
  {\itshape {Key words and phrases}.}\enspace \@keywords.}
%
\def\@makefnmark{\hbox{$\m@th^{\@thefnmark}$}}
\def\@makefntext{\indent\@makefnmark}
\long\def\@footnotetext#1{\insert\footins{%
  \normalfont\footnotesize
  \interlinepenalty\interfootnotelinepenalty
  \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
  \floatingpenalty\@MM \hsize\columnwidth
  \@parboxrestore \parindent\normalparindent \sloppy
  \edef\@currentlabel{\p@footnote\@thefnmark}%
  \@makefntext{\rule\z@\footnotesep\ignorespaces#1\unskip\strut\par}}}
%
\def\@seccntformat#1{\csname the#1\endcsname.\quad}% added . for MJTU
%
\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {3.25ex \@plus -1ex \@minus -.2ex}%
                                   {1.5ex \@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\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\normalsize\bfseries}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                    {3.25ex \@plus1ex \@minus.2ex}%
                                    {-1em}%
                                    {\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
                                       {3.25ex \@plus1ex \@minus .2ex}%
                                       {-1em}%
                                      {\normalfont\normalsize\bfseries}}
%
\if@titlepage
  \renewenvironment{abstract}{%
      \titlepage
      \null\vfil
      \@beginparpenalty\@lowpenalty
      {\def\baselinestretch{1}\small\begin{center}%
        \bfseries \abstractname
        \@endparpenalty\@M
      \end{center}}%
     {}\par\vfil\null\endtitlepage}
\else
  \renewenvironment{abstract}{%
      \if@twocolumn
        \section*{\abstractname}%
      \else
        \small
%        \begin{center}%
%          {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
%        \end{center}%
        \quotation\noindent\def\baselinestretch{1}\small
        {\bfseries \abstractname.}%
      \fi}
      {\if@twocolumn\else\endquotation\fi}
\fi
%
%
\def\@oddhead{\hfil{\@mjtutitle}\hfil\thepage}%
\def\@evenhead{\thepage\hfil{\@mjtuauthor}\hfil}%
\def\@oddfoot{\hfil \@empty \hfil}%
\let\@evenfoot\@oddfoot
\let\@mkboth\markboth
%
\def\mjtutitle#1{\gdef\@mjtutitle{\footnotesize #1}}
\def\mjtuauthor#1{\gdef\@mjtuauthor{\footnotesize #1}}
\let\@mjtuauthor\@empty
\let\@mjtutitle\@empty
%
\renewenvironment{thebibliography}[1]
%      {\vskip \baselineskip%
%      \hfil{\normalsize\bf\refname}\hfil\par \noindent
     {\section*{\hfil\refname\hfil}%\noindent%
%        \@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
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
%
\def\@begintheorem#1#2{\trivlist
   \item[\hskip \labelsep{\bfseries #1\ #2.}]\itshape}
%
  \DeclareSymbolFont{lasy}{U}{lasy}{m}{n}
  \SetSymbolFont{lasy}{bold}{U}{lasy}{b}{n}
  \let\Box\undefined
  \DeclareMathSymbol\Box     {\mathord}{lasy}{"32}
%
\DeclareRobustCommand{\qed}{%
  \ifmmode % if math mode, assume display: omit penalty etc.
  \else \leavevmode\unskip\penalty9999 \hbox{}\nobreak\hfill
  \fi
  \quad\hbox{\@mjtuqedsymbol}}
%\ifx\@empty\openbox
\newcommand{\@mjtuopenbox}{\leavevmode
  \hbox to.77778em{%
  \hfil\vrule
  \vbox to.675em{\hrule width.6em\vfil\hrule}%
  \vrule\hfil}}
%\fi
%\ifx\@empty\qedsymbol
\newcommand{\@mjtuqedsymbol}{\@mjtuopenbox}
%\fi
%
%\def\qed{\hfill$\Box$}
\newenvironment{pf}[1]{%
  \noindent{\bf Proof.}\ \ #1}{\qed}
%
\def\endofdoc@text{\ifx\@empty\@mjturec \else\@setmjtuinfo\fi}
%
\let\@mjturec\@empty
\def\mjtureceived#1{\gdef\@mjturec{(Received #1)}}
\let\@mjturev\@empty
\def\mjturevised#1{\gdef\@mjturev{(Revised #1)}}
%
\let\@addresses\@empty
\def\address#1{\gdef\@addresses{#1}}
\AtEndDocument{\@setaddress}
\def\@setaddress{\ifx\@empty\@addresses \else\@printaddress\fi}
\def\@printaddress{\def\baselinestretch{1.1}\small%
\par\vspace{\baselineskip}%
\noindent{\small\@addresses}\par}%
%
\AtEndDocument{\endofdoc@text}
\def\@setmjtuinfo{\def\baselinestretch{1.1}\small
\par \vskip \baselineskip \noindent%
\hfill {\small\tt\@mjturec}\\ \npb%
\ifx\@empty\@mjturev \else 
\hfill {\small\tt\@mjturev}\par
\fi}%
%
\def\npb{\nopagebreak[4]}
\def\sepauthor{\vskip -.3\baselineskip \noindent}
%
%% End of file `mjtu.sty'.
