%%
%% This is file `txtbabel.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% babel.dtx  (with options: `texxet')
%% 
%%
%% Copyright (C) 2012-2025 Javier Bezos and Johannes L. Braams.
%% Copyright (C) 1989-2012 Johannes L. Braams and
%%           any individual authors listed elsewhere in this file.
%% All rights reserved.
%%
%%
%% This file is part of the Babel system.
%% --------------------------------------
%%
%% 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.
%%
\providecommand\bbl@provide@intraspace{}
\bbl@trace{Redefinitions for bidi layout}
\ifx\bbl@opt@layout\@nnil\else % if layout=..
\IfBabelLayout{nopars}
  {}
  {\edef\bbl@opt@layout{\bbl@opt@layout.pars.}}%
\def\bbl@startskip{\ifcase\bbl@thepardir\leftskip\else\rightskip\fi}
\def\bbl@endskip{\ifcase\bbl@thepardir\rightskip\else\leftskip\fi}
\ifnum\bbl@bidimode>\z@
\IfBabelLayout{pars}
  {\def\@hangfrom#1{%
     \setbox\@tempboxa\hbox{{#1}}%
     \hangindent\ifcase\bbl@thepardir\wd\@tempboxa\else-\wd\@tempboxa\fi
     \noindent\box\@tempboxa}
   \def\raggedright{%
     \let\\\@centercr
     \bbl@startskip\z@skip
     \@rightskip\@flushglue
     \bbl@endskip\@rightskip
     \parindent\z@
     \parfillskip\bbl@startskip}
   \def\raggedleft{%
     \let\\\@centercr
     \bbl@startskip\@flushglue
     \bbl@endskip\z@skip
     \parindent\z@
     \parfillskip\bbl@endskip}}
  {}
\fi
\IfBabelLayout{lists}
  {\bbl@sreplace\list
     {\@totalleftmargin\leftmargin}{\@totalleftmargin\bbl@listleftmargin}%
   \def\bbl@listleftmargin{%
     \ifcase\bbl@thepardir\leftmargin\else\rightmargin\fi}%
   \ifcase\bbl@engine
     \def\labelenumii{)\theenumii(}% pdftex doesn't reverse ()
     \def\p@enumiii{\p@enumii)\theenumii(}%
   \fi
   \bbl@sreplace\@verbatim
     {\leftskip\@totalleftmargin}%
     {\bbl@startskip\textwidth
      \advance\bbl@startskip-\linewidth}%
   \bbl@sreplace\@verbatim
     {\rightskip\z@skip}%
     {\bbl@endskip\z@skip}}%
  {}
\IfBabelLayout{contents}
  {\bbl@sreplace\@dottedtocline{\leftskip}{\bbl@startskip}%
   \bbl@sreplace\@dottedtocline{\rightskip}{\bbl@endskip}}
  {}
\IfBabelLayout{columns}
  {\bbl@sreplace\@outputdblcol{\hb@xt@\textwidth}{\bbl@outputhbox}%
   \def\bbl@outputhbox#1{%
     \hb@xt@\textwidth{%
       \hskip\columnwidth
       \hfil
       {\normalcolor\vrule \@width\columnseprule}%
       \hfil
       \hb@xt@\columnwidth{\box\@leftcolumn \hss}%
       \hskip-\textwidth
       \hb@xt@\columnwidth{\box\@outputbox \hss}%
       \hskip\columnsep
       \hskip\columnwidth}}}%
  {}
\IfBabelLayout{counters*}%
  {\bbl@add\bbl@opt@layout{.counters.}%
   \AddToHook{shipout/before}{%
     \let\bbl@tempa\babelsublr
     \let\babelsublr\@firstofone
     \let\bbl@save@thepage\thepage
     \protected@edef\thepage{\thepage}%
     \let\babelsublr\bbl@tempa}%
   \AddToHook{shipout/after}{%
     \let\thepage\bbl@save@thepage}}{}
\IfBabelLayout{counters}%
  {\let\bbl@latinarabic=\@arabic
   \def\@arabic#1{\babelsublr{\bbl@latinarabic#1}}%
   \let\bbl@asciiroman=\@roman
   \def\@roman#1{\babelsublr{\ensureascii{\bbl@asciiroman#1}}}%
   \let\bbl@asciiRoman=\@Roman
   \def\@Roman#1{\babelsublr{\ensureascii{\bbl@asciiRoman#1}}}}{}
\fi % end if layout
\def\bbl@provide@extra#1{%
  % == auto-select encoding ==
  \ifx\bbl@encoding@select@off\@empty\else
    \bbl@ifunset{bbl@encoding@#1}%
      {\def\@elt##1{,##1,}%
       \edef\bbl@tempe{\expandafter\@gobbletwo\@fontenc@load@list}%
       \count@\z@
       \bbl@foreach\bbl@tempe{%
         \def\bbl@tempd{##1}%  Save last declared
         \advance\count@\@ne}%
       \ifnum\count@>\@ne    % (1)
         \getlocaleproperty*\bbl@tempa{#1}{identification/encodings}%
         \ifx\bbl@tempa\relax \let\bbl@tempa\@empty \fi
         \bbl@replace\bbl@tempa{ }{,}%
         \global\bbl@csarg\let{encoding@#1}\@empty
         \bbl@xin@{,\bbl@tempd,}{,\bbl@tempa,}%
         \ifin@\else % if main encoding included in ini, do nothing
           \let\bbl@tempb\relax
           \bbl@foreach\bbl@tempa{%
             \ifx\bbl@tempb\relax
               \bbl@xin@{,##1,}{,\bbl@tempe,}%
               \ifin@\def\bbl@tempb{##1}\fi
             \fi}%
           \ifx\bbl@tempb\relax\else
             \bbl@exp{%
               \global\<bbl@add>\<bbl@preextras@#1>{\<bbl@encoding@#1>}%
             \gdef\<bbl@encoding@#1>{%
               \\\babel@save\\\f@encoding
               \\\bbl@add\\\originalTeX{\\\selectfont}%
               \\\fontencoding{\bbl@tempb}%
               \\\selectfont}}%
           \fi
         \fi
       \fi}%
      {}%
  \fi}
\endinput
%%
%% End of file `txtbabel.def'.
