%%%%%%%%%%%%% poznamky %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%16.06.2010--od vol. 45 upravene--horizontal margins -1in na -2.88cm
%%%(pri prekladani do pdf nebolo vystredene teraz *.pdf-b5 je vystredeny.
%%% pozor pri uvode..., obale--este nie je vyskusane)
%%%01.04.09 opravene \enrich, \name
%%%20.03.09 doplnena volba b5paper, funguje hyperref
%%%19.09.08 uprava pouzivat od vol 41 Tatracrypt'07
%%% footnotes
%%%\def\@makefnmark{%
%%%  \leavevmode
%%%  \raise2.9ex\hbox{\fontsize\sf@size\z@\normalfont\@thefnmark}%
%%%}
%%%%\addtolength{\textheight}{-21pt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% ====================================================================
%%% @LaTeX-file{
%%%    filename  = "tatra.cls",
%%%    version   = "1.3",
%%%    date      = "2009/04/01",
%%%    author    = "Peter Elias",
%%%    address   = "Mathematical Institute, Slovak Academy of Sciences,
%%%                 Gresakova 6, SK-04001 Kosice, Slovak Republic",
%%%    abstract  = "This is a LaTeX documentclass for
%%%                 Tatra Mountains Mathematical Publications.",
%%% }
%%% ====================================================================

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{tatra}[2009/04/01 v1.3]

\DeclareOption{b5paper}{\gdef\@bfivepaper{}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{amsart}}

\ProcessOptions

\LoadClass{amsart}[1996/10/24]

\def\publname{Tatra Mt. Math. Publ.}

%% \enrich, \enlarge, \name (z matra.tex)
\def\enrich #1\by #2{%
  {\leavevmode \begingroup \ob@hat #1\p@mocou{#2} \endgroup \unskip}}%
\def \ob@hat #1\p@mocou #2{\def\vklad@{#2}\def\vklad@@{~#2}\def\@vklad@@{}\prvy@ #1 \end}%
% \ref{...} je dovolene vnutri #1 (P.E.)
\def \@prvy@#1{%
  \def\prvy@@##1##2\koniec@@{\def\prvy@@@{##1}}%
  \def\ref@{\ref}%
  \prvy@@#1\koniec@@
  \ifx\ref@\prvy@@@ #1 \else\prvy@ #1 \end \fi}%
\def \prvy@ #1 {%    parametrom su jednotlive slova, nakoniec \end
  \def\prvy@@##1##2\koniec@@{\def\prvy@@@{##1}}%
  \def\ref@{\ref}%
  \prvy@@#1\koniec@@
  \toks1={}%
  \ifx \end #1\let\n@xti=\relax   % koniec skupiny slov
  \else \let \n@xti=\prvy@
    \def\@vklad@{}%
    \@vklad@@
    \ifx\ref@\prvy@@@ #1\else\druhy@ #1\end\fi
    \let\@vklad@@\vklad@@
  \fi \n@xti
}%
\def \druhy@ #1{%    parametrom su jednotlive pismena, nakoniec \end
 \ifx \end #1\let\n@xtii=\relax \else \let \n@xtii=\druhy@
 \def \p@r@m{#1}%
 \def \Xv@{\v}\def \Yd@{\'}\def \Ys@{\^}\def \Yu@{\"}\def \Yo@{\`}%
 \def \Yv@{\~}\def \XB@{\B}\def \XD@{\D}\def \Xu@{\u}\def \XH@{\H}%
 \def \Xt@{\t}\def \Xc@{\c}\def \Xd@{\d}\def \Xb@{\b}\def \Xog@{\og}%
 \ifcat\noexpand~\noexpand #1\toks1={#1}%
 \else\ifx\Xv@\p@r@m\toks1={#1}\else \ifx\Yd@\p@r@m\toks1={#1}%
 \else\ifx\Ys@\p@r@m\toks1={#1}\else \ifx\Yu@\p@r@m\toks1={#1}%
 \else\ifx\Yo@\p@r@m\toks1={#1}\else \ifx\Yv@\p@r@m\toks1={#1}%
 \else\ifx\XB@\p@r@m\toks1={#1}\else \ifx\XD@\p@r@m\toks1={#1}%
 \else\ifx\Xu@\p@r@m\toks1={#1}\else \ifx\XH@\p@r@m\toks1={#1}%
 \else\ifx\Xt@\p@r@m\toks1={#1}\else \ifx\Xc@\p@r@m\toks1={#1}%
 \else\ifx\Xd@\p@r@m\toks1={#1}\else \ifx\Xb@\p@r@m\toks1={#1}%
 \else\ifx\Xog@\p@r@m\toks1={#1}%
 \else\ifx\relax\p@r@m\the\toks1 #1\vklad@\toks1={}%
 \else\ifcat.#1\unskip #1\toks1={}%
 \else\@vklad@\the\toks1 #1\let\@vklad@\vklad@\toks1={}%
 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
 \n@xtii}%
\def\enlarge #1#2{\enrich #1\by{\kern #2}}%
\def\name #1{\kern.1em\enrich #1\by{\kern.2em}\kern.1em{}}%
%% \abbr
\def\abbr#1{\leavevmode\hbox{\textrm{#1}}}%
%%% zmeny oproti amsart.cls
%% hlavicka
\def\issueinfo#1#2{\def\currentvolume{#1}\def\currentyear{#2}}
\issueinfo{00}% volume number
  {XXXX}%     % year
\def\received#1{\def\@received{#1}}
\let\@received\@empty
\def\revised#1{\def\@revised{#1}}
\let\@revised\@empty
\AtBeginDocument{%
  \def\volinfo{%
    {\bfseries\currentvolume} (\currentyear)%
  }%
  \def\pageinfo{%
    \ifnum\start@page=\z@
      000--000
    \else
      \ifx\start@page\end@page
        \start@page
      \else
        \start@page--\end@page
      \fi
    \fi
  }%
}
\font\ttr=tatra
\font\cmssbxsl=cmssbxo10 at 9pt
\DeclareFontShape{OT1}{cmss}{bx}{sl}
{%
<5><6><7><8><9>cmssbxo10%
<10><10.95><12><14.4><17.28><20.74><24.88>cmssbxo10%
}{}
\def\article@logo{%
  \vbox to\headheight{%
    \vskip 5pt
    \@parboxrestore\noindent\offinterlineskip
    \vtop{%
      \vskip 5mm
      \vskip 3.5pt
      \setbox0=\hbox{\Small\sffamily\publname\ \volinfo, \pageinfo}%
      \ht0=0pt
      \dp0=0pt
      \box0
    }%
    \hfill
    \vtop{%
      \hbox{\hskip 12mm\ttr t}%
      \vskip 1.2mm
      \hbox{\ttr m}%
      \vskip 2mm
      \hbox{\hskip -2.5mm\cmssbxsl Mathematical Publications}%
    }%
    \par\vss
  }%
}%
\def\@setcopyright{}
%% addresses
\def\enddoc@text{%
  \hbox to \textwidth{%
    \@setdate
    \hfill
    \@setaddresses
  }%
}
\def\@setdate{%
  \vtop{%
    \footnotesize\vskip\bigskipamount
    \ifx\@received\@empty\else\hbox{Received \@received}\fi%
    \ifx\@revised\@empty\else\hbox{Revised \@revised}\fi%
  }%
}
\def\@setaddresses{%
  \newif\if@email\@emailtrue\newif\if@url\@urltrue
  \def\author##1{}%
  \def\address##1##2{
    \vskip\bigskipamount
    \def\\{\egroup\hbox\bgroup\itshape\ignorespaces}%
    \hbox\bgroup\itshape\ignorespaces##2\egroup
    \vskip\smallskipamount
    \global\@emailtrue\global\@urltrue}%
  \def\curraddr##1##2{
    \def\\{\egroup\hbox\bgroup\itshape\ignorespaces}%
    \@ifnotempty{##2}{\hbox{{\upshape Current address}%
      \@ifnotempty{##1}{, \ignorespaces##1\unskip}\/:\space}%
      \hbox\bgroup\itshape\ignorespaces##2\egroup
      \addvspace\smallskipamount}%
    \global\@emailtrue\global\@urltrue}%
  \def\email##1##2{
    \@ifnotempty{##2}{%
      \ifx##1\@empty\else\global\@emailtrue\fi
      \hbox{%
      \if@email{\itshape E-mail}%
      \@ifnotempty{##1}{, \ignorespaces##1\unskip}\/:\space
      \else\hphantom{{\itshape E-mail}%
      \@ifnotempty{##1}{, \ignorespaces##1\unskip}\/:\space}\fi
      \ifx##1\@empty\global\@emailtrue\else\global\@emailfalse\fi
      \upshape##2}\global\@urltrue}}%
  \def\urladdr##1##2{
    \@ifnotempty{##2}{%
      \ifx##1\@empty\else\global\@urltrue\fi
      \hbox{%
      \if@url{\itshape URL}%
      \@ifnotempty{##1}{, \ignorespaces##1\unskip}\/:\space
      \else\hphantom{{\itshape URL}%
      \@ifnotempty{##1}{, \ignorespaces##1\unskip}\/:\space}\fi
      \ifx##1\@empty\global\@urltrue\else\global\@urlfalse\fi
      \upshape##2}\global\@emailtrue}}%
  \vtop{%
    \footnotesize
    \addresses
  }%
}
%% subjclass
\renewcommand*\subjclass[2][2010]{%
  \def\@subjclass{#2}%
  \@ifundefined{subjclassname@#1}{%
    \ClassWarning{\@classname}{Unknown edition (#1) of Mathematics
      Subject Classification; using '2010'.}%
  }{%
    \@xp\let\@xp\subjclassname\csname subjclassname@#1\endcsname
  }%
}
\renewcommand{\subjclassname}{%
  2010 \enrich Mathematics Subject Classification\by{\hskip.14em}}
\@xp\let\csname subjclassname@2010\endcsname \subjclassname
\@namedef{subjclassname@1991}{%
  1991 \enrich Mathematics Subject Classification\by{\hskip.14em}}
\def\@setsubjclass{%
  \subjclassname:\enspace\@subjclass\@addpunct.}
%% keywords
\renewcommand{\keywordsname}{%
  \enrich Keywords\by{\hskip.14em}}
\def\@setkeywords{%
  \keywordsname:\enspace\@keywords\@addpunct.}
%% footnotes
%\def\@makefnmark{%
%  \leavevmode
%  \raise2.9ex\hbox{\fontsize\sf@size\z@\normalfont\@thefnmark}%
%}
\long\def\@footnotetext#1{%
  \insert\footins{%
    \normalfont\footnotesize
    \interlinepenalty\interfootnotelinepenalty
    \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
    \floatingpenalty\@MM \hsize\columnwidth
    \@parboxrestore \parindent\z@ \sloppy
    \protected@edef\@currentlabel{%
      \csname p@footnote\endcsname\@thefnmark}%
    \@makefntext{%
      \rule\z@\footnotesep\ignorespaces#1\unskip\strut\par}%
  }%
}
%% abstract
\renewcommand{\abstractname}{\MakeUppercase{Abstract}}
\renewenvironment{abstract}{%
  \ifx\maketitle\relax
    \ClassWarning{\@classname}{Abstract should precede
      \protect\maketitle\space in AMS documentclasses; reported}%
  \fi
  \global\setbox\abstractbox=\vtop \bgroup
    \normalfont\Small
    \list{}{\labelwidth\z@
      \leftmargin2pc \rightmargin\leftmargin
      \listparindent\normalparindent \itemindent\z@
      \parsep\z@ \@plus\p@
      \let\fullwidthdisplay\relax
    }%
    \item[\hskip\labelsep\scshape\abstractname.]%
}{%
  \endlist\egroup
  \ifx\@setabstract\relax \@setabstracta \fi
}
\def\@setabstracta{%
  \ifvoid\abstractbox
  \else
    \skip@17.5\p@ \advance\skip@-\lastskip
    \advance\skip@-\baselineskip \vskip\skip@
    \box\abstractbox
    \prevdepth\z@ % because \abstractbox is a vtop
  \fi
}
%% title
\def\@settitle{%
  \begin{center}%
    \relax
    \Large\baselineskip 1.2\baselineskip
    \bfseries
    \uppercasenonmath\@title
    \@title
  \end{center}%
}
%% authors
\def\@setauthors{%
  \begingroup
  \trivlist
  \centering\normalsize\scshape
  \vskip 9\p@
  \item\relax
  \doplnpomlcky\authors
  \def\\{\protect\linebreak}%
  \authors
  \endtrivlist
  \endgroup
}
\newcommand{\doplnpomlcky}{%
  \nxandlist{\unskip~--- }{\unskip~--- }{\unskip~--- }}
%% heads & foots
\def\ps@headings{\ps@empty
  \def\@evenhead{%
    \setTrue{runhead}%
    \Small\sffamily\hfil\leftmark{}{}\hfil}%
  \def\@oddhead{%
    \setTrue{runhead}%
    \Small\sffamily\hfil\rightmark{}{}\hfil}%
  \let\@mkboth\markboth
  \def\@evenfoot{\normalfont\thepage\hfil}%
  \def\@oddfoot{\normalfont\hfil\thepage}%
}
\def\ps@firstpage{\ps@plain
  \def\@oddfoot{\normalfont\hfil\thepage}%
  \let\@evenfoot\@oddfoot
  \def\@oddhead{\@serieslogo\hss}%
  \let\@evenhead\@oddhead % in case an article starts on a left-hand page
}
\pagestyle{headings}
%% captions
\def\@captionheadfont{\scshape\Small}
\def\@captionfont{\normalfont\Small}
%% sections
\def\@secnumfont{\bfseries}
\def\section{\@startsection{section}{1}%
  \z@{2\linespacing\@plus\linespacing}{\linespacing\@plus.7\linespacing}%
  {\normalfont\Large\bfseries\centering}}
\def\subsection{\@startsection{subsection}{2}%
  \z@{.5\linespacing\@plus.2\linespacing}{.2\linespacing\@plus.2\linespacing}%
  {\normalfont\normalsize\bfseries}}
\def\subsubsection{\@startsection{subsubsection}{3}%
  \z@{-3.25ex\@plus -1ex \@minus -.2ex}{1.5ex \@plus .2ex}%
  {\normalfont\normalsize\bfseries}}
\def\paragraph{\@startsection{paragraph}{4}%
  \z@{3.25ex \@plus1ex \@minus.2ex}{-1em}%
  \normalfont\normalsize\bfseries}
\def\subparagraph{\@startsection{subparagraph}{5}%
  \z@{3.25ex \@plus1ex \@minus .2ex}{-1em}%
  \normalfont\normalsize\bfseries}
%% lists
\def\@listI{\advance\leftmargini by -5pt
  \leftmargin\leftmargini \parsep\z@skip
  \topsep\listisep \itemsep 3pt
  \listparindent\normalparindent}
%% theorems
\DeclareFontShape{OT1}{cmr}{bx}{sc}
{<5><6><7><8><9><10><10.95><12><14.4><17.28><20.74><24.88>cmbcsc10}{}
\def\@thm#1#2#3{%
  \ifhmode\unskip\unskip\par\fi
  \normalfont
  \trivlist
  \let\thmheadnl\relax
  \let\thm@swap\@gobble
  \let\thm@indent\noindent % no indent
  \thm@headfont{\bfseries\scshape}% heading font bold
  \thm@notefont{\fontseries\mddefault\upshape}%
  \thm@headpunct{.}% add period after heading
  \thm@headsep 5\p@ plus\p@ minus\p@\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
}
\renewenvironment{proof}[1][\proofname]{\par
  \ifx#1\proofname\edef\prooflabel{\proofname}\else\def\prooflabel{#1}\fi
  \pushQED{\qed}%
  \normalfont \topsep6\p@\@plus6\p@\relax
  \trivlist
  \item[\hskip\labelsep
        \upshape
  \expandafter\enrich\prooflabel\by{\hskip.2em}\@addpunct{.}]\ignorespaces
}{%
  \popQED\endtrivlist\@endpefalse
}
%% bibliography
\newcommand{\bib@section}{\@startsection{section}{1}%
  \z@{2\linespacing\@plus\linespacing}{\linespacing\@plus.7\linespacing}%
  {\normalfont\footnotesize\centering}}%
\renewenvironment{thebibliography}[1]{%
  \newcommand{\by}[1]{\MakeUppercase{##1}:\space\ignorespaces}
  \@xp\bib@section\@xp*\@xp{\refname}%
  \normalfont\footnotesize\labelsep .5em\relax
  \renewcommand\theenumiv{\arabic{enumiv}}\let\p@enumiv\@empty
  \list{\@biblabel{\theenumiv}}{\settowidth\labelwidth{\@biblabel{#1}}%
    \leftmargin\labelwidth \advance\leftmargin\labelsep
    \usecounter{enumiv}}%
  \sloppy \clubpenalty\@M \widowpenalty\clubpenalty
  \sfcode`\.=\@m
}{%
  \def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}%
  \endlist
}
%% {,} v \refname prekaza balicku hyperref
% \renewcommand{\refname}{\MakeUppercase{References}}
\renewcommand{\refname}{REFERENCES}
%% dimensions
\setlength{\parskip}{1pt plus 1pt minus .5pt}
\setlength{\footskip}{24pt}
\setlength{\textwidth}{121.9mm}
\setlength{\textheight}{176.2mm}
%\addtolength{\textheight}{-21pt}
\@ifundefined{@bfivepaper}{}{
  %% set b5 paper size
  \setlength\paperheight {250mm}
  \setlength\paperwidth  {176mm}
  %% calculate horizontal margins
  \setlength\oddsidemargin\paperwidth
  \addtolength\oddsidemargin {-\textwidth}
  \setlength\oddsidemargin {0.5\oddsidemargin}
%%%%%%%%%%%%%begin change vertical margins%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%  \addtolength\oddsidemargin {-1in}%%%original Elias%%%
     \addtolength\oddsidemargin {-2.88cm}%%%change ivana%%%
%%%%%%%%%%%%%end change vertical margins%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \setlength\evensidemargin\oddsidemargin
  %% odkomentujte nasledujuci kod, ak ma byt vnutorny okraj mensi nez vonkajsi (v pomere 2:3)
  % \if@twoside
  %   \setlength\oddsidemargin\paperwidth
  %   \addtolength\oddsidemargin {-\textwidth}
  %   \setlength\oddsidemargin {0.2\oddsidemargin}
  %   \setlength\evensidemargin {3\oddsidemargin}
  %   \addtolength\evensidemargin {-1in}
  %   \setlength\oddsidemargin {2\oddsidemargin}
  %   \addtolength\oddsidemargin {-1in}
  %% calculate vertical margins
  \setlength\topmargin\paperheight
  \addtolength\topmargin {-\textheight}
  \setlength\topmargin {0.5\topmargin}
  \addtolength\topmargin {-\headheight}
  \addtolength\topmargin {-\headsep}
  \addtolength\topmargin {-1in}
  %% odkomentujte nasledujuci kod, ak ma byt vrchny okraj mensi nez spodny (v pomere 2:3, hlavicka a pata sa nerata)
  % \setlength\topmargin\paperheight
  % \addtolength\topmargin {-\textheight}
  % \setlength\topmargin {0.4\topmargin}
  % \addtolength\topmargin {-\headheight}
  % \addtolength\topmargin {-\headsep}
  % \addtolength\topmargin {-1in}
}%
%% titlepage
\def\@maketitle{%
  \normalfont\normalsize
  \let\@makefnmark\relax  \let\@thefnmark\relax
  \ifx\@empty\@subjclass\else \@footnotetext{\@setsubjclass}\fi
  \ifx\@empty\@keywords\else \@footnotetext{\@setkeywords}\fi
  \ifx\@empty\thankses\else \@footnotetext{%
    \def\par{\let\par\@par}\@setthanks}\fi
  \@mkboth{\@nx\shortauthors}{\@nx\shorttitle}%
  \setlength{\topskip}{24.1mm}
  \@settitle
  \ifx\@empty\authors \else \@setauthors \fi
  \ifx\@empty\@commby
  \else
    \baselineskip18\p@
    \vtop{\centering{\footnotesize\@commby\@@par}%
      \global\dimen@i\prevdepth}\prevdepth\dimen@i
  \fi
  \ifx\@empty\@dedicatory
  \else
    \baselineskip18\p@
    \vtop{\centering{\footnotesize\itshape\@dedicatory\@@par}%
      \global\dimen@i\prevdepth}\prevdepth\dimen@i
  \fi
  \@setabstract
  \normalsize
}
\def\maketitle{\par
  \@topnum\z@ % this prevents figures from falling at the top of page 1
  \@setcopyright
  \thispagestyle{firstpage}% this sets first page specifications
  \uppercasenonmath\shorttitle
  \ifx\@empty\shortauthors \let\shortauthors\shorttitle
  \else\doplnpomlcky\shortauthors
  \fi
  \@maketitle@hook
  \begingroup
  \@maketitle
  \toks@\@xp{\shortauthors}\@temptokena\@xp{\shorttitle}%
  \toks4{\def\\{ \ignorespaces}}% defend against questionable usage
  \edef\@tempa{%
    \@nx\markboth{\the\toks4
      \@nx\MakeUppercase{\the\toks@}}{\the\@temptokena}}%
  \@tempa
  \endgroup
  \c@footnote\z@
  \def\do##1{\let##1\relax}%
  \do\maketitle \do\@maketitle \do\title \do\@xtitle \do\@title
  \do\author \do\@xauthor \do\address \do\@xaddress
  \do\email \do\@xemail \do\curraddr \do\@xcurraddr
  \do\commby \do\@commby
  \do\dedicatory \do\@dedicatory \do\thanks \do\thankses
  \do\keywords \do\@keywords \do\subjclass \do\@subjclass
}
\endinput

