summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/babel/luababel.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel/luababel.def')
-rw-r--r--Master/texmf-dist/tex/generic/babel/luababel.def64
1 files changed, 31 insertions, 33 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/luababel.def b/Master/texmf-dist/tex/generic/babel/luababel.def
index b268627a9ab..7cbba864d1a 100644
--- a/Master/texmf-dist/tex/generic/babel/luababel.def
+++ b/Master/texmf-dist/tex/generic/babel/luababel.def
@@ -5,15 +5,16 @@
%% The original source files were:
%%
%% babel.dtx (with options: `luatex')
-%% This is a generated file.
-%%
-%% Copyright 2012-2016 Javier Bezos and Johannes L. Braams.
-%% Copyright 1989-2008 Johannes L. Braams and any individual authors
-%% listed elsewhere in this file. All rights reserved.
-%%
-%% This file was generated from file(s) of the Babel system.
-%% ---------------------------------------------------------
%%
+%%
+%% Copyright (C) 2012-2017 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.
@@ -21,32 +22,15 @@
%% 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.
-%%
-%% This file may only be distributed together with a copy of the Babel
-%% system. You may however distribute the Babel system without
-%% such generated files.
-%%
-%% The list of all files belonging to the Babel distribution is
-%% given in the file `manifest.bbl'. See also `legal.bbl for additional
-%% information.
-%%
+%%
%% 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 'babel.dtx'
-%%\ProvidesFile{babel.dtx}[2017/09/18 v3.13 The Babel package]
-%% Babel package for LaTeX2e.
-%% Copyright (C) 1989-2008 by Johannes Braams,
-%% TeXniek
-%% all rights reserved.
-%% Copyright (C) 2013-2017 by Johannes Braams
-%% TeXniek
-%% by Javier Bezos
-%% all rights reserved.
+%% extension |.ins|) which are part of the distribution.
+%%
\ifx\AddBabelHook\@undefined
\begingroup
\toks@{}
@@ -189,7 +173,7 @@
\catcode`\"=12
\catcode`\:=12
\directlua{
- Babel = {}
+ Babel = Babel or {}
function Babel.bytes(line)
return line:gsub("(.)",
function (chr) return unicode.utf8.char(string.byte(chr)) end)
@@ -353,11 +337,25 @@
{\bbl@csarg\def{script@#2}{Latin}}%
{\bbl@csarg\def{script@#2}{#1}}%
\@expandtwoargs % TODO should go to the ini loaders
- \in@{\csname bbl@script@#2\endcsname}{\bbl@trtscripts}%
+ \in@{\csname bbl@script@#2\endcsname}{\bbl@alscripts\bbl@rscripts}%
\ifin@
\let\bbl@beforeforeign\leavevmode
\EnableBabelHook{babel-bidi}%
- \@nameuse{bbl@xebidipar}%
+ \ifcase\bbl@engine\or
+ \@expandtwoargs % TODO should go to the ini loaders
+ \in@{\csname bbl@script@#2\endcsname}{\bbl@alscripts}%
+ \directlua{
+ Babel.langdirs = Babel.langdirs or {}
+ Babel.langdirs[\the\@nameuse{l@#2}] = \ifin@ 'al' \else 'r' \fi}%
+ \or
+ \bbl@xebidipar
+ \fi
+ \else
+ \ifcase\bbl@engine\or
+ \directlua{
+ Babel.langdirs = Babel.langdirs or {}
+ Babel.langdirs[\the\@nameuse{l@#2}] = 'l'}%
+ \fi
\fi
\bbl@foreach{#2}{%
\bbl@FSstore{##1}{rm}\rmdefault\bbl@save@rmdefault