%%
%% This is file `spanish.ldf',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% spanish.dtx  (with options: `code')
%% This is a generated file.
%% 
%% Copyright (C) 1997 - 2021
%%        Javier Bezos (www.texnia.com)
%%     and
%%        CervanTeX (www.cervantex.es)
%% 
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License, either version 1.3 of this license or
%% (at your option) any later version. The latest version of this
%% license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX version
%% 2003/12/01 or later.
%% 
%% This work has the LPPL maintenance status "maintained".
%% 
%% The Current Maintainer of this work is Javier Bezos
%% 
%% The list of derived (unpacked) files belonging to the distribution
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
%% File `spanish.dtx'
%% Spanish Language Definition File
%% Copyright (C) 1997 - 2016
%%        Javier Bezos (www.tex-tipografia.com)
%%     and
%%        CervanTeX (www.cervantex.es)
%% Please report errors to: Javier Bezos (preferably)
%%                          www.tex-tipografia.com
\ProvidesLanguage{spanish.ldf}
    [2021/05/27 v5.0q Spanish support from the babel system]
\LdfInit{spanish}\captionsspanish

\edef\es@savedcatcodes{%
  \catcode`\noexpand\~=\the\catcode`\~
  \catcode`\noexpand\"=\the\catcode`\"
  \catcode`\noexpand\:=\the\catcode`\:}
\catcode`\~=\active
\catcode`\"=12
\catcode`\:=12

\ifx\undefined\l@spanish
  \@nopatterns{Spanish}
  \adddialect\l@spanish0
\fi

\def\es@sdef#1{\babel@save#1\def#1}
\def\es@sDRC#1{\babel@save#1\DeclareRobustCommand*#1}

\@ifundefined{documentclass}
  {\let\ifes@latex\iffalse}
  {\let\ifes@latex\iftrue}
\ifes@latex

\@ifundefined{spanishoptions}{}
{\PassOptionsToPackage{\spanishoptions}{babel}}

\def\es@genoption#1#2#3{%
  \DeclareOption{#1}{}%
  \@ifpackagewith{babel}{#1}%
    {\def\es@a{#1}%
     \expandafter\let\expandafter\es@b\csname opt@babel.sty\endcsname
     \addto\es@b{,#2}%
     \expandafter\let\csname opt@babel.sty\endcsname\es@b
     \AtEndOfPackage{#3}}%
    {}}

\es@genoption{es-minimal}
  {es-ucroman,es-noindentfirst,es-nosectiondot,es-noenumerate,%
   es-noitemize,es-noquoting,es-notilde,es-nodecimaldot}
  {\spanishplainpercent
   \let\es@operators\relax}
\es@genoption{es-nolists}
  {es-noenumerate,es-noitemize}{}
\es@genoption{es-sloppy}
  {es-nolayout,es-noshorthands}{}
\es@genoption{es-noshorthands}
  {es-noquoting,es-nodecimaldot,es-notilde}{}
\es@genoption{mexico}
  {mexico-com,es-nodecimaldot}{}
\es@genoption{mexico-com}
  {es-tabla,es-noquoting}
  {\def\lquoti{``}\def\rquoti{''}%
   \def\lquotii{`}\def\rquotii{'}%
   \def\lquotiii{\guillemotleft{}}%
   \def\rquotiii{\guillemotright{}}}

\def\es@ifoption#1#2#3{%
  \@ifundefined{BabelModifiers}%
    {\DeclareOption{es-#1}{}%
     \@ifpackagewith{babel}{es-#1}{#2}{#3}}
    {\@expandtwoargs\in@{,#1,}{,\BabelModifiers,}%
     \ifin@#2\else#3\fi}}

\def\es@optlayout#1#2{\es@ifoption{#1}{}{\addto\layoutspanish{#2}}}

\else

\def\es@ifoption#1#2#3{\@namedef{spanish#1}{#2}}

\fi

\let\es@uclc\@secondoftwo
\es@ifoption{uppernames}{\let\es@uclc\@firstoftwo}{}

\def\es@tablename{Ccuadro}
\es@ifoption{tabla}{\def\es@tablename{Ttabla}}{}
\es@ifoption{cuadro}{\def\es@tablename{Ccuadro}}{}
\StartBabelCommands*{spanish}{captions}
    [unicode, charset=utf8, fontenc=EU1 EU2]

  \AddBabelHook{spanish}{stringprocess}{%
    \protected@edef\BabelString{\BabelString}}
  \SetString{\bibname}{Bibliografía}%
  \SetString{\chaptername}{Capítulo}%
  \SetString{\appendixname}{Apéndice}%
  \SetString{\listfigurename}{Índice de \es@uclc Ffiguras}%
  \SetString{\listtablename}{Índice de \expandafter\es@uclc\es@tablename s}%
  \SetString{\indexname}{Índice \es@uclc Aalfabético}%
  \SetString{\pagename}{página}%
  \SetString{\seename}{véase}%
  \SetString{\alsoname}{véase también}%
  \SetString{\proofname}{Demostración}%
  \@ifundefined{chapter}
    {\SetString{\contentsname}{Índice}}%
    {\SetString{\contentsname}{Índice \es@uclc Ggeneral}}

\StartBabelCommands*{spanish}{captions}

  \AddBabelHook{spanish}{stringprocess}{%
    \protected@edef\BabelString{\BabelString}}
  \SetString{\prefacename}{Prefacio}%
  \SetString{\refname}{Referencias}%
  \SetString{\abstractname}{Resumen}%
  \SetString{\bibname}{Bibliograf\'{\i}a}%
  \SetString{\chaptername}{Cap\'{\i}tulo}%
  \SetString{\appendixname}{Ap\'{e}ndice}%
  \SetString{\listfigurename}{\'{I}ndice de \es@uclc Ffiguras}%
  \SetString{\listtablename}{\'{I}ndice de \expandafter\es@uclc\es@tablename s}%
  \SetString{\indexname}{\'{I}ndice \es@uclc Aalfab\'{e}tico}%
  \SetString{\figurename}{Figura}%
  \SetString{\tablename}{\expandafter\@firstoftwo\es@tablename}%
  \SetString{\partname}{Parte}%
  \SetString{\enclname}{Adjunto}%
  \SetString{\ccname}{Copia a}%
  \SetString{\headtoname}{A}%
  \SetString{\pagename}{p\'{a}gina}%
  \SetString{\seename}{v\'{e}ase}%
  \SetString{\alsoname}{v\'{e}ase tambi\'{e}n}%
  \SetString{\proofname}{Demostraci\'{o}n}%
  \SetString{\glossaryname}{Glosario}%
  \@ifundefined{chapter}
    {\SetString{\contentsname}{\'{I}ndice}}%
    {\SetString{\contentsname}{\'{I}ndice \es@uclc Ggeneral}}
\StartBabelCommands*{spanish}{date}

  \SetStringLoop{month#1name}{enero,febrero,marzo,abril,mayo,junio,%
    julio,agosto,septiembre,octubre,noviembre,diciembre}
  \SetStringLoop{ucmonth#1name}{Enero,Febrero,Marzo,Abril,Mayo,Junio,%
    Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre}
  \SetString\today{\spanishdate{\year}{\month}{\day}}
  \SetString\Today{\spanishDate{\year}{\month}{\day}}

\EndBabelCommands

\newcommand\spanishdate{\es@date{}}
\newcommand\spanishDate{\es@date{uc}}
\def\es@date#1#2#3#4{%
  \ifcase\es@datefmt
    \ifnum#4=1
      \es@datefirst
    \else
      \number#4\relax
    \fi
    ~de \csname#1month\romannumeral#3name\endcsname
  \else
    \csname#1month\romannumeral#3name\endcsname~%
    \ifnum#4=1
      \es@datefirst
    \else
      \number#4\relax
    \fi
  \fi
  \ de%
    \ifnum#2>1999\relax\es@yearl
    \else\ifnum#2<1100\es@yearl
    \fi\fi
  ~\number#2\relax}
\chardef\es@datefmt=\z@
\def\spanishreverseddate{\chardef\es@datefmt=\@ne}
\def\spanishdatedel{\def\es@yearl{l}}
\def\spanishdatede{\let\es@yearl\@empty}
\spanishdatede
\def\spanishdatefirst{\def\es@datefirst}
\spanishdatefirst{1}
\def\selectspanish{%
  \def\selectspanish{%
    \def\selectspanish{%
      \PackageWarning{spanish}{Extra \string\selectspanish\space ignored}}%
    \es@select}}
\@onlypreamble\selectspanish
\def\es@select{%
  \let\es@select\@undefined
  \selectlanguage{spanish}}

\let\es@shlist\@empty
\def\extrasspanish{%
  \textspanish
  \mathspanish
  \ifx\shorthandsspanish\@empty
    \expandafter\spanishdeactivate\expandafter{\es@shlist}%
    \languageshorthands{none}%
  \else
    \shorthandsspanish
  \fi}
\def\noextrasspanish{%
  \ifx\textspanish\@empty\else
    \notextspanish
  \fi
  \ifx\mathspanish\@empty\else
    \nomathspanish
  \fi
  \ifx\shorthandsspanish\@empty\else
    \noshorthandsspanish
  \fi
  \csname es@restorelist\endcsname}

\addto\textspanish{\es@sDRC\sptext{\es@sptext}}

\def\es@orddot{.}
\ifes@latex
  \def\es@sptext#1{%
    {\es@orddot
     \setbox\z@\hbox{8}\dimen@\ht\z@
     \globaldefs\m@ne
     \csname S@\f@size\endcsname
     \globaldefs\z@
     \edef\@tempa{\def\noexpand\@tempc{#1}%
       \lowercase{\def\noexpand\@tempb{#1}}}\@tempa
     \ifx\@tempb\@tempc
       \fontsize\sf@size\z@
       \selectfont
       \advance\dimen@-1.15ex
     \else
       \fontsize\ssf@size\z@
       \selectfont
       \advance\dimen@-1.5ex
     \fi
     \math@fontsfalse\raise\dimen@\hbox{#1}}}
\else
  \let\sptextfont\rm
  \def\es@sptext#1{%
    {\es@orddot
     \setbox\z@\hbox{8}\dimen@\ht\z@
     \edef\@tempa{\def\noexpand\@tempc{#1}%
       \lowercase{\def\noexpand\@tempb{#1}}}\@tempa
     \ifx\@tempb\@tempc
       \advance\dimen@-0.75ex
       \raise\dimen@\hbox{$\scriptstyle\sptextfont#1$}%
     \else
       \advance\dimen@-0.8ex
       \raise\dimen@\hbox{$\scriptscriptstyle\sptextfont#1$}%
     \fi}}
\fi
\ifes@latex
  \addto\textspanish{\es@sDRC\lsc{\es@lsc}}
  \def\es@lsc{\es@xlsc\MakeUppercase\MakeLowercase}
  \def\es@xlsc#1#2#3{%
    \leavevmode
    \hbox{%
      \scshape\selectfont
      \expandafter\ifx\csname\f@encoding/\f@family/\f@series
            /n/\f@size\expandafter\endcsname
        \csname\curr@fontshape/\f@size\endcsname
        \csname S@\f@size\endcsname
        \fontsize\sf@size\z@\selectfont
        \PackageWarning{spanish}{Replacing `\curr@fontshape' by
          \MessageBreak faked small caps}%
        #1{#3}%
      \else
        #2{#3}%
      \fi}}
\fi
\newif\ifes@listquot

\ifes@latex
  \csname newtoks\endcsname\es@quottoks
  \csname newcount\endcsname\es@quotdepth
  \newenvironment{quoting}
    {\leavevmode
     \advance\es@quotdepth\@ne
     \csname lquot\romannumeral\es@quotdepth\endcsname
     \ifnum\es@quotdepth=\@ne
       \es@listquotfalse
       \let\es@quotpar\everypar
       \let\everypar\es@quottoks
       \everypar\expandafter{\the\es@quotpar}%
       \es@quotpar{\the\everypar
         \ifes@listquot\global\es@listquotfalse\else\es@quotcont\fi}%
     \fi
     \toks@\expandafter{\es@quotcont}%
     \edef\es@quotcont{%
       \the\toks@
       \expandafter\noexpand
       \csname rquot\romannumeral\es@quotdepth\endcsname}}
    {\csname rquot\romannumeral\es@quotdepth\endcsname}
  \def\lquoti{\guillemotleft{}}
  \def\rquoti{\guillemotright{}}
  \def\lquotii{``}
  \def\rquotii{''}
  \def\lquotiii{`}
  \def\rquotiii{'}
  \let\es@quotcont\@empty
  \addto\@marginparreset{\let\es@quotcont\@empty}
  \DeclareRobustCommand\es@listquot{%
    \csname rquot\romannumeral\es@quotdepth\endcsname
    \global\es@listquottrue}
\fi
\addto\textspanish{\bbl@frenchspacing}
\addto\notextspanish{\bbl@nonfrenchspacing}
\addto\textspanish{%
  \let\es@save@dot\.%
  \es@sDRC\.{\@ifnextchar.{\es@dots}{\es@save@dot}}}
\def\es@dots..{\leavevmode\hbox{...}\spacefactor\@M}
\AtBeginDocument{% TODO. Not quite correct.
  \ifx\pdfstringdefDisableCommands\@undefined\else
    \pdfstringdefDisableCommands{\let\.\es@save@dot}%
  \fi}
\def\es@sppercent{% See tex.stack 435216 @egreg
  \leavevmode
  \ifnum\gluestretchorder\lastskip=\z@\unskip\fi
  \textormath{$\m@th\,$}{\,}}
\def\spanishplainpercent{\let\es@sppercent\@empty}
\addto\textspanish{%
  \let\percentsign\%%
  \es@sDRC\%{\es@sppercent\percentsign{}}}
\addto\mathspanish{\es@sDRC\dotlessi{\es@dotlessi}}
\let\nomathspanish\relax

\ifes@latex
  \def\es@texti{\i}
  \addto\@uclclist{\dotlessi\es@texti}
\fi

\def\es@fetchenc{%
  \begingroup
    \count@\escapechar \escapechar=\m@ne
      \edef\es@a{\expandafter\string\the\textfont\mathgroup}%
      \expandafter\split@name\es@a////\@nil
    \escapechar=\count@
    \@expandtwoargs\in@{////}{\f@size}%
    \ifin@\else
      \PackageError{spanish}{%
        Non-NFSS font name. The current math font (\es@a)\MessageBreak
        doesn't follow the NFSS conventions. I'll use the\MessageBreak
        default \string\i\space for \string\dotlessi,
        but expect a wrong output.}%
      {Find where this font has been (re)defined, and fix it.}%
      \def\f@encoding{OT1}%
    \fi
  \bbl@exp{\endgroup\def\\\f@encoding{\f@encoding}}}

\ifes@latex
  \ifx\Umathchardef\@undefined\else
    \expandafter\Umathchardef\csname es@EU1@dotlessi\endcsname"7"1"0131\relax
    \expandafter\Umathchardef\csname es@EU2@dotlessi\endcsname"7"1"0131\relax
    \expandafter\Umathchardef\csname es@TU@dotlessi\endcsname"7"1"0131\relax
  \fi
  \def\es@dotlessi{%
    \ifmmode
      {\ifnum\mathgroup=\m@ne
         \imath
       \else
         \es@fetchenc
         \@ifundefined{es@\f@encoding @dotlessi}%
           {\@ifundefined{\f@encoding\string\i}%
             {\edef\f@encoding{\string?}}{}%
            \expandafter\count@\the\csname\f@encoding\string\i\endcsname
            \advance\count@"7000
            \mathchar\count@}%
           {\csname es@\f@encoding @dotlessi\endcsname}%
       \fi}%
    \else
      \i
    \fi}
\else
  \def\es@dotlessi{\textormath{\i}{\mathchar"7010}}
\fi

\def\es@op@ac@base#1{\acute{\if i#1\dotlessi\else#1\fi}}
\ifx\Umathchar\@undefined\else
  \def\es@ac@TU@a{"00E1}\def\es@ac@TU@A{"00C1}%
  \def\es@ac@TU@e{"00E9}\def\es@ac@TU@E{"00C9}%
  \def\es@ac@TU@i{"00ED}\def\es@ac@TU@I{"00CD}%
  \def\es@ac@TU@o{"00F3}\def\es@ac@TU@O{"00D3}%
  \def\es@ac@TU@u{"00FA}\def\es@ac@TU@U{"00DA}%
  \def\es@op@ac@TU#1{%
    \ifnum\mathgroup=\m@ne
      \es@op@ac@base{#1}%
    \else
      \es@fetchenc
      \@ifundefined{es@op@ac@\f@encoding}%
        {\es@op@ac@base{#1}}%
        {\@ifundefined{es@ac@TU@#1}%
           {\es@op@ac@base{#1}}%
           {\Umathchar"7"1\csname es@ac@TU@#1\endcsname}}%
    \fi}%
  \expandafter\let\csname es@op@ac@EU1\endcsname\es@op@ac@TU
  \expandafter\let\csname es@op@ac@EU2\endcsname\es@op@ac@TU
\fi
\def\accentedoperators{%
  \@ifundefined{es@op@ac@TU}%
    {\let\es@op@ac\es@op@ac@base}%
    {\let\es@op@ac\es@op@ac@TU}}
\def\unaccentedoperators{%
  \def\es@op@ac##1{##1}}
\accentedoperators
\def\spacedoperators{\let\es@op@sp\,}
\def\unspacedoperators{\let\es@op@sp\@empty}
\spacedoperators
\addto\mathspanish{\es@operators}

\ifes@latex\else
  \let\operator@font\rm
\fi
\def\es@operators{%
  \es@sdef\bmod{\nonscript\mskip-\medmuskip\mkern5mu
    \mathbin{\operator@font m\es@op@ac od}\penalty900\mkern5mu
    \nonscript\mskip-\medmuskip}%
  \@ifundefined{@amsmath@err}%
    {\es@sdef\pmod##11{\allowbreak\mkern18mu
        ({\operator@font m\es@op@ac od}\,\,##11)}}%
    {\es@sdef\mod##1{\allowbreak\if@display\mkern18mu
        \else\mkern12mu\fi{\operator@font m\es@op@ac od}\,\,##1}%
      \es@sdef\pmod##1{\pod{{\operator@font m\es@op@ac od}%
        \mkern6mu##1}}}%
  \def\es@a##1 {%
    \ifx\relax##1\relax % empty? continue
      \bbl@afterelse
      \es@a
    \else
      \bbl@afterfi
      {\ifx\\##1% \@emtpy? finish
       \else
         \bbl@afterfi
         \begingroup
           \let\,\@empty % ignore when def'ing name
           \let\acute\@firstofone % id
           \edef\es@b{\expandafter\noexpand\csname##1\endcsname}%
           \def\,{\noexpand\es@op@sp}%
           \def\acute{\noexpand\es@op@ac}%
         \edef\es@a{\endgroup
           \noexpand\es@sdef\expandafter\noexpand\es@b{%
               \mathop{\noexpand\operator@font##1}\es@c}}%
         \es@a % restores itself
         \es@a
       \fi}%
    \fi}%
  \let\es@b\spanishoperators
  \addto\es@b{ }%
  \let\es@c\@empty
  \expandafter\es@a\es@b l\acute{i}m l\acute{i}m\,sup
    l\acute{i}m\,inf m\acute{a}x \acute{i}nf m\acute{i}n \\ %
  \def\es@c{\nolimits}%
  \expandafter\es@a\es@b sen tg arc\,sen arc\,cos arc\,tg \\ }
\def\spanishoperators{cotg cosec senh tgh }
\DeclareTextCompositeCommand{\'}{OT1}{i}{\@tabacckludge'{\i}}

\def\es@set@shorthand#1{%
  \expandafter\edef\csname es@savecat\string#1\endcsname
    {\the\catcode`#1}%
  \initiate@active@char{#1}%
  \catcode`#1=\csname es@savecat\string#1\endcsname\relax
  \if.#1\else
    \addto\es@restorelist{\es@restore{#1}}%
    \addto\es@select{\shorthandon{#1}}%
    \addto\shorthandsspanish{\es@activate{#1}}%
    \addto\es@shlist{#1}%
  \fi}

\def\es@use@shorthand{%
  \if@safe@actives
    \bbl@afterelse
    \string
  \else
    \bbl@afterfi
    {\ifx\thepage\relax
       \bbl@afterelse
       \string
     \else
       \bbl@afterfi
       \es@use@sh
     \fi}%
  \fi}

\def\es@use@sh#1{%
  \ifx\protect\@unexpandable@protect
    \bbl@afterelse
    \noexpand#1%
  \else%
    \bbl@afterfi
    \textormath
      {\csname active@char\string#1\endcsname}%
      {\csname normal@char\string#1\endcsname}%
  \fi}

\gdef\es@activate#1{%
  \begingroup
    \lccode`\~=`#1
    \lowercase{%
  \endgroup
  \def~{\es@use@shorthand~}}}

\def\spanishdeactivate#1{%
  \@tfor\@tempa:=#1\do{\expandafter\es@spdeactivate\@tempa}}

\def\es@spdeactivate#1{%
  \if.#1%
    \mathcode`\.=\es@period@math\relax
    \begingroup\lccode`\~=`\.\lowercase{\endgroup\let~\es@period@code}%
  \else
    \begingroup
      \lccode`\~=`#1
      \lowercase{%
    \endgroup
    \expandafter\let\expandafter~%
      \csname normal@char\string#1\endcsname}%
      \catcode`#1=\csname es@savecat\string#1\endcsname\relax
  \fi}
\def\es@restore#1{%
  \shorthandon{#1}%
  \begingroup
    \lccode`\~=`#1
    \lowercase{%
  \endgroup
  \bbl@deactivate{~}}}
\def\es@declare#1{%
  \@ifundefined{es@savecat\expandafter\string\@firstoftwo#1}%
    {\@gobble}%
    {\declare@shorthand{spanish}{#1}}}
\def\es@declarealt#1#2#3{%
  \es@declare{#1}{#3}%
  \es@declare{#2}{#3}}

\ifes@latex\else
  \def\@tabacckludge#1{\csname\string#1\endcsname}
\fi

\@ifundefined{add@accent}{\def\add@accent#1#2{\accent#1 #2}}{}
\ifes@latex
  \def\es@accent#1#2#3{%
    \expandafter\@text@composite
      \csname OT1\string#1\endcsname#3\@empty\@text@composite
      {\add@accent{#2}{#3}\futurelet\@let@token\bbl@sptest}}
  \def\bbl@sptest{\ifx\@let@token\@sptoken\else\bbl@allowhyphens\fi}
\else
  \def\es@accent#1#2#3{%
    \add@accent{#2}{#3}\bbl@allowhyphens}
\fi

\addto\shorthandsspanish{\languageshorthands{spanish}}%
\es@ifoption{noshorthands}{}{\es@set@shorthand{"}}
\def\es@umlaut#1{\add@accent{127}#1\bbl@allowhyphens}

\addto\shorthandsspanish{%
  \babel@save\bbl@umlauta
  \let\bbl@umlauta\es@umlaut}
\let\noshorthandsspanish\relax

\ifes@latex
\addto\shorthandsspanish{%
  \expandafter\es@sdef\csname OT1\string\~\endcsname{\es@accent\~{126}}%
  \expandafter\es@sdef\csname OT1\string\'\endcsname{\es@accent\'{19}}}
\else
\addto\shorthandsspanish{%
  \es@sdef\~{\es@accent\~{126}}%
  \es@sdef\'#1{\if#1i\es@accent\'{19}\i\else\es@accent\'{19}{#1}\fi}}
\fi

\def\es@babeltexpdf#1#2{\babel@texpdf{#1}{#2}{#2}{}}

\def\es@sptext@r#1#2{\es@sptext{#1#2}}
\es@declare{"a}{\sptext{a}}
\es@declare{"A}{\sptext{A}}
\es@declare{"o}{\sptext{o}}
\es@declare{"O}{\sptext{O}}
\es@declare{"e}{\protect\es@sptext@r{e}}
\es@declare{"E}{\protect\es@sptext@r{E}}
\es@declare{"u}{\"u}
\es@declare{"U}{\"U}
\es@declare{"i}{\"{\i}}
\es@declare{"I}{\"I}
\es@declare{"c}{\c{c}}
\es@declare{"C}{\c{C}}
\es@declare{"<}{\guillemotleft{}}
\es@declare{">}{\guillemotright{}}
\def\es@chf{\char\hyphenchar\font}
\es@declare{"-}{\bbl@allowhyphens\-\bbl@allowhyphens}
\es@declare{"=}{\es@babeltexpdf{\bbl@allowhyphens\es@chf\hskip\z@skip}{-}}
\es@declare{"~}
  {\es@babeltexpdf{\bbl@allowhyphens
   \discretionary{\es@chf}{\es@chf}{\es@chf}%
   \bbl@allowhyphens}{-}}
\es@declare{"r}
  {\bbl@allowhyphens
   \discretionary{\es@chf}{}{r}%
   \bbl@allowhyphens}
\es@declare{"R}
  {\bbl@allowhyphens
   \discretionary{\es@chf}{}{R}%
   \bbl@allowhyphens}
\es@declare{"y}
  {\@ifundefined{scalebox}%
    {\ensuremath{\tau}}%
    {\raisebox{1ex}{\scalebox{-1}{\resizebox{.45em}{1ex}{2}}}}}
\es@declare{""}{\hskip\z@skip}
\es@declare{"/}
  {\setbox\z@\hbox{/}%
   \dimen@\ht\z@
   \advance\dimen@-1ex
   \advance\dimen@\dp\z@
   \dimen@.31\dimen@
   \advance\dimen@-\dp\z@
   \ifdim\dimen@>0pt
     \kern.01em\lower\dimen@\box\z@\kern.03em
   \else
     \box\z@
   \fi}
\es@declare{"?}
  {\es@babeltexpdf{\setbox\z@\hbox{?`}%
   \leavevmode\raise\dp\z@\box\z@}{\textquestiondown}}
\es@declare{"!}
  {\es@babeltexpdf{\setbox\z@\hbox{!`}%
   \leavevmode\raise\dp\z@\box\z@}{\textexclamdown}}

\def\spanishdecimal#1{\def\es@decimal{{#1}}}
\def\decimalcomma{\spanishdecimal{,}}
\def\decimalpoint{\spanishdecimal{.}}
\decimalcomma
\bbl@ifshorthand{.}{}%
  {\PassOptionsToPackage{es-nodecimaldot}{babel}}
\es@ifoption{nodecimaldot}{}
  {\AtBeginDocument{\bgroup\@fileswfalse}%
   \begingroup\lccode`\~=`\.\lowercase{\endgroup
     \let\es@period@code~%
     \es@set@shorthand{.}%
     \let~\es@period@code}%
   \AtBeginDocument{\egroup}%
   \@namedef{normal@char\string.}{%
     \@ifnextchar\egroup
       {\es@period@code}%
       {\csname active@char\string.\endcsname}}%
   \declare@shorthand{system}{.}{\es@period@code}%
   \addto\shorthandsspanish{%
     \babel@savevariable{\mathcode`\.}%
     \edef\es@period@math{\the\mathcode`\.}%
     \babel@save\es@period@code
     \ifnum\es@period@math="8000 %
       \begingroup\lccode`\~=`\.\lowercase{\endgroup\let\es@period@code~}%
     \else
       \mathchardef\es@period@code\es@period@math\relax
       \mathcode`\.="8000 %
     \fi
     \begingroup\lccode`\~=`\.\lowercase{\endgroup\babel@save~}%
     \es@activate{.}}%
   \def\es@a#1{\es@declare{.#1}{\es@decimal#1}}%
   \es@a1\es@a2\es@a3\es@a4\es@a5\es@a6\es@a7\es@a8\es@a9\es@a0}

\bbl@ifshorthand{~}{}%
  {\PassOptionsToPackage{es-notilde}{babel}}
\es@ifoption{notilde}{}{\es@set@shorthand{~}}
\def\deactivatetilden{%
  \expandafter\let\csname spanish@sh@\string~@n@\endcsname\relax
  \expandafter\let\csname spanish@sh@\string~@N@\endcsname\relax}
\es@ifoption{tilden}
  {\es@declare{~n}{\~n}%
   \es@declare{~N}{\~N}}
  {\let\deactivatetilden\relax}
\es@declarealt{~-}{"+}{%
  \leavevmode
  \bgroup
    \let\@sptoken\es@dashes % Changes \@ifnextchar behaviour
    \@ifnextchar-%
      {\es@dashes}%
      {\hbox{\es@chf}\egroup}}
\def\es@dashes-{%
    \@ifnextchar-%
      {\bbl@allowhyphens\hbox{---}\bbl@allowhyphens\egroup\@gobble}%
      {\bbl@allowhyphens\hbox{--}\bbl@allowhyphens\egroup}}

\es@ifoption{noquoting}%
  {\let\es@quoting\relax
   \let\activatequoting\relax
   \let\deactivatequoting\relax}
  {\@ifundefined{XML@catcodes}%
    {\es@set@shorthand{<}%
     \es@set@shorthand{>}%
     \declare@shorthand{system}{<}{\csname normal@char\string<\endcsname}%
     \declare@shorthand{system}{>}{\csname normal@char\string>\endcsname}%
     \addto\es@restorelist{\es@quoting}%
     \addto\es@select{\es@quoting}%
     \ifes@latex
       \AtBeginDocument{%
         \es@quoting
         \if@filesw
           \immediate\write\@mainaux{\string\@nameuse{es@quoting}}%
         \fi}%
     \fi
     \def\activatequoting{%
       \shorthandon{<>}%
       \let\es@quoting\activatequoting}%
     \def\deactivatequoting{%
       \shorthandoff{<>}%
       \let\es@quoting\deactivatequoting}}{}}

\es@declarealt{<<}{"`}{\es@babeltexpdf{\begin{quoting}}{\guillemotleft}}
\es@declarealt{>>}{"'}{\es@babeltexpdf{\end{quoting}}{\guillemotright}}
\begingroup
\catcode`\'=12
\gdef\es@activeacute{%
  \es@set@shorthand{'}%
  \def\es@a##1{\es@declare{'##1}{\@tabacckludge'##1}}%
  \es@a a\es@a e\es@a i\es@a o\es@a u%
  \es@a A\es@a E\es@a I\es@a O\es@a U%
  \es@declare{'n}{\~n}%
  \es@declare{'N}{\~N}%
  \es@declare{''}{''}%
  \let\es@activeacute\relax}
\endgroup

\ifes@latex
  \@ifpackagewith{babel}{activeacute}{\es@activeacute}{}
\else
  \es@activeacute
\fi
\def\es@enumerate#1#2#3#4{\def\es@enum{{#1}{#2}{#3}{#4}}}
\def\es@itemize#1#2#3#4{\def\es@item{{#1}{#2}{#3}{#4}}}

\ifes@latex
\es@enumerate{1.}{a)}{1)}{a$'$}
\def\spanishdashitems{\es@itemize{---}{---}{---}{---}}
\def\spanishsymbitems{%
  \es@itemize
    {\leavevmode\hbox to 1.2ex
      {\hss\vrule height .9ex width .7ex depth -.2ex\hss}}%
    {\textbullet}%
    {$\m@th\circ$}%
    {$\m@th\diamond$}}
\def\spanishsignitems{%
  \es@itemize
    {\textbullet}%
    {$\m@th\circ$}%
    {$\m@th\diamond$}%
    {$\m@th\triangleright$}}
\spanishsymbitems
\def\es@enumdef#1#2#3\@@{%
  \if#21%
    \@namedef{theenum#1}{\arabic{enum#1}}%
  \else\if#2a%
    \@namedef{theenum#1}{\emph{\alph{enum#1}}}%
  \else\if#2A%
    \@namedef{theenum#1}{\Alph{enum#1}}%
  \else\if#2i%
    \@namedef{theenum#1}{\roman{enum#1}}%
  \else\if#2I%
    \@namedef{theenum#1}{\Roman{enum#1}}%
  \else\if#2o%
    \@namedef{theenum#1}{\arabic{enum#1}\sptext{o}}%
  \fi\fi\fi\fi\fi\fi
  \toks@\expandafter{\csname theenum#1\endcsname}%
  \expandafter\edef\csname labelenum#1\endcsname
    {\noexpand\es@listquot\the\toks@#3}}
\def\es@guillemot#1#2{%
  \ifmmode#1%
  \else
    \save@sf@q{\penalty\@M
    \leavevmode\hbox{\usefont{U}{lasy}{m}{n}%
      \char#2 \kern-0.19em\char#2 }}%
  \fi}
\def\layoutspanish{%
  \let\layoutspanish\@empty
  \DeclareTextCommand{\guillemotleft}{OT1}{\es@guillemot\ll{40}}%
  \DeclareTextCommand{\guillemotright}{OT1}{\es@guillemot\gg{41}}%
  \def\@fnsymbol##1%
    {\ifcase##1\or*\or**\or***\or****\or
     *****\or******\else\@ctrerr\fi}%
  \def\@alph##1%
    {\ifcase##1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or
     k\or l\or m\or n\or \~n\or o\or p\or q\or r\or s\or t\or u\or v\or
     w\or x\or y\or z\else\@ctrerr\fi}%
  \def\@Alph##1%
    {\ifcase##1\or A\or B\or C\or D\or E\or F\or G\or H\or I\or J\or
     K\or L\or M\or N\or \~N\or O\or P\or Q\or R\or S\or T\or U\or V\or
     W\or X\or Y\or Z\else\@ctrerr\fi}}

\es@optlayout{noenumerate}{%
  \def\es@enumerate#1#2#3#4{%
    \es@enumdef{i}#1\@empty\@empty\@@
    \es@enumdef{ii}#2\@empty\@empty\@@
    \es@enumdef{iii}#3\@empty\@empty\@@
    \es@enumdef{iv}#4\@empty\@empty\@@}%
    \def\p@enumii{\theenumi}%
    \def\p@enumiii{\p@enumii\theenumii}%
    \def\p@enumiv{\p@enumiii\theenumiii}%
    \expandafter\es@enumerate\es@enum}
\es@optlayout{noitemize}{%
  \def\es@itemize#1#2#3#4{%
    \def\labelitemi{\es@listquot#1}%
    \def\labelitemii{\es@listquot#2}%
    \def\labelitemiii{\es@listquot#3}%
    \def\labelitemiv{\es@listquot#4}}%
    \expandafter\es@itemize\es@item}
\let\esromanindex\@secondoftwo
\es@ifoption{ucroman}
  {\def\es@romandef{%
     \def\esromanindex##1##2{##1{\uppercase{##2}}}%
     \def\@roman{\@Roman}}}
  {\def\es@romandef{%
     \def\esromanindex##1##2{##1{\es@scroman{##2}}}%
     \def\@roman##1{\es@roman{\number##1}}%
     \def\es@roman##1{%
       \es@babeltexpdf{\es@scroman{\romannumeral##1}}{\@Roman{##1}}}%
     \DeclareRobustCommand\es@scroman{\es@xlsc\uppercase\@firstofone}}}
\es@optlayout{lcroman}{\es@romandef}
\newcommand\spanishlcroman{\def\@roman##1{\romannumeral##1}}
\newcommand\spanishucroman{\def\@roman{\@Roman}}
\newcommand\spanishscroman{\def\@roman##1{\es@roman{\romannumeral##1}}}
\es@optlayout{noindentfirst}{%
  \let\@afterindentfalse\@afterindenttrue
  \@afterindenttrue}
\es@optlayout{nosectiondot}{%
  \def\@seccntformat#1{\csname the#1\endcsname.\quad}%
  \def\numberline#1{\hb@xt@\@tempdima{#1\ifx&#1&\else.\fi\hfil}}}
\es@ifoption{nolayout}{\let\layoutspanish\relax}{}
\es@ifoption{sloppy}{\let\textspanish\relax\let\mathspanish\relax}{}
\es@ifoption{delayed}{}{\def\es@layoutspanish{\layoutspanish}}
\es@ifoption{preindex}{\AtEndOfPackage{\RequirePackage{romanidx}}}{}
\AtEndOfPackage{%
  \let\es@activeacute\@undefined
  \def\bbl@tempa{spanish}%
  \ifx\bbl@main@language\bbl@tempa
    \@nameuse{es@layoutspanish}%
    \addto\es@select{%
      \@ifstar{\PackageError{spanish}%
        {Old syntax--use es-nolayout}%
        {If you don't want changes in layout\MessageBreak
         use the package option `es-nolayout'}}%
      {}}%
    \AtBeginDocument{\layoutspanish}%
  \fi
  \selectspanish}
\fi % of \ifes@latex
\es@savedcatcodes
\providehyphenmins{\CurrentOption}{\tw@\tw@}
\ifes@latex\else
  \es@select
\fi
\csname activatequoting\endcsname
\ldf@finish{spanish}
\endinput
%%
%% End of file `spanish.ldf'.
