texlive[59439] Master/texmf-dist: babel (2jun21)

commits+karl at tug.org commits+karl at tug.org
Wed Jun 2 23:00:28 CEST 2021


Revision: 59439
          http://tug.org/svn/texlive?view=revision&revision=59439
Author:   karl
Date:     2021-06-02 23:00:28 +0200 (Wed, 02 Jun 2021)
Log Message:
-----------
babel (2jun21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/babel/README.md
    trunk/Master/texmf-dist/doc/latex/babel/babel.pdf
    trunk/Master/texmf-dist/source/latex/babel/babel.dtx
    trunk/Master/texmf-dist/source/latex/babel/babel.ins
    trunk/Master/texmf-dist/source/latex/babel/bbcompat.dtx
    trunk/Master/texmf-dist/source/latex/babel/locale.zip
    trunk/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua
    trunk/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua
    trunk/Master/texmf-dist/tex/generic/babel/babel-data-bidi.lua
    trunk/Master/texmf-dist/tex/generic/babel/babel-data-cjk.lua
    trunk/Master/texmf-dist/tex/generic/babel/babel.def
    trunk/Master/texmf-dist/tex/generic/babel/babel.sty
    trunk/Master/texmf-dist/tex/generic/babel/blplain.tex
    trunk/Master/texmf-dist/tex/generic/babel/bplain.tex
    trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg
    trunk/Master/texmf-dist/tex/generic/babel/locale/ar/babel-ar-DZ.ini
    trunk/Master/texmf-dist/tex/generic/babel/locale/ar/babel-ar-MA.ini
    trunk/Master/texmf-dist/tex/generic/babel/locale/ar/babel-ar-SY.ini
    trunk/Master/texmf-dist/tex/generic/babel/locale/ar/babel-ar.ini
    trunk/Master/texmf-dist/tex/generic/babel/locale/eu/babel-eu.ini
    trunk/Master/texmf-dist/tex/generic/babel/luababel.def
    trunk/Master/texmf-dist/tex/generic/babel/nil.ldf
    trunk/Master/texmf-dist/tex/generic/babel/plain.def
    trunk/Master/texmf-dist/tex/generic/babel/switch.def
    trunk/Master/texmf-dist/tex/generic/babel/txtbabel.def
    trunk/Master/texmf-dist/tex/generic/babel/xebabel.def

Modified: trunk/Master/texmf-dist/doc/latex/babel/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/babel/README.md	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/doc/latex/babel/README.md	2021-06-02 21:00:28 UTC (rev 59439)
@@ -1,4 +1,4 @@
-## Babel 3.59
+## Babel 3.60
 
 This package manages culturally-determined typographical (and other)
 rules, and hyphenation patterns for a wide range of languages. Many
@@ -8,9 +8,9 @@
 
 The latest stable version is available on <https://ctan.org/pkg/babel>.
 
-Changes in version 3.59 are described in:
+Changes in version 3.60 are described in:
 
-https://github.com/latex3/babel/blob/master/news-guides/news/whats-new-in-babel-3.59.md
+https://github.com/latex3/babel/blob/master/news-guides/news/whats-new-in-babel-3.60.md
 
 Apart from the manual, you can find information on some aspects of babel at:
 
@@ -46,12 +46,12 @@
 
 ### Summary of Latest changes
 ```
-3.59   2021-05-16
-       * Tentative kashida with user-definable rules (via transforms).
-       * Fixes:
-         - \babel at texpdf inconsistently defined (#130)
-         - Partial fix for #131 (quotation with CJK).
-       * Removed doubleletter.hyphen (Norsk), which serves to nothing.
+3.60   2021-06-02
+       * A major fix for a bug with the latest LaTeX releases: class
+         options were messed up.
+       * Improved justification=kashida/elongated: lists, vowelized texts.
+       * Fix: Underfull \hbox with amsmath (#133).
+       * Improved the ini file for Basque (captions).
 ```
 
 ### Previous changes

Modified: trunk/Master/texmf-dist/doc/latex/babel/babel.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/babel/babel.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/babel/babel.dtx	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/source/latex/babel/babel.dtx	2021-06-02 21:00:28 UTC (rev 59439)
@@ -20,6 +20,7 @@
 %% 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
@@ -31,7 +32,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2021/05/16 v3.59 The Babel package]
+\ProvidesFile{babel.dtx}[2021/06/02 v3.60 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -4967,8 +4968,8 @@
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=3.59>>
-%<<date=2021/05/16>>
+%<<version=3.60>>
+%<<date=2021/06/02>>
 %    \end{macrocode}
 %
 % \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -5435,7 +5436,7 @@
     Reported}}
 \def\@nolanerr#1{%
   \bbl at error
-    {You haven't defined the language #1\space yet.\\%
+    {You haven't defined the language '#1' yet.\\%
      Perhaps you misspelled it or your installation\\%
      is not complete}%
     {Your command will be ignored, type <return> to proceed}}
@@ -5442,7 +5443,7 @@
 \def\@nopatterns#1{%
   \bbl at warning
     {No hyphenation patterns were preloaded for\\%
-     the language `#1' into the format.\\%
+     the language '#1' into the format.\\%
      Please, configure your TeX system to add them and\\%
      rebuild the format. Now I will use the patterns\\%
      preloaded for \bbl at nulllanguage\space instead}}
@@ -5607,10 +5608,10 @@
     \bbl at csarg\edef{opt@#1}{#2}%
   \else
     \bbl at error
-     {Bad option `#1=#2'. Either you have misspelled the\\%
-      key or there is a previous setting of `#1'. Valid\\%
-      keys are, among others, `shorthands', `main', `bidi',\\%
-      `strings', `config', `headfoot', `safe', `math'.}%
+     {Bad option '#1=#2'. Either you have misspelled the\\%
+      key or there is a previous setting of '#1'. Valid\\%
+      keys are, among others, 'shorthands', 'main', 'bidi',\\%
+      'strings', 'config', 'headfoot', 'safe', 'math'.}%
      {See the manual for further details.}
   \fi}
 %    \end{macrocode}
@@ -6534,8 +6535,8 @@
 \else
   \ifnum\bbl at bidimode>100 \ifnum\bbl at bidimode<200
     \bbl at error
-      {The bidi method `basic' is available only in\\%
-       luatex. I'll continue with `bidi=default', so\\%
+      {The bidi method 'basic' is available only in\\%
+       luatex. I'll continue with 'bidi=default', so\\%
        expect wrong results}%
       {See the manual for further details.}%
     \let\bbl at beforeforeign\leavevmode
@@ -6661,16 +6662,20 @@
   \def\bbl at dirparastext{\pardir\the\textdir\relax}%   %%%%
   % Sadly, we have to deal with boxes in math with basic.
   % Activated every math with the package option bidi=:
-  \def\bbl at mathboxdir{%
-    \ifcase\bbl at thetextdir\relax
-      \everyhbox{\textdir TLT\relax}%
-    \else
-      \everyhbox{\textdir TRT\relax}%
-    \fi}
-  \frozen at everymath\expandafter{%
-    \expandafter\bbl at mathboxdir\the\frozen at everymath}
-  \frozen at everydisplay\expandafter{%
-    \expandafter\bbl at mathboxdir\the\frozen at everydisplay}
+  \ifnum\bbl at bidimode>\z@
+    \def\bbl at mathboxdir{%
+      \ifcase\bbl at thetextdir\relax
+        \everyhbox{\bbl at mathboxdir@aux L}%
+      \else
+        \everyhbox{\bbl at mathboxdir@aux R}%
+       \fi}
+    \def\bbl at mathboxdir@aux#1{%
+      \@ifnextchar\egroup{}{\textdir T#1T\relax}}
+    \frozen at everymath\expandafter{%
+      \expandafter\bbl at mathboxdir\the\frozen at everymath}
+    \frozen at everydisplay\expandafter{%
+      \expandafter\bbl at mathboxdir\the\frozen at everydisplay}
+  \fi
 \else % pdftex=0, xetex=2
   \newcount\bbl at dirlevel
   \chardef\bbl at thetextdir\z@
@@ -6832,7 +6837,7 @@
      \expandafter\let\expandafter\BabelModifiers
         \csname bbl at mod@\CurrentOption\endcsname}%
     {\bbl at error{%
-       Unknown option `\CurrentOption'. Either you misspelled it\\%
+       Unknown option '\CurrentOption'. Either you misspelled it\\%
        or the language definition file \CurrentOption.ldf was not found}{%
        Valid options are, among others: shorthands=, KeepShorthandsActive,\\%
        activeacute, activegrave, noconfigs, safe=, main=, math=\\%
@@ -6884,7 +6889,7 @@
              * Local config file \bbl at opt@config.cfg used^^J%
              *}}%
     {\bbl at error{%
-       Local config file `\bbl at opt@config.cfg' not found}{%
+       Local config file '\bbl at opt@config.cfg' not found}{%
        Perhaps you misspelled it.}}%
 \fi
 %    \end{macrocode}
@@ -6943,19 +6948,27 @@
 \let\bbl at tempb\@nnil
 \bbl at foreach\@classoptionslist{%
   \bbl at ifunset{ds@#1}%
-    {\IfFileExists{#1.ldf}{}%
-      {\IfFileExists{babel-#1.tex}{}{\@namedef{ds@#1}{}}}}%
-    {}%
-  \bbl at ifunset{ds@#1}%
-    {\def\bbl at tempb{#1}%
-     \DeclareOption{#1}{%
-       \ifnum\bbl at iniflag>\@ne
-         \bbl at ldfinit
-         \babelprovide[import]{#1}%
-         \bbl at afterldf{}%
-       \else
-         \bbl at load@language{#1}%
-       \fi}}%
+    {\IfFileExists{#1.ldf}%
+      {\def\bbl at tempb{#1}%
+       \DeclareOption{#1}{%
+         \ifnum\bbl at iniflag>\@ne
+           \bbl at ldfinit
+           \babelprovide[import]{#1}%
+           \bbl at afterldf{}%
+         \else
+           \bbl at load@language{#1}%
+         \fi}}%
+      {\IfFileExists{babel-#1.tex}% TODO. Copypaste pattern
+        {\def\bbl at tempb{#1}%
+         \DeclareOption{#1}{%
+           \ifnum\bbl at iniflag>\@ne
+             \bbl at ldfinit
+             \babelprovide[import]{#1}%
+             \bbl at afterldf{}%
+           \else
+             \bbl at load@language{#1}%
+           \fi}}%
+         {}}}%
     {}}
 %    \end{macrocode}
 %
@@ -7013,10 +7026,10 @@
   \expandafter\bbl at tempa\bbl at loaded,\@nnil
   \ifx\bbl at tempb\bbl at tempc\else
     \bbl at warning{%
-      Last declared language option is `\bbl at tempc',\\%
-      but the last processed one was `\bbl at tempb'.\\%
-      The main language cannot be set as both a global\\%
-      and a package option. Use `main=\bbl at tempc' as\\%
+      Last declared language option is '\bbl at tempc',\\%
+      but the last processed one was '\bbl at tempb'.\\%
+      The main language can't be set as both a global\\%
+      and a package option. Use 'main=\bbl at tempc' as\\%
       option. Reported}%
   \fi
 \else
@@ -7555,7 +7568,7 @@
   \bbl at iflanguage\languagename{%
      \expandafter\ifx\csname date\languagename\endcsname\relax
       \bbl at error
-        {Unknown language `\languagename'. Either you have\\%
+        {Unknown language '\languagename'. Either you have\\%
          misspelled its name, it has not been installed,\\%
          or you requested it in a previous run. Fix its name,\\%
          install it or just rerun the file, respectively. In\\%
@@ -7832,7 +7845,7 @@
   \bbl at iflanguage\languagename{%
     \expandafter\ifx\csname date\languagename\endcsname\relax
       \bbl at warning   % TODO - why a warning, not an error?
-        {Unknown language `#1'. Either you have\\%
+        {Unknown language '#1'. Either you have\\%
          misspelled its name, it has not been installed,\\%
          or you requested it in a previous run. Fix its name,\\%
          install it or just rerun the file, respectively. In\\%
@@ -8089,7 +8102,7 @@
     Reported}}
 \def\@nolanerr#1{%
   \bbl at error
-    {You haven't defined the language #1\space yet.\\%
+    {You haven't defined the language '#1' yet.\\%
      Perhaps you misspelled it or your installation\\%
      is not complete}%
     {Your command will be ignored, type <return> to proceed}}
@@ -8096,7 +8109,7 @@
 \def\@nopatterns#1{%
   \bbl at warning
     {No hyphenation patterns were preloaded for\\%
-     the language `#1' into the format.\\%
+     the language '#1' into the format.\\%
      Please, configure your TeX system to add them and\\%
      rebuild the format. Now I will use the patterns\\%
      preloaded for \bbl at nulllanguage\space instead}}
@@ -9182,7 +9195,7 @@
 %    \begin{macrocode}
 \def\@notshorthand#1{%
   \bbl at error{%
-    The character `\string #1' should be made a shorthand character;\\%
+    The character '\string #1' should be made a shorthand character;\\%
     add the command \string\useshorthands\string{#1\string} to
     the preamble.\\%
     I will ignore your instruction}%
@@ -9225,7 +9238,7 @@
   \ifx#2\@nnil\else
     \bbl at ifunset{bbl at active@\string#2}%
       {\bbl at error
-         {I cannot switch `\string#2' on or off--not a shorthand}%
+         {I can't switch '\string#2' on or off--not a shorthand}%
          {This character is not a shorthand. Maybe you made\\%
           a typing mistake? I will ignore your instruction.}}%
       {\ifcase#1%   off, on, off*
@@ -10954,8 +10967,8 @@
   % For bidi texts, to switch the font based on direction
   \ifx\bbl at KVP@mapfont\@nil\else
     \bbl at ifsamestring{\bbl at KVP@mapfont}{direction}{}%
-      {\bbl at error{Option `\bbl at KVP@mapfont' unknown for\\%
-                  mapfont. Use `direction'.%
+      {\bbl at error{Option '\bbl at KVP@mapfont' unknown for\\%
+                  mapfont. Use 'direction'.%
                  {See the manual for details.}}}%
     \bbl at ifunset{bbl at lsys@\languagename}{\bbl at provide@lsys{\languagename}}{}%
     \bbl at ifunset{bbl at wdir@\languagename}{\bbl at provide@dirs{\languagename}}{}%
@@ -13770,6 +13783,8 @@
     Babel.arabic.elong_map[\the\localeid]   = {}
     luatexbase.add_to_callback('post_linebreak_filter',
       Babel.arabic.justify, 'Babel.arabic.justify')
+%     luatexbase.add_to_callback('hpack_filter',
+%       Babel.arabic.justify_hbox, 'Babel.arabic.justify_hbox')
   }}% 
 % Save both node lists to make replacement. TODO. Save also widths to
 % make computations
@@ -13840,9 +13855,23 @@
 
 function Babel.arabic.justify(head)
   if not Babel.arabic.justify_enabled then return head end
+  for line in node.traverse_id(node.id'hlist', head) do
+    Babel.arabic.justify_hlist(head, line)
+  end
+  return head
+end
+
+function Babel.arabic.justify_hbox(head, gc, size, pack)
+  if Babel.arabic.justify_enabled and pack == 'exactly' then
+    Babel.arabic.justify_hlist(head, nil, gc, size, pack)
+  end
+  return head
+end
+
+function Babel.arabic.justify_hlist(head, line, gc, size, pack)
   local d, new
   local k_list, k_item, pos_inline
-  local width, width_new, full, k_curr, wt_pos, goal
+  local width, width_new, full, k_curr, wt_pos, goal, shift
   local subst_done = false
   local elong_map = Babel.arabic.elong_map
   local last_line
@@ -13849,103 +13878,111 @@
   local GLYPH = node.id'glyph'
   local KASHIDA = luatexbase.registernumber'bblar at kashida'
   local LOCALE = luatexbase.registernumber'bbl at attr@locale'
+  
+  if line == nil then
+    line = {}
+    line.glue_sign = 1
+    line.glue_order = 0
+    line.head = head
+    line.shift = 0
+    line.width = size
+  end
 
-  for line in node.traverse_id(node.id'hlist', head) do
-    % Exclude last line. todo. But-- it discards one-word lines, too!
-    % ? Look for glue = 12:15
-    if (line.glue_sign == 1 and line.glue_order == 0) then
-      elongs = {}     % Stores elongated candidates of each line
-      k_list = {}     % And all letters with kashida
-      pos_inline = 0  % Not yet used
+  % Exclude last line. todo. But-- it discards one-word lines, too!
+  % ? Look for glue = 12:15
+  if (line.glue_sign == 1 and line.glue_order == 0) then
+    elongs = {}     % Stores elongated candidates of each line
+    k_list = {}     % And all letters with kashida
+    pos_inline = 0  % Not yet used
 
-      for n in node.traverse_id(GLYPH, line.head) do
-        pos_inline = pos_inline + 1 % To find where it is. Not used.
+    for n in node.traverse_id(GLYPH, line.head) do
+      pos_inline = pos_inline + 1 % To find where it is. Not used.
 
-        % Elongated glyphs
-        if elong_map then
-          local locale = node.get_attribute(n, LOCALE)
-          if elong_map[locale] and elong_map[locale][n.font] and 
-              elong_map[locale][n.font][n.char] then
-            table.insert(elongs, {node = n, locale = locale} )
-            node.set_attribute(n.prev, KASHIDA, 0)
-          end
+      % Elongated glyphs
+      if elong_map then
+        local locale = node.get_attribute(n, LOCALE)
+        if elong_map[locale] and elong_map[locale][n.font] and 
+            elong_map[locale][n.font][n.char] then
+          table.insert(elongs, {node = n, locale = locale} )
+          node.set_attribute(n.prev, KASHIDA, 0)
         end
+      end
 
-        % Tatwil
-        if Babel.kashida_wts then
-          local k_wt = node.get_attribute(n, KASHIDA)
-          if k_wt > 0 then % todo. parameter for multi inserts
-            table.insert(k_list, {node = n, weight = k_wt, pos = pos_inline})
-          end
+      % Tatwil
+      if Babel.kashida_wts then
+        local k_wt = node.get_attribute(n, KASHIDA)
+        if k_wt > 0 then % todo. parameter for multi inserts
+          table.insert(k_list, {node = n, weight = k_wt, pos = pos_inline})
         end
+      end
 
-      end % of node.traverse_id
+    end % of node.traverse_id
 
-      if #elongs == 0 and #k_list == 0 then goto next_line end
+    if #elongs == 0 and #k_list == 0 then goto next_line end
+    full  = line.width
+    shift = line.shift
+    goal  = full * Babel.arabic.justify_factor % A bit crude
+    width = node.dimensions(line.head)    % The 'natural' width
 
-      full = line.width
-      goal = full * Babel.arabic.justify_factor % A bit crude
-      width = node.dimensions(line.head)    % The 'natural' width
+    % == Elongated ==
+    % Original idea taken from 'chikenize'
+    while (#elongs > 0 and width < goal) do
+      subst_done = true
+      local x = #elongs
+      local curr = elongs[x].node
+      local oldchar = curr.char
+      curr.char = elong_map[elongs[x].locale][curr.font][curr.char]
+      width = node.dimensions(line.head)  % Check if the line is too wide
+      % Substitute back if the line would be too wide and break:
+      if width > goal then
+        curr.char = oldchar
+        break
+      end 
+      % If continue, pop the just substituted node from the list:
+      table.remove(elongs, x)
+    end
 
-      % == Elongated ==
-      % Original idea taken from 'chikenize'
-      while (#elongs > 0 and width < goal) do
-        subst_done = true
-        local x = #elongs
-        local curr = elongs[x].node
-        local oldchar = curr.char
-        curr.char = elong_map[elongs[x].locale][curr.font][curr.char]
-        width = node.dimensions(line.head)  % Check if the line is too wide
-        % Substitute back if the line would be too wide and break:
-        if width > goal then
-          curr.char = oldchar
-          break
-        end 
-        % If continue, pop the just substituted node from the list:
-        table.remove(elongs, x)
-      end
+    % == Tatwil ==
+    if #k_list == 0 then goto next_line end
 
-      % == Tatwil ==
-      if #k_list == 0 then goto next_line end
+    width = node.dimensions(line.head)    % The 'natural' width
+    k_curr = #k_list
+    wt_pos = 1
 
-      width = node.dimensions(line.head)    % The 'natural' width
-      k_curr = #k_list
-      wt_pos = 1
-
-      while width < goal do
-        subst_done = true
-        k_item = k_list[k_curr].node
-        if k_list[k_curr].weight == Babel.kashida_wts[wt_pos] then       
-          d = node.copy(k_item)
-          d.char = 0x0640
-          line.head, new = node.insert_after(line.head, k_item, d)
-          width_new = node.dimensions(line.head)
-          if width > goal or width == width_new then
-            node.remove(line.head, new) % Better compute before
-            break
-          end
-          width = width_new
+    while width < goal do
+      subst_done = true
+      k_item = k_list[k_curr].node
+      if k_list[k_curr].weight == Babel.kashida_wts[wt_pos] then       
+        d = node.copy(k_item)
+        d.char = 0x0640
+        line.head, new = node.insert_after(line.head, k_item, d)
+        width_new = node.dimensions(line.head)
+        if width > goal or width == width_new then
+          node.remove(line.head, new) % Better compute before
+          break
         end
-        if k_curr == 1 then
-          k_curr = #k_list
-          wt_pos = (wt_pos >= table.getn(Babel.kashida_wts)) and 1 or wt_pos+1   
-        else
-          k_curr = k_curr - 1
-        end
+        width = width_new
       end
+      if k_curr == 1 then
+        k_curr = #k_list
+        wt_pos = (wt_pos >= table.getn(Babel.kashida_wts)) and 1 or wt_pos+1   
+      else
+        k_curr = k_curr - 1
+      end
+    end
 
-      ::next_line::
+    ::next_line::
 
-      % Must take into account marks and ins, see luatex manual.
-      % Have to be executed only if there are changes. Investigate
-      % what's going on exactly.
-      if subst_done then
-        node.insert_before(head, line, node.hpack(line.head, full, 'exactly'))
-        node.remove(head, line)
-      end
-    end % if process line
-  end % for lines
-  return head
+    % Must take into account marks and ins, see luatex manual.
+    % Have to be executed only if there are changes. Investigate
+    % what's going on exactly.
+    if subst_done and not gc then
+      d = node.hpack(line.head, full, 'exactly')
+      d.shift = shift
+      node.insert_before(head, line, d)
+      node.remove(head, line)
+    end
+  end % if process line
 end
 }
 \endgroup

Modified: trunk/Master/texmf-dist/source/latex/babel/babel.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/babel/babel.ins	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/source/latex/babel/babel.ins	2021-06-02 21:00:28 UTC (rev 59439)
@@ -26,7 +26,7 @@
 %% and covered by LPPL is defined by the unpacking scripts (with
 %% extension .ins) which are part of the distribution.
 %%
-\def\filedate{2021/05/16}
+\def\filedate{2021/06/02}
 \def\batchfile{babel.ins}
 \input docstrip.tex
 

Modified: trunk/Master/texmf-dist/source/latex/babel/bbcompat.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/babel/bbcompat.dtx	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/source/latex/babel/bbcompat.dtx	2021-06-02 21:00:28 UTC (rev 59439)
@@ -30,7 +30,7 @@
 %
 % \iffalse
 %<*dtx>
-\ProvidesFile{bbcompat.dtx}[2021/05/16 v3.59]
+\ProvidesFile{bbcompat.dtx}[2021/06/02 v3.60]
 %</dtx>
 %
 %% File 'bbcompat.dtx'

Modified: trunk/Master/texmf-dist/source/latex/babel/locale.zip
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua	2021-06-02 21:00:28 UTC (rev 59439)
@@ -26,6 +26,7 @@
 -- 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

Modified: trunk/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua	2021-06-02 21:00:28 UTC (rev 59439)
@@ -26,6 +26,7 @@
 -- 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

Modified: trunk/Master/texmf-dist/tex/generic/babel/babel-data-bidi.lua
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/babel-data-bidi.lua	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel-data-bidi.lua	2021-06-02 21:00:28 UTC (rev 59439)
@@ -26,6 +26,7 @@
 -- 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

Modified: trunk/Master/texmf-dist/tex/generic/babel/babel-data-cjk.lua
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/babel-data-cjk.lua	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel-data-cjk.lua	2021-06-02 21:00:28 UTC (rev 59439)
@@ -26,6 +26,7 @@
 -- 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

Modified: trunk/Master/texmf-dist/tex/generic/babel/babel.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/babel.def	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel.def	2021-06-02 21:00:28 UTC (rev 59439)
@@ -26,6 +26,7 @@
 %% 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
@@ -39,7 +40,7 @@
     \wlog{File: #1 #4 #3 <#2>}%
     \let\ProvidesFile\@undefined}
 \fi
-\ProvidesFile{babel.def}[2021/05/16 3.59 Babel common definitions]
+\ProvidesFile{babel.def}[2021/06/02 3.60 Babel common definitions]
 \ifx\AtBeginDocument\@undefined  % TODO. change test.
     % == Code for plain ==
 \def\@empty{}
@@ -397,8 +398,8 @@
 \fi
 \countdef\last at language=19  % TODO. why? remove?
 \def\addlanguage{\csname newlanguage\endcsname}
-\def\bbl at version{3.59}
-\def\bbl at date{2021/05/16}
+\def\bbl at version{3.60}
+\def\bbl at date{2021/06/02}
 \def\adddialect#1#2{%
   \global\chardef#1#2\relax
   \bbl at usehooks{adddialect}{{#1}{#2}}%
@@ -618,7 +619,7 @@
   \bbl at iflanguage\languagename{%
      \expandafter\ifx\csname date\languagename\endcsname\relax
       \bbl at error
-        {Unknown language `\languagename'. Either you have\\%
+        {Unknown language '\languagename'. Either you have\\%
          misspelled its name, it has not been installed,\\%
          or you requested it in a previous run. Fix its name,\\%
          install it or just rerun the file, respectively. In\\%
@@ -771,7 +772,7 @@
   \bbl at iflanguage\languagename{%
     \expandafter\ifx\csname date\languagename\endcsname\relax
       \bbl at warning   % TODO - why a warning, not an error?
-        {Unknown language `#1'. Either you have\\%
+        {Unknown language '#1'. Either you have\\%
          misspelled its name, it has not been installed,\\%
          or you requested it in a previous run. Fix its name,\\%
          install it or just rerun the file, respectively. In\\%
@@ -904,7 +905,7 @@
     Reported}}
 \def\@nolanerr#1{%
   \bbl at error
-    {You haven't defined the language #1\space yet.\\%
+    {You haven't defined the language '#1' yet.\\%
      Perhaps you misspelled it or your installation\\%
      is not complete}%
     {Your command will be ignored, type <return> to proceed}}
@@ -911,7 +912,7 @@
 \def\@nopatterns#1{%
   \bbl at warning
     {No hyphenation patterns were preloaded for\\%
-     the language `#1' into the format.\\%
+     the language '#1' into the format.\\%
      Please, configure your TeX system to add them and\\%
      rebuild the format. Now I will use the patterns\\%
      preloaded for \bbl at nulllanguage\space instead}}
@@ -1583,7 +1584,7 @@
         turned off in the package options}}}
 \def\@notshorthand#1{%
   \bbl at error{%
-    The character `\string #1' should be made a shorthand character;\\%
+    The character '\string #1' should be made a shorthand character;\\%
     add the command \string\useshorthands\string{#1\string} to
     the preamble.\\%
     I will ignore your instruction}%
@@ -1596,7 +1597,7 @@
   \ifx#2\@nnil\else
     \bbl at ifunset{bbl at active@\string#2}%
       {\bbl at error
-         {I cannot switch `\string#2' on or off--not a shorthand}%
+         {I can't switch '\string#2' on or off--not a shorthand}%
          {This character is not a shorthand. Maybe you made\\%
           a typing mistake? I will ignore your instruction.}}%
       {\ifcase#1%   off, on, off*
@@ -2514,8 +2515,8 @@
   % For bidi texts, to switch the font based on direction
   \ifx\bbl at KVP@mapfont\@nil\else
     \bbl at ifsamestring{\bbl at KVP@mapfont}{direction}{}%
-      {\bbl at error{Option `\bbl at KVP@mapfont' unknown for\\%
-                  mapfont. Use `direction'.%
+      {\bbl at error{Option '\bbl at KVP@mapfont' unknown for\\%
+                  mapfont. Use 'direction'.%
                  {See the manual for details.}}}%
     \bbl at ifunset{bbl at lsys@\languagename}{\bbl at provide@lsys{\languagename}}{}%
     \bbl at ifunset{bbl at wdir@\languagename}{\bbl at provide@dirs{\languagename}}{}%

Modified: trunk/Master/texmf-dist/tex/generic/babel/babel.sty
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/babel.sty	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel.sty	2021-06-02 21:00:28 UTC (rev 59439)
@@ -26,6 +26,7 @@
 %% 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
@@ -33,7 +34,7 @@
 %%
 
 \NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{babel}[2021/05/16 3.59 The Babel package]
+\ProvidesPackage{babel}[2021/06/02 3.60 The Babel package]
 \@ifpackagewith{babel}{debug}
   {\providecommand\bbl at trace[1]{\message{^^J[ #1 ]}}%
    \let\bbl at debug\@firstofone
@@ -260,7 +261,7 @@
     Reported}}
 \def\@nolanerr#1{%
   \bbl at error
-    {You haven't defined the language #1\space yet.\\%
+    {You haven't defined the language '#1' yet.\\%
      Perhaps you misspelled it or your installation\\%
      is not complete}%
     {Your command will be ignored, type <return> to proceed}}
@@ -267,7 +268,7 @@
 \def\@nopatterns#1{%
   \bbl at warning
     {No hyphenation patterns were preloaded for\\%
-     the language `#1' into the format.\\%
+     the language '#1' into the format.\\%
      Please, configure your TeX system to add them and\\%
      rebuild the format. Now I will use the patterns\\%
      preloaded for \bbl at nulllanguage\space instead}}
@@ -391,10 +392,10 @@
     \bbl at csarg\edef{opt@#1}{#2}%
   \else
     \bbl at error
-     {Bad option `#1=#2'. Either you have misspelled the\\%
-      key or there is a previous setting of `#1'. Valid\\%
-      keys are, among others, `shorthands', `main', `bidi',\\%
-      `strings', `config', `headfoot', `safe', `math'.}%
+     {Bad option '#1=#2'. Either you have misspelled the\\%
+      key or there is a previous setting of '#1'. Valid\\%
+      keys are, among others, 'shorthands', 'main', 'bidi',\\%
+      'strings', 'config', 'headfoot', 'safe', 'math'.}%
      {See the manual for further details.}
   \fi}
 \let\bbl at language@opts\@empty
@@ -778,8 +779,8 @@
 \else
   \ifnum\bbl at bidimode>100 \ifnum\bbl at bidimode<200
     \bbl at error
-      {The bidi method `basic' is available only in\\%
-       luatex. I'll continue with `bidi=default', so\\%
+      {The bidi method 'basic' is available only in\\%
+       luatex. I'll continue with 'bidi=default', so\\%
        expect wrong results}%
       {See the manual for further details.}%
     \let\bbl at beforeforeign\leavevmode
@@ -892,16 +893,20 @@
   \def\bbl at dirparastext{\pardir\the\textdir\relax}%   %%%%
   % Sadly, we have to deal with boxes in math with basic.
   % Activated every math with the package option bidi=:
-  \def\bbl at mathboxdir{%
-    \ifcase\bbl at thetextdir\relax
-      \everyhbox{\textdir TLT\relax}%
-    \else
-      \everyhbox{\textdir TRT\relax}%
-    \fi}
-  \frozen at everymath\expandafter{%
-    \expandafter\bbl at mathboxdir\the\frozen at everymath}
-  \frozen at everydisplay\expandafter{%
-    \expandafter\bbl at mathboxdir\the\frozen at everydisplay}
+  \ifnum\bbl at bidimode>\z@
+    \def\bbl at mathboxdir{%
+      \ifcase\bbl at thetextdir\relax
+        \everyhbox{\bbl at mathboxdir@aux L}%
+      \else
+        \everyhbox{\bbl at mathboxdir@aux R}%
+       \fi}
+    \def\bbl at mathboxdir@aux#1{%
+      \@ifnextchar\egroup{}{\textdir T#1T\relax}}
+    \frozen at everymath\expandafter{%
+      \expandafter\bbl at mathboxdir\the\frozen at everymath}
+    \frozen at everydisplay\expandafter{%
+      \expandafter\bbl at mathboxdir\the\frozen at everydisplay}
+  \fi
 \else % pdftex=0, xetex=2
   \newcount\bbl at dirlevel
   \chardef\bbl at thetextdir\z@
@@ -1015,7 +1020,7 @@
      \expandafter\let\expandafter\BabelModifiers
         \csname bbl at mod@\CurrentOption\endcsname}%
     {\bbl at error{%
-       Unknown option `\CurrentOption'. Either you misspelled it\\%
+       Unknown option '\CurrentOption'. Either you misspelled it\\%
        or the language definition file \CurrentOption.ldf was not found}{%
        Valid options are, among others: shorthands=, KeepShorthandsActive,\\%
        activeacute, activegrave, noconfigs, safe=, main=, math=\\%
@@ -1048,7 +1053,7 @@
              * Local config file \bbl at opt@config.cfg used^^J%
              *}}%
     {\bbl at error{%
-       Local config file `\bbl at opt@config.cfg' not found}{%
+       Local config file '\bbl at opt@config.cfg' not found}{%
        Perhaps you misspelled it.}}%
 \fi
 \let\bbl at tempc\relax
@@ -1087,19 +1092,27 @@
 \let\bbl at tempb\@nnil
 \bbl at foreach\@classoptionslist{%
   \bbl at ifunset{ds@#1}%
-    {\IfFileExists{#1.ldf}{}%
-      {\IfFileExists{babel-#1.tex}{}{\@namedef{ds@#1}{}}}}%
-    {}%
-  \bbl at ifunset{ds@#1}%
-    {\def\bbl at tempb{#1}%
-     \DeclareOption{#1}{%
-       \ifnum\bbl at iniflag>\@ne
-         \bbl at ldfinit
-         \babelprovide[import]{#1}%
-         \bbl at afterldf{}%
-       \else
-         \bbl at load@language{#1}%
-       \fi}}%
+    {\IfFileExists{#1.ldf}%
+      {\def\bbl at tempb{#1}%
+       \DeclareOption{#1}{%
+         \ifnum\bbl at iniflag>\@ne
+           \bbl at ldfinit
+           \babelprovide[import]{#1}%
+           \bbl at afterldf{}%
+         \else
+           \bbl at load@language{#1}%
+         \fi}}%
+      {\IfFileExists{babel-#1.tex}% TODO. Copypaste pattern
+        {\def\bbl at tempb{#1}%
+         \DeclareOption{#1}{%
+           \ifnum\bbl at iniflag>\@ne
+             \bbl at ldfinit
+             \babelprovide[import]{#1}%
+             \bbl at afterldf{}%
+           \else
+             \bbl at load@language{#1}%
+           \fi}}%
+         {}}}%
     {}}
 \ifnum\bbl at iniflag=\z@\else
   \ifx\bbl at opt@main\@nnil
@@ -1130,10 +1143,10 @@
   \expandafter\bbl at tempa\bbl at loaded,\@nnil
   \ifx\bbl at tempb\bbl at tempc\else
     \bbl at warning{%
-      Last declared language option is `\bbl at tempc',\\%
-      but the last processed one was `\bbl at tempb'.\\%
-      The main language cannot be set as both a global\\%
-      and a package option. Use `main=\bbl at tempc' as\\%
+      Last declared language option is '\bbl at tempc',\\%
+      but the last processed one was '\bbl at tempb'.\\%
+      The main language can't be set as both a global\\%
+      and a package option. Use 'main=\bbl at tempc' as\\%
       option. Reported}%
   \fi
 \else

Modified: trunk/Master/texmf-dist/tex/generic/babel/blplain.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/blplain.tex	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/tex/generic/babel/blplain.tex	2021-06-02 21:00:28 UTC (rev 59439)
@@ -26,6 +26,7 @@
 %% 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

Modified: trunk/Master/texmf-dist/tex/generic/babel/bplain.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/bplain.tex	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/tex/generic/babel/bplain.tex	2021-06-02 21:00:28 UTC (rev 59439)
@@ -26,6 +26,7 @@
 %% 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

Modified: trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg	2021-06-02 21:00:28 UTC (rev 59439)
@@ -26,6 +26,7 @@
 %% 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
@@ -37,10 +38,10 @@
     \wlog{File: #1 #4 #3 <#2>}%
     \let\ProvidesFile\@undefined}
 \fi
-\ProvidesFile{hyphen.cfg}[2021/05/16 3.59 Babel hyphens]
+\ProvidesFile{hyphen.cfg}[2021/06/02 3.60 Babel hyphens]
 \xdef\bbl at format{\jobname}
-\def\bbl at version{3.59}
-\def\bbl at date{2021/05/16}
+\def\bbl at version{3.60}
+\def\bbl at date{2021/06/02}
 \ifx\AtBeginDocument\@undefined
   \def\@empty{}
   \let\orig at dump\dump

Modified: trunk/Master/texmf-dist/tex/generic/babel/locale/ar/babel-ar-DZ.ini
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/locale/ar/babel-ar-DZ.ini	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/tex/generic/babel/locale/ar/babel-ar-DZ.ini	2021-06-02 21:00:28 UTC (rev 59439)
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.7
-date = 2020-10-11
+version = 1.8
+date = 2021-05-31
 name.local = العربية
 name.english = Arabic
 name.babel = arabic-algeria arabic-dz
@@ -177,3 +177,10 @@
 [counters]
 abjad = ا ب ج د ه‍ و ز ح ط ي ك ل م ن س ع ف ص ق ر ش ت ث خ ذ ض ظ غ
 maghrebi.abjad = ا ب ج د ه‍ و ز ح ط ي ك ل م ن ص ع ف ض ق ر س ت ث خ ذ ظ غ ش
+
+[transforms.prehyphenation]
+kashida.plain.1.0 ={
+()[يئهشسقفغعضصنمكلظطخحجثتب]()[ًٍَُِّ]*[يئهشسقفغعضصنمكلظطخحجثتباأإآوؤذدزرة] }
+kashida.plain.1.1 = { kashida = 500 }
+kashida.plain.2.0 = { ()ل()[اأإآ] }
+kashida.plain.2.1 = { kashida = 0 }

Modified: trunk/Master/texmf-dist/tex/generic/babel/locale/ar/babel-ar-MA.ini
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/locale/ar/babel-ar-MA.ini	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/tex/generic/babel/locale/ar/babel-ar-MA.ini	2021-06-02 21:00:28 UTC (rev 59439)
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.7
-date = 2020-10-11
+version = 1.8
+date = 2021-05-31
 name.local = العربية
 name.english = Arabic
 name.babel = arabic-morocco arabic-ma
@@ -177,3 +177,10 @@
 [counters]
 abjad = ا ب ج د ه‍ و ز ح ط ي ك ل م ن س ع ف ص ق ر ش ت ث خ ذ ض ظ غ
 maghrebi.abjad = ا ب ج د ه‍ و ز ح ط ي ك ل م ن ص ع ف ض ق ر س ت ث خ ذ ظ غ ش
+
+[transforms.prehyphenation]
+kashida.plain.1.0 ={
+()[يئهشسقفغعضصنمكلظطخحجثتب]()[ًٍَُِّ]*[يئهشسقفغعضصنمكلظطخحجثتباأإآوؤذدزرة] }
+kashida.plain.1.1 = { kashida = 500 }
+kashida.plain.2.0 = { ()ل()[اأإآ] }
+kashida.plain.2.1 = { kashida = 0 }

Modified: trunk/Master/texmf-dist/tex/generic/babel/locale/ar/babel-ar-SY.ini
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/locale/ar/babel-ar-SY.ini	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/tex/generic/babel/locale/ar/babel-ar-SY.ini	2021-06-02 21:00:28 UTC (rev 59439)
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.7
-date = 2020-10-11
+version = 1.8
+date = 2021-05-31
 name.local = العربية
 name.english = Arabic
 name.babel = arabic-syria arabic-sy
@@ -177,3 +177,10 @@
 abjad = ا ب ج د ه‍ و ز ح ط ي ك ل م ن س ع ف ص ق ر ش ت ث خ ذ ض ظ غ
 maghrebi.abjad = ا ب ج د ه‍ و ز ح ط ي ك ل م ن ص ع ف ض ق ر س ت ث خ ذ ظ غ ش
 
+[transforms.prehyphenation]
+kashida.plain.1.0 ={
+()[يئهشسقفغعضصنمكلظطخحجثتب]()[ًٍَُِّ]*[يئهشسقفغعضصنمكلظطخحجثتباأإآوؤذدزرة] }
+kashida.plain.1.1 = { kashida = 500 }
+kashida.plain.2.0 = { ()ل()[اأإآ] }
+kashida.plain.2.1 = { kashida = 0 }
+

Modified: trunk/Master/texmf-dist/tex/generic/babel/locale/ar/babel-ar.ini
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/locale/ar/babel-ar.ini	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/tex/generic/babel/locale/ar/babel-ar.ini	2021-06-02 21:00:28 UTC (rev 59439)
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.10
-date = 2021-05-16
+version = 1.11
+date = 2021-05-31
 name.local = العربية
 name.english = Arabic
 name.babel = arabic
@@ -208,7 +208,8 @@
 transliteration.dad.8.0 = { ([{007C}AbtjHxdrzsSDTZ`RfqklmnhUIYaui+opCvgJe]) }
 transliteration.dad.8.1 =   { string = {1|{007C}AbtjHxdrzsSDTZ`RfqklmnhUIYaui+opCvgJe|ءابتجحخدرزسصضطظعغفقكلمنهوىيَُِّْپچڤگژۀ} }
 ; 
-kashida.plain.1.0 = { ()[يئهشسقفغعضصنمكلظطخحجثتب]()[يئهشسقفغعضصنمكلظطخحجثتباأإآوؤذدزرة] }
+kashida.plain.1.0 ={
+()[يئهشسقفغعضصنمكلظطخحجثتب]()[ًٍَُِّ]*[يئهشسقفغعضصنمكلظطخحجثتباأإآوؤذدزرة] }
 kashida.plain.1.1 = { kashida = 500 }
 kashida.plain.2.0 = { ()ل()[اأإآ] }
 kashida.plain.2.1 = { kashida = 0 }

Modified: trunk/Master/texmf-dist/tex/generic/babel/locale/eu/babel-eu.ini
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/locale/eu/babel-eu.ini	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/tex/generic/babel/locale/eu/babel-eu.ini	2021-06-02 21:00:28 UTC (rev 59439)
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.2
-date = 2020-06-30
+version = 1.3
+date = 2021-05-31
 name.local = euskara
 name.english = Basque
 name.babel = basque
@@ -33,13 +33,17 @@
 ref = Erreferentziak
 abstract = Laburpena
 bib = Bibliografia
+chapter.template = [chapter].[ ][[chapter]]
 chapter = Kapitulua
 appendix = Eranskina
+appendix.template = [chapter].[ ][[appendix]]
 contents = Gaien Aurkibidea
 listfigure = Irudien Zerrenda
 listtable = Taulen Zerrenda
 index = Kontzeptuen Aurkibidea
+figure.template = [figure].[ ][[figure]]
 figure = Irudia
+table.template = [table].[ ][[table]]
 table = Taula
 part = Atala
 encl = Erantsia

Modified: trunk/Master/texmf-dist/tex/generic/babel/luababel.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/luababel.def	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/tex/generic/babel/luababel.def	2021-06-02 21:00:28 UTC (rev 59439)
@@ -26,6 +26,7 @@
 %% 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
@@ -621,9 +622,23 @@
 
 function Babel.arabic.justify(head)
   if not Babel.arabic.justify_enabled then return head end
+  for line in node.traverse_id(node.id'hlist', head) do
+    Babel.arabic.justify_hlist(head, line)
+  end
+  return head
+end
+
+function Babel.arabic.justify_hbox(head, gc, size, pack)
+  if Babel.arabic.justify_enabled and pack == 'exactly' then
+    Babel.arabic.justify_hlist(head, nil, gc, size, pack)
+  end
+  return head
+end
+
+function Babel.arabic.justify_hlist(head, line, gc, size, pack)
   local d, new
   local k_list, k_item, pos_inline
-  local width, width_new, full, k_curr, wt_pos, goal
+  local width, width_new, full, k_curr, wt_pos, goal, shift
   local subst_done = false
   local elong_map = Babel.arabic.elong_map
   local last_line
@@ -631,102 +646,110 @@
   local KASHIDA = luatexbase.registernumber'bblar at kashida'
   local LOCALE = luatexbase.registernumber'bbl at attr@locale'
 
-  for line in node.traverse_id(node.id'hlist', head) do
-    % Exclude last line. todo. But-- it discards one-word lines, too!
-    % ? Look for glue = 12:15
-    if (line.glue_sign == 1 and line.glue_order == 0) then
-      elongs = {}     % Stores elongated candidates of each line
-      k_list = {}     % And all letters with kashida
-      pos_inline = 0  % Not yet used
+  if line == nil then
+    line = {}
+    line.glue_sign = 1
+    line.glue_order = 0
+    line.head = head
+    line.shift = 0
+    line.width = size
+  end
 
-      for n in node.traverse_id(GLYPH, line.head) do
-        pos_inline = pos_inline + 1 % To find where it is. Not used.
+  % Exclude last line. todo. But-- it discards one-word lines, too!
+  % ? Look for glue = 12:15
+  if (line.glue_sign == 1 and line.glue_order == 0) then
+    elongs = {}     % Stores elongated candidates of each line
+    k_list = {}     % And all letters with kashida
+    pos_inline = 0  % Not yet used
 
-        % Elongated glyphs
-        if elong_map then
-          local locale = node.get_attribute(n, LOCALE)
-          if elong_map[locale] and elong_map[locale][n.font] and
-              elong_map[locale][n.font][n.char] then
-            table.insert(elongs, {node = n, locale = locale} )
-            node.set_attribute(n.prev, KASHIDA, 0)
-          end
+    for n in node.traverse_id(GLYPH, line.head) do
+      pos_inline = pos_inline + 1 % To find where it is. Not used.
+
+      % Elongated glyphs
+      if elong_map then
+        local locale = node.get_attribute(n, LOCALE)
+        if elong_map[locale] and elong_map[locale][n.font] and
+            elong_map[locale][n.font][n.char] then
+          table.insert(elongs, {node = n, locale = locale} )
+          node.set_attribute(n.prev, KASHIDA, 0)
         end
+      end
 
-        % Tatwil
-        if Babel.kashida_wts then
-          local k_wt = node.get_attribute(n, KASHIDA)
-          if k_wt > 0 then % todo. parameter for multi inserts
-            table.insert(k_list, {node = n, weight = k_wt, pos = pos_inline})
-          end
+      % Tatwil
+      if Babel.kashida_wts then
+        local k_wt = node.get_attribute(n, KASHIDA)
+        if k_wt > 0 then % todo. parameter for multi inserts
+          table.insert(k_list, {node = n, weight = k_wt, pos = pos_inline})
         end
+      end
 
-      end % of node.traverse_id
+    end % of node.traverse_id
 
-      if #elongs == 0 and #k_list == 0 then goto next_line end
+    if #elongs == 0 and #k_list == 0 then goto next_line end
+    full  = line.width
+    shift = line.shift
+    goal  = full * Babel.arabic.justify_factor % A bit crude
+    width = node.dimensions(line.head)    % The 'natural' width
 
-      full = line.width
-      goal = full * Babel.arabic.justify_factor % A bit crude
-      width = node.dimensions(line.head)    % The 'natural' width
-
-      % == Elongated ==
-      % Original idea taken from 'chikenize'
-      while (#elongs > 0 and width < goal) do
-        subst_done = true
-        local x = #elongs
-        local curr = elongs[x].node
-        local oldchar = curr.char
-        curr.char = elong_map[elongs[x].locale][curr.font][curr.char]
-        width = node.dimensions(line.head)  % Check if the line is too wide
-        % Substitute back if the line would be too wide and break:
-        if width > goal then
-          curr.char = oldchar
-          break
-        end
-        % If continue, pop the just substituted node from the list:
-        table.remove(elongs, x)
+    % == Elongated ==
+    % Original idea taken from 'chikenize'
+    while (#elongs > 0 and width < goal) do
+      subst_done = true
+      local x = #elongs
+      local curr = elongs[x].node
+      local oldchar = curr.char
+      curr.char = elong_map[elongs[x].locale][curr.font][curr.char]
+      width = node.dimensions(line.head)  % Check if the line is too wide
+      % Substitute back if the line would be too wide and break:
+      if width > goal then
+        curr.char = oldchar
+        break
       end
+      % If continue, pop the just substituted node from the list:
+      table.remove(elongs, x)
+    end
 
-      % == Tatwil ==
-      if #k_list == 0 then goto next_line end
+    % == Tatwil ==
+    if #k_list == 0 then goto next_line end
 
-      width = node.dimensions(line.head)    % The 'natural' width
-      k_curr = #k_list
-      wt_pos = 1
+    width = node.dimensions(line.head)    % The 'natural' width
+    k_curr = #k_list
+    wt_pos = 1
 
-      while width < goal do
-        subst_done = true
-        k_item = k_list[k_curr].node
-        if k_list[k_curr].weight == Babel.kashida_wts[wt_pos] then
-          d = node.copy(k_item)
-          d.char = 0x0640
-          line.head, new = node.insert_after(line.head, k_item, d)
-          width_new = node.dimensions(line.head)
-          if width > goal or width == width_new then
-            node.remove(line.head, new) % Better compute before
-            break
-          end
-          width = width_new
+    while width < goal do
+      subst_done = true
+      k_item = k_list[k_curr].node
+      if k_list[k_curr].weight == Babel.kashida_wts[wt_pos] then
+        d = node.copy(k_item)
+        d.char = 0x0640
+        line.head, new = node.insert_after(line.head, k_item, d)
+        width_new = node.dimensions(line.head)
+        if width > goal or width == width_new then
+          node.remove(line.head, new) % Better compute before
+          break
         end
-        if k_curr == 1 then
-          k_curr = #k_list
-          wt_pos = (wt_pos >= table.getn(Babel.kashida_wts)) and 1 or wt_pos+1
-        else
-          k_curr = k_curr - 1
-        end
+        width = width_new
       end
+      if k_curr == 1 then
+        k_curr = #k_list
+        wt_pos = (wt_pos >= table.getn(Babel.kashida_wts)) and 1 or wt_pos+1
+      else
+        k_curr = k_curr - 1
+      end
+    end
 
-      ::next_line::
+    ::next_line::
 
-      % Must take into account marks and ins, see luatex manual.
-      % Have to be executed only if there are changes. Investigate
-      % what's going on exactly.
-      if subst_done then
-        node.insert_before(head, line, node.hpack(line.head, full, 'exactly'))
-        node.remove(head, line)
-      end
-    end % if process line
-  end % for lines
-  return head
+    % Must take into account marks and ins, see luatex manual.
+    % Have to be executed only if there are changes. Investigate
+    % what's going on exactly.
+    if subst_done and not gc then
+      d = node.hpack(line.head, full, 'exactly')
+      d.shift = shift
+      node.insert_before(head, line, d)
+      node.remove(head, line)
+    end
+  end % if process line
 end
 }
 \endgroup

Modified: trunk/Master/texmf-dist/tex/generic/babel/nil.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/nil.ldf	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/tex/generic/babel/nil.ldf	2021-06-02 21:00:28 UTC (rev 59439)
@@ -26,6 +26,7 @@
 %% 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
@@ -32,7 +33,7 @@
 %% extension |.ins|) which are part of the distribution.
 %%
 
-\ProvidesLanguage{nil}[2021/05/16 3.59 Nil language]
+\ProvidesLanguage{nil}[2021/06/02 3.60 Nil language]
 \LdfInit{nil}{datenil}
 \ifx\l at nil\@undefined
   \newlanguage\l at nil

Modified: trunk/Master/texmf-dist/tex/generic/babel/plain.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/plain.def	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/tex/generic/babel/plain.def	2021-06-02 21:00:28 UTC (rev 59439)
@@ -26,6 +26,7 @@
 %% 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

Modified: trunk/Master/texmf-dist/tex/generic/babel/switch.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/switch.def	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/tex/generic/babel/switch.def	2021-06-02 21:00:28 UTC (rev 59439)
@@ -26,6 +26,7 @@
 %% 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

Modified: trunk/Master/texmf-dist/tex/generic/babel/txtbabel.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/txtbabel.def	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/tex/generic/babel/txtbabel.def	2021-06-02 21:00:28 UTC (rev 59439)
@@ -26,6 +26,7 @@
 %% 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

Modified: trunk/Master/texmf-dist/tex/generic/babel/xebabel.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/xebabel.def	2021-06-02 20:59:18 UTC (rev 59438)
+++ trunk/Master/texmf-dist/tex/generic/babel/xebabel.def	2021-06-02 21:00:28 UTC (rev 59439)
@@ -26,6 +26,7 @@
 %% 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



More information about the tex-live-commits mailing list.