%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Este fichero de estilo ha sido creado por
%%  Antonio Jesús López Moreno
%%  Departamento de Matemáticas
%%  Universidad de Jaén
%%  Campus Las Lagunillas, s/n, 23071, Jaén, Spain
%%  ajlopez@ujaen.es
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{jja}
              [2000/10/08 v1.3g
 Standard LaTeX document class]
\AtEndOfClass{
    \setlength{\voffset}{-15mm}
    \setlength{\textwidth}{155mm}
    \setlength{\textheight}{150mm}
    \setlength{\hoffset}{-2.3mm}
    \setlength{\oddsidemargin}{-0.22mm}
    \font\cmsc=cmcsc10 at 12pt
    \font\cmsc=cmcsc10 at 12pt
    \makeatletter
        \def\@seccntformat#1{\csname the#1\endcsname.\quad}
    \makeatother
    }
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb,amsfonts}
\usepackage{graphicx,color}
\usepackage{eurosym}
\usepackage{psfrag}
\usepackage{wrapfig}
%\usepackage{changepage}
\usepackage{enumerate}
%\usepackage{hyperref}
%\hypersetup{colorlinks=true}
%\hypersetup{citecolor=red,citelink=gree,backref}
% Variables para recivido, aceptado, comunicado y abstract
\newcommand{\varrecivido}{xxxxxx xx, xxxx}
\newcommand{\varaceptado}{xxxxxx xx, xxxx}
\newcommand{\varcomunicado}{xxxx}
\newcommand{\varabstract}{}
\newcommand{\recivido}[1]{\renewcommand{\varrecivido}{{#1}}}
\newcommand{\aceptado}[1]{\renewcommand{\varaceptado}{{#1}}}
\newcommand{\comunicado}[1]{\renewcommand{\varcomunicado}{#1}}
% Variables para el comando makespanishzone
\newcommand{\varspanishtitle}{}
\newcommand{\varspanishauthor}{}
\newcommand{\varspanishabstract}{}
\newcommand{\varspanishkeywords}{}
\newcommand{\spanishtitle}[1]{\renewcommand{\varspanishtitle}{#1}}
\newcommand{\spanishauthor}[1]{\renewcommand{\varspanishauthor}{#1}}
\newcommand{\spanishabstract}[1]{\renewcommand{\varspanishabstract}{#1}}
\newcommand{\spanishkeywords}[1]{\renewcommand{\varspanishkeywords}{#1}%\symbolfootnote[0]{\varubedameeting}%
                                    }
% Comando para la nota sobre participacion de los autores en Úbeda
\newcommand{\varubedameeting}{}
\newcommand{\ubedameeting}[1]{\renewcommand{\varubedameeting}{#1}}
% Variables para affiliation
\newcommand{\varaffiliation}{}
\newcommand{\affiliation}[1]{\renewcommand{\varaffiliation}{#1}}
%------------------------------------------------------------------------
% Comandos para restaurar la anchura normal del texto tras la página inicial de cada
% artículo.
\newcommand{\restaurapagina}{\linebreak\newpage\changepage{}{2cm}{}{}{}{}{}{}{}\noindent}
\newcommand{\restaurapaginass}{\newpage\changepage{}{2cm}{}{}{}{}{}{}{}\noindent }
\newcommand{\restaurapaginapru}{\changepage{}{2cm}{}{}{}{}{}{}{}}
\newcommand{\nomchap}{}
\newcommand\@ptsize{}
\newif\if@restonecol
\newif\if@titlepage
\@titlepagetrue
\newif\if@openright
\newif\if@openbib
\@openbibfalse
\newif\if@mainmatter \@mainmattertrue
\newif\if@biblio \@bibliofalse
%------------------------
% Decisiones definidas para ubeda.cls
%------------------------
\newif\if@caste
\DeclareOption{castellano}
    {\@castetrue}
\DeclareOption{jjat}
   {\setlength\paperheight {240mm}%
    \setlength\paperwidth  {170mm}}
%\DeclareOption{a4paper}
%   {\setlength\paperheight {297mm}%
%    \setlength\paperwidth  {210mm}}
\DeclareOption{landscape}
   {\setlength\@tempdima   {\paperheight}%
    \setlength\paperheight {\paperwidth}%
    \setlength\paperwidth  {\@tempdima}}
\DeclareOption{10pt}{\renewcommand\@ptsize{0}}
\DeclareOption{11pt}{\renewcommand\@ptsize{1}}
\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
\DeclareOption{twoside}{\@twosidetrue  \@mparswitchtrue}
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\DeclareOption{final}{\setlength\overfullrule{0pt}}
\DeclareOption{titlepage}{\@titlepagetrue}
\DeclareOption{notitlepage}{\@titlepagefalse}
\DeclareOption{openright}{\@openrighttrue}
\DeclareOption{openany}{\@openrightfalse}
\DeclareOption{onecolumn}{\@twocolumnfalse}
\DeclareOption{twocolumn}{\@twocolumntrue}
\DeclareOption{leqno}{\input{leqno.clo}}
\DeclareOption{fleqn}{\input{fleqn.clo}}
\DeclareOption{openbib}{\@openbibtrue}
\ExecuteOptions{jjat,12pt,twoside,onecolumn,final,openright}
\ProcessOptions
\input{bk1\@ptsize.clo}
\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}
\if@twoside
  \def\ps@headings{%
      \let\@oddfoot\@empty\let\@evenfoot\@empty
      \def\@evenhead{\begin{picture}(0,0) \put(0,-4){\rule{443pt}{0.5pt}}\end{picture}\thepage\hfil\slshape\leftmark}%
      \def\@oddhead{\begin{picture}(0,0) \put(0,-4){\rule{443pt}{0.5pt}}\end{picture}{\slshape\rightmark}\hfil\thepage}%
      \let\@mkboth\markboth
    \def\chaptermark##1{%
      \markboth {{%
        \ifnum \c@secnumdepth >\m@ne
          \if@mainmatter
            %\@chapapp\ \thechapter. \ %
          \fi
        \fi
        {\em\@author}}}{\em\@title}}%
    \def\sectionmark##1{%
%       \markright {{%
%         \ifnum \c@secnumdepth >\z@
%           %\thesection \ %
%         \fi
%         \@title Jaen Journal on Approximation}}
        }}
\else
  \def\ps@headings{%
    \let\@oddfoot\@empty
    \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
    \let\@mkboth\markboth
    \def\chaptermark##1{%
      \markright {\MakeUppercase{%
        \ifnum \c@secnumdepth >\m@ne
          \if@mainmatter
            \@chapapp\ \thechapter. \ %
          \fi
        \fi
        ##1}}}}
\fi
\def\ps@myheadings{%
    \let\@oddfoot\@empty\let\@evenfoot\@empty
    \def\@evenhead{\thepage\hfil\slshape \leftmark}%
    \def\@oddhead{{\slshape\rightmark}\hfil \thepage}%
    \let\@mkboth\@gobbletwo
    \let\chaptermark\@gobble
    \let\sectionmark\@gobble
    }
\newcommand{\maketitle}{
  \clearpage
  %\changepage{}{-4cm}{}{}{}{}{}{}{}
  \labelg{sig\nomchap}
  \ifnum \thepage>1 \newpage \fi
  \chapter{xxx}
  \labelg{\nomchap}
  \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
      \global\@topnum\z@   % Prevents figures from going at top of page.
      \@maketitle
    \fi
    \thispagestyle{plain}%\@thanks
  \endgroup
  \setcounter{footnote}{0}%
  %\let\thanks\relax
  %\let\maketitle\relax\let\@maketitle\relax
  \gdef\@thanks{}\gdef\@author{}\gdef\@title{}}
\def\@maketitle{%
  \null
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Inserta el archivo de cabecera
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{picture}(400,70)(-5,-40)
\put(315,15){\framebox(120,50){Logo}}
\put(-7,18){\framebox(40,33){Logo}}

\put(-7,55){\rule{160pt}{1.5pt}}
\put(43,21){\scriptsize \sf Web site: jja.ujaen.es}
\put(43,32){\scriptsize \sf \copyright\  20xx Universidad de Ja\'{e}n}
\put(43,43){\scriptsize \sf ISSN: 1889-3066}
%\put(43,21){\small \sf Web site: jja.ujaen.es}
%\put(43,32){\small \sf \copyright\  2009 Universidad de Ja\'{e}n}
%\put(43,43){\small \sf ISSN: 1889-3066}
\put(-7,13){\rule{160pt}{1.5pt}}
\put(160,50){\parbox{149pt}{\centerline{\small Jaen J. Approx. x(x) (20xx), 1--xx}}}

\end{picture} 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \\[-40pt]
  \begin{center}%
    {\LARGE \bf\@title\@thanks \par}%
    \vskip 1.5em%
    {\large
      \lineskip .5em%
      \begin{tabular}[t]{c}%
        \@author 
      \end{tabular}\par}%
  \end{center}%
  \par
  \vskip 1.5em
  \gdef\@thanks{}
  }
\newcommand{\abstract}[1]{\renewcommand{\varabstract}{#1}\zonaabstract{\varabstract}}
\newcommand{\zonaabstract}[1]{%
        {\small
        \begin{center}%
          {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
        \end{center}%
        {\quotation  #1\endquotation}
        }}
\newcommand{\keywords}[1]{%
        {\small
        {\quotation
        {\bfseries \keywordsname :}
        #1.
        \endquotation}
        }}
\newcommand{\classification}[1]{%
        {\small
        {\quotation
        {\bfseries \cname}\ #1.
        \endquotation}
        }}
\newcommand{\classificationps}[2]{%
        {\small
        {\quotation
        {\bfseries \cname}\ Primary #1; Secondary #2.
        \endquotation}
        }}
\newcommand{\makeaffiliation}{\varaffiliation\labelg{fin\nomchap}}
\newcommand{\received}{{%
        \small
            { \sf \textbf{Communicated by}}\\[5pt] {\bf\sf \varcomunicado}\\ \\[10pt]
            {\bf \sf \textbf{Received}}\\{\sf \varrecivido} \\
            {\bf \sf \textbf{Accepted}}\\{\sf \varaceptado}
        }}
\newcommand{\makespanishzone}{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Inserta el archivo de cabecera
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    {
    {\samepage{\noindent\textcolor[gray]{.9}{\rule{150pt}{20pt} \rule{20pt}{20pt} \rule{20pt}{20pt} \rule{20pt}{20pt}}
    \nopagebreak\noindent\makeaffiliation}}
    }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
}
\newcommand\acknowledgements[1]{\@bibliotrue\section*{#1}\@bibliofalse}
\newcommand*\chaptermark[1]{}
\setcounter{secnumdepth}{2}
\newcounter {part}
\newcounter {chapter}
\newcounter {section}[chapter]
\newcounter {subsection}[section]
\newcounter {subsubsection}[subsection]
\newcounter {paragraph}[subsubsection]
\newcounter {subparagraph}[paragraph]
\renewcommand\thepart         {\@Roman\c@part}
\renewcommand\thechapter      {\@arabic\c@chapter}
\renewcommand\thesubsubsection{\thesubsection .\@arabic\c@subsubsection}
\renewcommand\theparagraph    {\thesubsubsection.\@arabic\c@paragraph}
\renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph}
\newcommand\@chapapp{\chaptername}
\newcommand\frontmatter{\cleardoublepage
            \@mainmatterfalse\pagenumbering{roman}}
\newcommand\mainmatter{\cleardoublepage
       \@mainmattertrue\pagenumbering{arabic}}
\newcommand\backmatter{\if@openright\cleardoublepage\else\clearpage\fi
      \@mainmatterfalse}
\newcommand\part{\cleardoublepage
                 \thispagestyle{plain}%
                 \if@twocolumn
                     \onecolumn
                     \@tempswatrue
                   \else
                     \@tempswafalse
                 \fi
                 \hbox{}\vfil
                 \secdef\@part\@spart}

\def\@part[#1]#2{%
    \ifnum \c@secnumdepth >-2\relax
      \refstepcounter{part}%
      \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
    \else
      \addcontentsline{toc}{part}{#1}%
    \fi
    \markboth{}{}
    {\centering
     \interlinepenalty \@M
     \normalfont
     \ifnum \c@secnumdepth >-2\relax
       \huge\bfseries \partname~\thepart
       \par
       \vskip 20\p@
     \fi
     \Huge \bfseries #2\par}%
    \@endpart}
\def\@spart#1{%
    {\centering
     \interlinepenalty \@M
     \normalfont
     \Huge \bfseries #1\par}%
    \@endpart}
\def\@endpart{\vfil\newpage
              \if@twoside
                \hbox{}%
                \thispagestyle{empty}%
                \newpage
              \fi
              \if@tempswa
                \twocolumn
              \fi}
\newcommand\chapter{\if@openright \thispagestyle{empty}\cleardoublepage\else\clearpage\fi
                    \thispagestyle{plain}%
                    \setcounter{equation}{0}%
                    \setcounter{table}{0}%
                    \setcounter{figure}{0}
                    \setcounter{theorem}{0}
                    \global\@topnum\z@
                    \@afterindentfalse
                    \secdef\@chapter\@schapter}
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
                       \if@mainmatter
                         \refstepcounter{chapter}%
                         \typeout{\@chapapp\space\thechapter.}%
                         \addcontentsline{toc}{chapter}%
                                   {\protect\numberline{\thechapter}#1}%
                       \else
                         \addcontentsline{toc}{chapter}{#1}%
                       \fi
                    \else
                      \addcontentsline{toc}{chapter}{#1}%
                    \fi
                    \chaptermark{#1}%
                    \addtocontents{lof}{\protect\addvspace{10\p@}}%
                    \addtocontents{lot}{\protect\addvspace{10\p@}}%
                    \if@twocolumn
                      \@topnewpage[\@makechapterhead{#2}]%
                    \else
                      \@makechapterhead{#2}%
                      \@afterheading
                    \fi
                    \renewcommand{\nomchap}{#1}}
\def\@makechapterhead#1{%
  %\vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
    \interlinepenalty\@M
  }}
\def\@schapter#1{\if@twocolumn
                   \@topnewpage[\@makeschapterhead{#1}]%
                 \else
                   \@makeschapterhead{#1}%
                   \@afterheading
                 \fi}
\def\@makeschapterhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \raggedright
    \normalfont
    \interlinepenalty\@M
    \Huge \bfseries  #1\par\nobreak
    \vskip 40\p@
  }}
\newcommand\section{\@startsection {section}{1}{\z@\if@biblio \else\S\fi}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {2.3ex \@plus.2ex}%
                                   {\normalfont\Large\bfseries}}
\newcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\large\bfseries}}
\newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\normalsize\bfseries}}
\newcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                    {3.25ex \@plus1ex \@minus.2ex}%
                                    {-1em}%
                                    {\normalfont\normalsize\bfseries}}
\newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
                                       {3.25ex \@plus1ex \@minus .2ex}%
                                       {-1em}%
                                      {\normalfont\normalsize\bfseries}}
\if@twocolumn
  \setlength\leftmargini  {2em}
\else
  \setlength\leftmargini  {2.5em}
\fi
\setlength\leftmarginii  {2.2em}
\setlength\leftmarginiii {1.87em}
\setlength\leftmarginiv  {1.7em}
\if@twocolumn
  \setlength\leftmarginv  {.5em}
  \setlength\leftmarginvi {.5em}
\else
  \setlength\leftmarginv  {1em}
  \setlength\leftmarginvi {1em}
\fi
\setlength\leftmargin    {\leftmargini}
\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{$\m@th\bullet$}
\newcommand\labelitemii{\normalfont\bfseries --}
\newcommand\labelitemiii{$\m@th\ast$}
\newcommand\labelitemiv{$\m@th\cdot$}
\newenvironment{description}
               {\list{}{\labelwidth\z@ \itemindent-\leftmargin
                        \let\makelabel\descriptionlabel}}
               {\endlist}
\newcommand*\descriptionlabel[1]{\hspace\labelsep
                                \normalfont\bfseries #1}
\newenvironment{verse}
               {\let\\=\@centercr
                \list{}{\itemsep      \z@
                        \itemindent   -1.5em%
                        \listparindent\itemindent
                        \rightmargin  \leftmargin
                        \advance\leftmargin 1.5em}%
                \item[]}
               {\endlist}
\newenvironment{quotation}
               {\list{}{\listparindent 1.5em%
                        \itemindent    \listparindent
                        \rightmargin   \leftmargin
                        \parsep        \z@ \@plus\p@}%
                \item[]}
               {\endlist}
\newenvironment{quote}
               {\list{}{\rightmargin\leftmargin}%
                \item[]}
               {\endlist}
\newenvironment{titlepage}
    {%
      \cleardoublepage
      \if@twocolumn
        \@restonecoltrue\onecolumn
      \else
        \@restonecolfalse\newpage
      \fi
      \thispagestyle{empty}%
      \if@compatibility
        \setcounter{page}{0}
      \fi}%
    {\if@restonecol\twocolumn \else \newpage \fi
    }
\newcommand\appendix{\par
  \setcounter{chapter}{0}%
  \setcounter{section}{0}%
  \renewcommand\@chapapp{\appendixname}%
  \renewcommand\thechapter{\@Alph\c@chapter}}
\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@}
%\@addtoreset{equation}{chapter}
\renewcommand\theequation{\@arabic\c@equation}
\newcounter{figure}[chapter]
\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}
\newcounter{table}[chapter]
\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}
\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}}
\newcommand\@pnumwidth{1.55em}
\newcommand\@tocrmarg{2.55em}
\newcommand\@dotsep{4.5}
\setcounter{tocdepth}{2}
\newcommand\tableofcontents{%
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapter*{\contentsname
        \@mkboth{%
           \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
    \@starttoc{toc}%
    \if@restonecol\twocolumn\fi
    }
\newcommand*\l@part[2]{%
  \ifnum \c@tocdepth >-2\relax
    \addpenalty{-\@highpenalty}%
    \addvspace{2.25em \@plus\p@}%
    \begingroup
      \setlength\@tempdima{3em}%
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      {\leavevmode
       \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par
       \nobreak
         \global\@nobreaktrue
         \everypar{\global\@nobreakfalse\everypar{}}
    \endgroup
  \fi}
\newcommand*\l@chapter[2]{%
  \ifnum \c@tocdepth >\m@ne
    \addpenalty{-\@highpenalty}%
    \vskip 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
      \penalty\@highpenalty
    \endgroup
  \fi}
\newcommand*\l@section{\@dottedtocline{1}{1.5em}{2.3em}}
\newcommand*\l@subsection{\@dottedtocline{2}{3.8em}{3.2em}}
\newcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}}
\newcommand*\l@paragraph{\@dottedtocline{4}{10em}{5em}}
\newcommand*\l@subparagraph{\@dottedtocline{5}{12em}{6em}}
\newcommand\listoffigures{%
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapter*{\listfigurename
      \@mkboth{\MakeUppercase\listfigurename}%
              {\MakeUppercase\listfigurename}}%
    \@starttoc{lof}%
    \if@restonecol\twocolumn\fi
    }
\newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
\newcommand\listoftables{%
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapter*{\listtablename
      \@mkboth{%
          \MakeUppercase\listtablename}{\MakeUppercase\listtablename}}%
    \@starttoc{lot}%
    \if@restonecol\twocolumn\fi
    }
\let\l@table\l@figure
\newcommand\newblock{}
\newenvironment{theindex}
               {\if@twocolumn
                  \@restonecolfalse
                \else
                  \@restonecoltrue
                \fi
                \columnseprule \z@
                \columnsep 35\p@
                \twocolumn[\@makeschapterhead{\indexname}]%
                \@mkboth{\MakeUppercase\indexname}%
                        {\MakeUppercase\indexname}%
                \thispagestyle{plain}\parindent\z@
                \parskip\z@ \@plus .3\p@\relax
                \let\item\@idxitem}
               {\if@restonecol\onecolumn\else\clearpage\fi}
\newcommand\@idxitem{\par\hangindent 40\p@}
\newcommand\subitem{\par\hangindent 40\p@ \hspace*{20\p@}}
\newcommand\subsubitem{\par\hangindent 40\p@ \hspace*{30\p@}}
\newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
\renewcommand\footnoterule{%
  \kern-3\p@
  \hrule\@width.4\columnwidth
  \kern2.6\p@}
\@addtoreset{footnote}{chapter}
\long\def\@makefntext#1{%
    \parindent 1em%
    \noindent
    \hb@xt@1.8em{\hss\@makefnmark}#1}
\newcommand\contentsname{Contents}
\newcommand\abstractname{Abstract}
\newcommand\listfigurename{List of Figures}
\newcommand\listtablename{List of Tables}
\newcommand\bibname{References}
\newcommand\indexname{Index}
\newcommand\figurename{Figure}
\newcommand\tablename{Table}
\newcommand\partname{Part}
\newcommand\chaptername{Chapter}
\newcommand\appendixname{Appendix}
\newcommand\today{\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\day, \number\year}
\setlength\columnsep{10\p@}
\setlength\columnseprule{0\p@}
\pagestyle{headings}
\pagenumbering{arabic}
\if@twoside
\else
  \raggedbottom
\fi
\if@twocolumn
  \twocolumn
  \sloppy
  \flushbottom
\else
  \onecolumn
\fi
%%---------------------------------------
%%   Definición de estilos
%%---------------------------------------
\if@caste
    %% Entornos en castellano
    \theoremstyle{plain}
    % Al definir en primer lugar theorem conseguimos que tanto con
    % con la opción castella como sin ella, el contador de los
    % teoremas sea siempre el mismo \theorem. En tal caso las
    % manipulaciones para manejar los contadores de teoremas serán
    % más sencillas.
    \newtheorem{theorem}{Teorema}
    \newtheorem{teorema}[theorem]{Teorema}
    %\renewcommand{\theteorema}{\arabic{teorema}.}
    \newtheorem{algoritmo}[theorem]{Algoritmo}
    \newtheorem{axioma}[theorem]{Axioma}
    \newtheorem{caso}[theorem]{Caso}
    \newtheorem{afirmacion}[theorem]{Afirmaci\'{o}n}
    \newtheorem{conclusione}[theorem]{Conclusi\'{o}n}
    \newtheorem{condicion}[theorem]{Condici\'{o}n}
    \newtheorem{conjetura}[theorem]{Conjetura}
    \newtheorem{corolario}[theorem]{Corolario}
    \newtheorem{criterio}[theorem]{Criterio}
    \newtheorem{ejercicio}[theorem]{Ejercicio}
    \newtheorem{lema}[theorem]{Lema}
    \newtheorem{problema}[theorem]{Problema}
    \newtheorem{proposicion}[theorem]{Proposici\'{o}n}
    \theoremstyle{definition}
    \newtheorem{solucion}[theorem]{Soluci\'{o}n}
    \newtheorem{sumario}[theorem]{Sumario}
    \newtheorem{agradecimientos}[theorem]{Agradecimientos}
    \newtheorem{nota}[theorem]{Nota}
    \newtheorem{notacion}[theorem]{Notaci\'{o}n}
    \newtheorem{definicion}[theorem]{Definici\'{o}n}
    \newtheorem{ejemplo}[theorem]{Ejemplo}
    \newenvironment{demostracion}[1][Demostraci\'{o}n]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
    \renewcommand{\bibname}{Bibliograf\'{\i}a}
    \renewcommand{\abstractname}{Resumen}
    \newcommand{\keywordsname}{Palabras Clave}
    \newcommand{\cname}{MSC:}
    %------------------------------------------------
    % Redefinición de los entornos en ingles
    %------------------------------------------------
    \theoremstyle{plain}
    \newtheorem{algorithm}[theorem]{Algoritmo}
    \newtheorem{axiom}[theorem]{Axioma}
    \newtheorem{case}[theorem]{Caso}
    \newtheorem{claim}[theorem]{Afirmaci\'{o}n}
    \newtheorem{conclusion}[theorem]{Conclusi\'{o}n}
    \newtheorem{condition}[theorem]{Condici\'{o}n}
    \newtheorem{conjecture}[theorem]{Conjetura}
    \newtheorem{corollary}[theorem]{Corolario}
    \newtheorem{criterion}[theorem]{Criterio}
    \newtheorem{exercise}[theorem]{Ejercicio}
    \newtheorem{lemma}[theorem]{Lema}
    \newtheorem{problem}[theorem]{Problema}
    \newtheorem{proposition}[theorem]{Proposici\'{o}n}
    \theoremstyle{definition}
    \newtheorem{solution}[theorem]{Soluci\'{o}n}
    \newtheorem{summary}[theorem]{Sumario}
    \newtheorem{acknowledgement}[theorem]{Agradecimientos}
    \newtheorem{remark}[theorem]{Nota}
    \newtheorem{notation}[theorem]{Notaci\'{o}n}
    \newtheorem{example}[theorem]{Ejemplo}
    \newtheorem{definition}[theorem]{Definici\'{o}n}
%    \renewenvironment{proof}[1][Demostraci\'{o}n]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\else
    \theoremstyle{plain}
    %\newtheorem{theorem}{Theorem}
    \newtheorem{theorem}{Theorem}[section]
    %\renewcommand{\thetheorem}{\arabic{theorem}.}
    \newtheorem{algorithm}[theorem]{Algorithm}
    \newtheorem{axiom}[theorem]{Axiom}
    \newtheorem{case}[theorem]{Case}
    \newtheorem{claim}[theorem]{Claim}
    \newtheorem{conclusion}[theorem]{Conclusion}
    \newtheorem{condition}[theorem]{Condition}
    \newtheorem{conjecture}[theorem]{Conjecture}
    \newtheorem{corollary}[theorem]{Corollary}
    \newtheorem{criterion}[theorem]{Criterion}
    \newtheorem{exercise}[theorem]{Exercise}
    \newtheorem{lemma}[theorem]{Lemma}
    \newtheorem{problem}[theorem]{Problem}
    \newtheorem{proposition}[theorem]{Proposition}
    \theoremstyle{definition}
    \newtheorem{solution}[theorem]{Solution}
    \newtheorem{summary}[theorem]{Summary}
    \newtheorem{acknowledgement}[theorem]{Acknowledgement}
    \newtheorem{definition}[theorem]{Definition}
    \newtheorem*{definitionsn}{Definition}
    \newtheorem{remark}[theorem]{Remark}
    \newtheorem*{remarksn}{Remark}
    \newtheorem{example}[theorem]{Example}
    \newtheorem{notation}[theorem]{Notation}
%    \renewenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
    \newcommand{\keywordsname}{Keywords}
    \newcommand{\cname}{MSC:}
    %------------------------------------------------
    % Redefinición de los entornos en castellano
    %------------------------------------------------
    \theoremstyle{plain}
    \newtheorem{teorema}[theorem]{Theorem}
    \newtheorem{algoritmo}[theorem]{Algorithm}
    \newtheorem{axioma}[theorem]{Axiom}
    \newtheorem{caso}[theorem]{Case}
    \newtheorem{afirmacion}[theorem]{Claim}
    \newtheorem{conclusione}[theorem]{Conclusion}
    \newtheorem{condicion}[theorem]{Condition}
    \newtheorem{conjetura}[theorem]{Conjecture}
    \newtheorem{corolario}[theorem]{Corollary}
    \newtheorem{criterio}[theorem]{Criterion}
    \newtheorem{ejercicio}[theorem]{Exercise}
    \newtheorem{lema}[theorem]{Lemma}
    \newtheorem{problema}[theorem]{Problem}
    \newtheorem{proposicion}[theorem]{Proposition}
    \theoremstyle{definition}
    \newtheorem{solucion}[theorem]{Solution}
    \newtheorem{sumario}[theorem]{Summary}
    \newtheorem{agradecimientos}[theorem]{Acknowledgement}
    \newtheorem{nota}[theorem]{Remark}
    \newtheorem{notacion}[theorem]{Notation}
    \newtheorem{definicion}[theorem]{Definition}
    \newtheorem{ejemplo}[theorem]{Example}
%    \newenvironment{demostracion}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\fi
%\renewcommand{\thesection}{\arabic{section}.}
\renewcommand{\thesubsection}{\arabic{section}.\arabic{subsection}}
\renewcommand{\thanks}[1]{\gdef\@thanks{\symbolfootnote[2]{#1}}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\PP}{\mathbb{P}}
\newcommand{\CC}{\mathbb{C}}
\newcommand{\abrevtitulo}[1]{\chapter{#1}}
\renewcommand{\qedsymbol}{$\blacksquare$}
\numberwithin{equation}{section}
% Definición de nota al pie con numeración especial
\long\def\symbolfootnote[#1]#2{\begingroup%
    \def\thefootnote{\fnsymbol{footnote}}\footnote[#1]{#2}%
    \endgroup}
%
%
%
%
%
%
%
%
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%          Bibliografía
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                   Inicio de los contadores de referencias


\newcount\blackmarks\blackmarks=0
\newcount\refnum\refnum = 0

 \newread\testfl
 \def\inputifthere#1{\immediate\openin\testfl=#1
    \ifeof\testfl\message{(#1 does not yet exist)}
    \else\input#1\fi\closein\testfl}

 \inputifthere{\jobname.bux}
 \newwrite\mem
 \immediate\openout\mem=\jobname.bux

\def\plazieres{\expandafter\ifx\csname\griff\endcsname\relax%
  \xdef\esfehlt{\griff}\blackmark\else{\csname\griff\endcsname}\fi}

\def\definieres{\expandafter\xdef\csname\griff\endcsname{\inhalt}%
 \def\blankkk{ }\expandafter\immediate\write\mem{%
 \string\expandafter\def\string\csname%
 \blankkk\griff\string\endcsname{\inhalt}}}

\def\blackmark{\ifnum\blackmarks=0\global\blackmarks=1%
 \write16{===========================================================}%
 \write16{Some forward reference not yet defined. Re-TeX this file!}%
 \write16{===========================================================}%
 \fi\immediate\write16{undefined forward reference: \esfehlt}%
 {\vrule height10pt width2pt depth2pt}\esfehlt%
 {\vrule height10pt width2pt depth2pt}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%           Instrucciones internas de recuento y acumulación de
%               referencias

\def\rnube#1{\edef\griff{rn\thechapter#1}\edef\inhalt{\the\refnum}\definieres}%


\def\citube#1{\edef\griff{rn\thechapter#1}\plazieres}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%           Entornos de bibliografía

\newenvironment{thebibliography}{\@bibliotrue\section*{References}%
            \newcount\refnum\refnum =0\begin{description}\@bibliofalse}%
            {\end{description}\mbox{}\\[-20pt]

            {\samepage{\noindent\textcolor[gray]{.9}{\rule{150pt}{20pt} \rule{20pt}{20pt} \rule{20pt}{20pt} 
            \rule{20pt}{20pt}}
            
            \nopagebreak\noindent\makeaffiliation}}}

\renewcommand{\bibitem}[1]{\global\advance\refnum by 1  \rnube{#1}%
        \item{[\the\refnum]}}

\def\cite{\@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}}
\def\@citex[#1]#2{%
  \let\@citea\@empty
  \@cite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{,\penalty\@m\ }%
     \edef\@citeb{\expandafter\@firstofone\@citeb}%
     \citube{\@citeb}%
     %{\hbox{\csname b@\@citeb\endcsname}}
     }}{#1}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                   Fin de la bibliografía
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                   Redefinición de \equation \label  \ref y \pageref
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\renewenvironment{equation}{$$\refstepcounter{equation}}{\eqno
    \hbox{\@eqnnum}$$\global\@ignoretrue}



\renewcommand{\label}[1]{\@bsphack
  \protected@write\@auxout{}%
         {\string\newlabel{\thechapter#1}{{\@currentlabel}{\thepage}}}%
  \@esphack}


\def\ref#1{\expandafter\@setref\csname
            r@\thechapter#1\endcsname\@firstoftwo{\thechapter#1}}

            
\def\pageref#1{\expandafter\@setref\csname 
            r@\thechapter#1\endcsname\@secondoftwo{\thechapter#1}}


\newcommand{\labelg}[1]{\@bsphack
  \protected@write\@auxout{}%
         {\string\newlabel{#1}{{\@currentlabel}{\thepage}}}%
  \@esphack}
  
\def\refg#1{\expandafter\@setref\csname
            r@#1\endcsname\@firstoftwo{#1}}

            
\def\pagerefg#1{\expandafter\@setref\csname 
            r@#1\endcsname\@secondoftwo{#1}}




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                   Fin de la redefinición de \equaton \pageref \label y \ref
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%





\endinput
%%
%% Fin del fichero `ubeda.cls'.
