[latex3-commits] [git/LaTeX3-latex3-babel] master: Preliminary code for \babelprehyphenation. (ec019d7)

Javier email at dante.de
Mon May 11 17:21:31 CEST 2020


Repository : https://github.com/latex3/babel
On branch  : master
Link       : https://github.com/latex3/babel/commit/ec019d70a3d53f6403bb37ef2bdc491117acd61c

>---------------------------------------------------------------

commit ec019d70a3d53f6403bb37ef2bdc491117acd61c
Author: Javier <email at localhost>
Date:   Mon May 11 17:21:31 2020 +0200

    Preliminary code for \babelprehyphenation.


>---------------------------------------------------------------

ec019d70a3d53f6403bb37ef2bdc491117acd61c
 README.md                          |   3 +-
 babel.dtx                          | 195 ++++++++-
 babel.ins                          |   2 +-
 babel.pdf                          | Bin 776272 -> 782253 bytes
 bbcompat.dtx                       |   2 +-
 changes-old.txt                    | 791 +++++++++++++++++++++++++++++++++++++
 samples/images/polytonic-greek.jpg | Bin 0 -> 180952 bytes
 7 files changed, 981 insertions(+), 12 deletions(-)

diff --git a/README.md b/README.md
index cf95bab..77398c3 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.43.2002
+## Babel 3.43.2004
 
 This package manages culturally-determined typographical (and other)
 rules, and hyphenation patterns for a wide range of languages.  Many
@@ -53,6 +53,7 @@ respective authors.
        - Improvements in French, Portuguese
        - Optional argument in \foreignlanguage and otherlanguage*,
          to switch date and/or captions.
+       - Preliminary code for \babelprehyphenation.
        
 3.43   2020-04-28
        - Autoloading based on the BCP47 codes, with basic lookup.
diff --git a/babel.dtx b/babel.dtx
index ece1b0b..b416992 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -31,7 +31,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2020/05/09 v3.43.2002 The Babel package]
+\ProvidesFile{babel.dtx}[2020/05/11 v3.43.2004 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -4567,8 +4567,8 @@ help from Bernd Raichle, for which I am grateful.
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=3.43.2002>>
-%<<date=2020/05/09>>
+%<<version=3.43.2004>>
+%<<date=2020/05/11>>
 %    \end{macrocode}
 %
 % \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -12390,6 +12390,7 @@ help from Bernd Raichle, for which I am grateful.
 \endgroup
 \ifx\newattribute\@undefined\else
   \newattribute\bbl at attr@locale
+  \directlua{ Babel.attr_locale = luatexbase.registernumber'bbl at attr@locale'}
   \AddBabelHook{luatex}{beforeextras}{%
     \setattribute\bbl at attr@locale\localeid}
 \fi
@@ -12926,7 +12927,8 @@ end
 \catcode`\%=12
 \catcode`\&=14
 \directlua{
-  Babel.linebreaking.replacements = {}
+  Babel.linebreaking.post_replacements = {}
+  Babel.linebreaking.pre_replacements = {}
 
   function Babel.str_to_nodes(fn, matches, base)
     local n, head, last    
@@ -12984,7 +12986,7 @@ end
 
   function Babel.post_hyphenate_replace(head)
     local u = unicode.utf8
-    local lbkr = Babel.linebreaking.replacements
+    local lbkr = Babel.linebreaking.post_replacements
     local word_head = head
 
     while true do
@@ -13090,6 +13092,147 @@ end
     return head
   end
   
+  &%%%
+  &% Preliminary code for \babelprehyphenation
+  &% TODO. Copypaste pattern. Merge with fetch_word
+  function Babel.fetch_subtext(head, funct)
+    local word_string = ''
+    local word_nodes = {}
+    local lang
+    local item = head
+
+    while item do
+
+      if item.id == 29 then     
+        local locale = node.get_attribute(item, Babel.attr_locale)
+
+        if not(item.char == 124) &% ie, not | = space
+            and (locale == lang or lang == nil) then
+          lang = lang or locale
+          word_string = word_string .. unicode.utf8.char(item.char)
+          word_nodes[#word_nodes+1] = item
+        end
+
+        if item == node.tail(head) then 
+          item = nil
+          return word_string, word_nodes, item, lang
+        end
+
+      elseif item.id == 12 and item.subtype == 13 then
+        word_string = word_string .. '|'       
+        word_nodes[#word_nodes+1] = item
+
+        if item == node.tail(head) then 
+          item = nil
+          return word_string, word_nodes, item, lang
+        end
+
+      elseif word_string == '' then
+        &% pass
+
+      else
+        return word_string, word_nodes, item, lang
+      end
+
+      item = item.next
+    end
+  end
+  
+  &% TODO. Copypaste pattern. Merge with pre_hyphenate_replace
+  function Babel.pre_hyphenate_replace(head)
+    local u = unicode.utf8
+    local lbkr = Babel.linebreaking.pre_replacements
+    local word_head = head
+
+    while true do
+      local w, wn, nw, lang = Babel.fetch_subtext(word_head)
+      if not lang then return head end
+
+      if not lbkr[lang] then
+        break
+      end
+
+      for k=1, #lbkr[lang] do
+        local p = lbkr[lang][k].pattern 
+        local r = lbkr[lang][k].replace
+
+        while true do
+          local matches = { u.match(w, p) }
+          if #matches < 2 then break end
+
+          local first = table.remove(matches, 1)
+          local last =  table.remove(matches, #matches)
+
+          &% Fix offsets, from bytes to unicode.
+          first = u.len(w:sub(1, first-1)) + 1
+          last  = u.len(w:sub(1, last-1))
+
+          local new  &% used when inserting and removing nodes
+          local changed = 0
+
+          &% This loop traverses the replace list and takes the
+          &% corresponding actions
+          for q = first, last do   
+            local crep = r[q-first+1]
+            local char_node = wn[q]
+            local char_base = char_node
+
+            if crep and crep.data then
+              char_base = wn[crep.data+first-1]
+            end
+
+            if crep == {} then
+              break
+            elseif crep == nil then
+              changed = changed + 1
+              node.remove(head, char_node)
+            elseif crep and crep.string then
+              changed = changed + 1
+              local str = crep.string(matches)
+              if str == '' then 
+                if q == 1 then
+                  word_head = char_node.next
+                end
+                head, new = node.remove(head, char_node)
+              elseif char_node.id == 29 and u.len(str) == 1 then
+                char_node.char = string.utfvalue(str)
+              else
+                local n
+                for s in string.utfvalues(str) do
+                  if char_node.id == 7 then
+                    log('Automatic hyphens cannot be replaced, just removed.')
+                  else
+                    n = node.copy(char_base)
+                  end
+                  n.char = s
+                  if q == 1 then
+                    head, new = node.insert_before(head, char_node, n)   
+                    word_head = new
+                  else 
+                    node.insert_before(head, char_node, n)   
+                  end
+                end
+
+                node.remove(head, char_node)
+              end  &% string length
+            end  &% if char and char.string
+          end  &% for char in match
+          if changed > 20 then
+            texio.write('Too many changes. Ignoring the rest.')
+          elseif changed > 0 then
+            &% For one-to-one can we modifiy directly the
+            &% values without re-fetching? Very likely.
+            w, wn, nw = Babel.fetch_subtext(word_head)   
+          end
+
+        end  &% for match
+      end  &% for patterns
+      word_head = nw
+    end  &% for words
+    return head
+  end
+  &%%% en of preliminary code for \babelprehyphenation
+
   &% The following functions belong to the next macro
 
   &% This table stores capture maps, numbered consecutively
@@ -13123,7 +13266,6 @@ end
     return "]]..Babel.capt_map(m[" .. capno .. "]," ..
            (mlen) .. ").." .. "[["
   end
-
 }
 %    \end{macrocode}
 %
@@ -13160,7 +13302,7 @@ end
            tex.print([[\string\babeltempa{{]] .. rep .. [[}}]])
          }}}&%
     \directlua{
-      local lbkr = Babel.linebreaking.replacements
+      local lbkr = Babel.linebreaking.post_replacements
       local u = unicode.utf8
       &% Convert pattern:
       local patt = string.gsub([[#2]], '%s', '')
@@ -13176,18 +13318,53 @@ end
                    { pattern = patt, replace = { \babeltempb } })
     }&%
   \endgroup}
+% TODO. Working !!! Copypaste pattern. 
+\gdef\babelprehyphenation#1#2#3{&%
+  \bbl at activateprehyphen
+  \begingroup
+    \def\babeltempa{\bbl at add@list\babeltempb}&%
+    \let\babeltempb\@empty
+    \bbl at foreach{#3}{&%
+      \bbl at ifsamestring{##1}{remove}&%
+        {\bbl at add@list\babeltempb{nil}}&%
+        {\directlua{
+           local rep = [[##1]]
+           rep = rep:gsub('(string)%s*=%s*([^%s,]*)', Babel.capture_func)
+           tex.print([[\string\babeltempa{{]] .. rep .. [[}}]])
+         }}}&%
+    \directlua{
+      local lbkr = Babel.linebreaking.pre_replacements
+      local u = unicode.utf8
+      &% Convert pattern:
+      local patt = string.gsub([[#2]], '%s', '')
+      if not u.find(patt, '()', nil, true) then
+        patt = '()' .. patt .. '()'
+      end
+      patt = u.gsub(patt, '{(.)}', 
+                function (n)
+                  return '%' .. (tonumber(n) and (tonumber(n)+1) or n)
+                end)
+      lbkr[\the\csname bbl at id@@#1\endcsname] = lbkr[\the\csname  bbl at id@@#1\endcsname] or {}
+      table.insert(lbkr[\the\csname bbl at id@@#1\endcsname],
+                   { pattern = patt, replace = { \babeltempb } })
+    }&%
+  \endgroup}
 \endgroup
 \def\bbl at activateposthyphen{%
   \let\bbl at activateposthyphen\relax
   \directlua{
     Babel.linebreaking.add_after(Babel.post_hyphenate_replace)
   }}
+% TODO. Working !!! 
+\def\bbl at activateprehyphen{%
+  \let\bbl at activateprehyphen\relax
+  \directlua{
+    Babel.linebreaking.add_before(Babel.pre_hyphenate_replace)
+  }}
 %    \end{macrocode}
 %
 % \subsection{Layout}
 %
-% \textbf{Work in progress}.
-%
 % Unlike \xetex{}, \luatex{} requires only minimal changes for
 % right-to-left layouts, particularly in monolingual documents (the
 % engine itself reverses boxes -- including column order or headings
diff --git a/babel.ins b/babel.ins
index 2d847e8..880065f 100644
--- a/babel.ins
+++ b/babel.ins
@@ -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{2020/05/09}
+\def\filedate{2020/05/11}
 \def\batchfile{babel.ins}
 \input docstrip.tex
 
diff --git a/babel.pdf b/babel.pdf
index a2431b5..325176e 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 828aa8c..a1a7888 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
 %
 % \iffalse
 %<*dtx>
-\ProvidesFile{bbcompat.dtx}[2020/05/09 v3.43.2002]
+\ProvidesFile{bbcompat.dtx}[2020/05/11 v3.43.2004]
 %</dtx>
 %
 %% File 'bbcompat.dtx'
diff --git a/changes-old.txt b/changes-old.txt
new file mode 100644
index 0000000..23471e9
--- /dev/null
+++ b/changes-old.txt
@@ -0,0 +1,791 @@
+* babel~3.9c (2013/04/04)
+Added the ``modifiers'' mechanism
+
+* babel~3.9g (2013/06/01)
+bbplain merged
+
+* babel~3.9k (2014/03/23)
+Code and doc reorganized, and some minor enhancements
+
+* babel~3.9t (2017/04/22)
+Added new helper macros. Not all are currently used, but will be in 3.10 -- \cs {bbl at trim}, \cs {bbl at ifunset}, \cs {bbl at exp}, \cs {bbl at stripslash}
+
+* babel~3.9i (2014/02/16)
+\cs {@for} didn't work with Plain. Added \cs {bbl at loop}
+
+* babel~3.15 (2017/10/30)
+New convenience macros \cs {bbl at xin@} and \cs {bbl at cs}
+
+* babel~3.9t (2017/04/22)
+Use \cs {bbl at ifunset} instead of \cs {@ifundefined}.
+
+* babel~3.9t (2017/04/22)
+Redefined to avoid infinite loops if the macro is \cs {relax}.
+
+* babel~3.35 (2019/09/22)
+Inside a group, so that \cs {ifcsname} is still undefined.
+
+* babel~3.34 (2019/07/23)
+Take into account prefixes like \cs {long} and macros with trailing spaces. Don't touch original if not necessary.
+
+* babel~3.9a (2012/12/21)
+Use \cs {orig at dump} as flag instead of \cs {adddialect}
+
+* babel~3.9a (2012/08/11)
+Now switch.def is loaded always, so that there is no need to rebuild formats just to update babel
+
+* babel~3.9a (2012/12/13)
+But switch.def is loaded only if loaded in a different version (or not loaded)
+
+* babel~3.9a (2013/01/14)
+Added the debug option
+
+* babel~3.9a (2013/02/05)
+Added \cs {bbl at add}
+
+* babel~3.9a (2012/10/05)
+preset option started, party stolen from fontenc
+
+* babel~3.9a (2012/10/17)
+Hooks started
+
+* babel~3.9a (2013/02/07)
+Rejected preset, and replaced by base
+
+* babel~3.9q (2016/02/11)
+Load patterns with option base. To be improved. Moved showlanguages before base
+
+* babel~3.18 (2018/02/14)
+Fix - prevent doble input of switch.def
+
+* babel~3.19 (2018/04/23)
+Split callback - vertical and horizontal
+
+* babel~3.19 (2018/04/23)
+Added bidi=basic, here and passim
+
+* babel~3.30 (2019/04/22)
+Callbacks aren't specific to bidi any more, so they are moved.
+
+* babel~3.9e (2013/04/15)
+Bug fixed - a dot was added in key=value pairs
+
+* babel~3.9a (2012/08/14)
+Implemented the \texttt {noconfigs} option
+
+* babel~3.9a (2012/09/26)
+Implemented the \texttt {showlanguages} option
+
+* babel~3.9g (2013/08/07)
+Options for hyphenmap
+
+* babel~3.9l (2014/07/29)
+Option \texttt {silent}
+
+* babel~3.9a (2012/08/10)
+Added the `safe' key, including code below for selecting the redefined macros
+
+* babel~3.9c (2013/04/07)
+Added t and c for tilde and comma
+
+* babel~3.9a (2012/07/30)
+Code setting language in head/foots. Related to babel/3796
+
+* babel~3.16 (2018/01/02)
+Added the basic layout stuff and the macro \cs {IfBabelLayout}
+
+* babel~3.9a (2012/06/15)
+Rewritten the loading mechanism, so that languages not declared are also correctly recognized, even if given as global options
+
+* babel~3.9a (2012/08/12)
+Revised the loading mechanism
+
+* babel~3.9i (2014/03/01)
+Removed German options, because they are now loaded directly
+
+* babel~3.9t (2017/04/23)
+Removed options for English, Indonesian and Malay, now handled with proxy files
+
+* babel~3.13 (2017/08/24)
+Removed options for French, too. ldf files now takes priority if exist, except Hebrew (to do)
+
+* babel~3.9a (2012/06/28)
+Added the \cs {AfterBabelLanguage} mechanism, to be used mainly with the local cfg file.
+
+* babel~3.9a (2012/06/31)
+Now you can set the name of the local cfg file.
+
+* babel~3.9a (2012/12/22)
+Default option does nothing
+
+* babel~3.9a (2012/06/24)
+Now babel is not loaded to prevent the document from raising errors after fixing it
+
+* babel~3.21 (2018/05/09)
+Requesting a language is no required any more, in case you only need \cs {babelprovide}.
+
+* babel~3.9a (2013/01/11)
+Added \cs {bbl at for} for loops ignoring empties
+
+* babel~3.9c (2013/04/06)
+Normalize \cs {bbl at afterlang} to relax
+
+* babel~3.9i (2014/03/10)
+Make sure \cs {bbl at language@opts} is defined.
+
+* babel~3.9i (2014/03/11)
+Define \cs {l@} values from \cs {lang@} values set in Plain etex/xetex/luatex
+
+* babel~3.9k (2014/03/24)
+Added definition for \cs {uselanguage}
+
+* babel~3.9n (2015/12/21)
+Define a few macros for 2.09
+
+* babel~3.9p (2016/02/05)
+Added a test for lua(e)tex.
+
+* babel~3.9q (2016/02/12)
+Load lua patterns if not lualatex.
+
+* babel~3.9a (2012/08/10)
+Removed the \cs {peek at token} and \textsc {test at token} stuff
+
+* babel~3.9a (1999/04/30)
+Added \cs {bbl at withactive}
+
+* babel~3.33 (2019/07/16)
+Optional argument for languages.
+
+* babel~3.9i (2014/02/14)
+Macro \cs {babelensure} added
+
+* babel~3.9k (2014/03/23)
+Encapsulate \cs {foreignlanguage} in \cs {bbl at ensure@}language, to "protect" strings
+
+* babel~3.9s (2017/04/10)
+Bug fix - extra spaces because a missing percent
+
+* babel~3.9s (2017/04/10)
+\cs {bbl at ensure@lang} defined only once
+
+* babel~3.10 (2017/05/06)
+\cs {bbl at ensured} renamed to \cs {bbl at captionslist} (for \cs {babelprovide}), which means \cs {today} must be given explicitly in \cs {babelensure}
+
+* babel~3.9a (2012/08/11)
+\cs {ldf at quit} is not delayed any more after \cs {fi} , since \cs {endinput} is not executed immediately
+
+* babel~3.9g (2012/08/11)
+Preset the ``family'' of macros \cs {Babel}...
+
+* babel~3.9a (2012/10/01)
+Added \cs {bbl at afterlang} which executes the code delayed with \cs {AfterBabelLanguage}
+
+* babel~3.34 (2019/09/20)
+New hook beforestart.
+
+* babel~3.10 (2017/05/14)
+Refactored. Add to \cs {nfss at catcodes} too.
+
+* babel~3.9a (2012/08/18)
+New macro, with code from \cs {@initiate at active@char}
+
+* babel~3.9a (2012/08/18)
+Removed an extra hash. Now calls \cs {@initiate at active@char} with 3 arguments.
+
+* babel~3.9e (2012/08/18)
+Introduced the 3-argument \cs {@initiate at active@char}, with different catcodes: active, string'ed, and original. Reorganized
+
+* babel~3.9a (2012/08/19)
+The catcode is saved
+
+* babel~3.9a (2012/09/09)
+The original definition is saved, too
+
+* babel~3.9a (2012/12/27)
+Take into account mathematically active chars, to avoid infinite loops
+
+* babel~3.34 (2019/09/23)
+Math active in lua has a different value
+
+* babel~3.9a (2012/12/27)
+Added code for option math=normal
+
+* babel~3.9i (2014/02/03)
+Don't call directly \cs {user at active}, but with an intermediate step
+
+* babel~3.9a (2012/12/27)
+Shorthands are not defined directly, but with a couple of intermediate macros
+
+* babel~3.9a (2012/08/18)
+Instead of the ``copy-paste pattern'' a new macro is used
+
+* babel~3.9a[[2012/8/18[[Use \cs {user at group}, as above, instead of the hardwired \texttt {user}
+
+* babel~3.9a (2012/09/11)
+The output routine resets the quote to \cs {active at math@prime}, so we redefine the latter with the new ``normal'' value
+
+* babel~3.9a (2012/06/20)
+Added a couple of missing comment characters (PR 4146)
+
+* babel~3.9a (2012/07/29)
+Use \cs {textormath} instead of \cs {ifmath}
+
+* babel~3.9a (2012/11/26)
+Compare the char, irrespective of its catcode.
+
+* babel~3.9a (2012/12/27)
+Removed the redeclaration of \cs {normal at char'} because it is handled in a generic way above
+
+* babel~3.9a (2012/12/29)
+Removed the intermediate step of \cs {bbl at act@caret} and moved above
+
+* babel~3.9i (2012/12/29)
+Added the event \cs {initiateactive}
+
+* babel~3.9a (2012/07/04)
+Catcodes are also restored after each language, to prevent incompatibilities. Use \cs {string} instead of \cs {noexpand} and add \cs {relax}
+
+* babel~3.9a (2012/10/18)
+Catcodes are deactivated in a separate macro, which is made no-op when babel exits
+
+* babel~3.9a (2012/08/18)
+Removed \cs {string}s, because the char are already string'ed
+
+* babel 3.35 (2019/09/18)
+Added \cs {ifincsname} test.
+
+* babel~3.9a (2013/01/11)
+\cs {bbl at withactive} makes sure the catcode is active
+
+* babel~3.9a (2012/07/03)
+Check if shorthands are redefined
+
+* babel~3.9a (2012/12/29)
+Failed if an argument had a condicional. Use the more robust mechanism of \cs {XXXoftwo}
+
+* babel~3.9a (2012/08/05)
+Now \cs {bbl at activate} makes sure the catcode is active, so this part is simplified
+
+* babel~3.9a (2012/08/12)
+User shorhands can be defined even with shorthands=off
+
+* babel~3.9a (2012/08/05)
+Added optional argument, to provide a way to (re)define language shorthands
+
+* babel~3.9a (2012/08/25)
+Extended for language-dependent user macros, with two new auxiliary macros
+
+* babel~3.9a (2012/08/06)
+Instead of letting the new shorthand to the original char, which very often didn't work, we define it directly
+
+* babel~3.9a (2012/08/20)
+Make sure both characters (old an new) are active
+
+* babel~3.9a (2013/02/21)
+Code revised
+
+* babel~3.9a (2012/06/16)
+Added code
+
+* babel~3.23 (2018/08/26)
+Added \cs {ifbabelshorthand}
+
+* babel~3.9a (2012/12/27)
+Removed redundant system declarations
+
+* babel~3.9a (2012/07/29)
+\cs {bbl at pr@m at s} rewritten to take into account catcodes for both the quote and the hat
+
+* babel~3.9i (2014/02/06)
+Moved from above, after \cs {bbl at usehook} has been defined
+
+* babel~3.9k (2014/02/06)
+Moved again at the original place
+
+* babel~3.9a (2012/09/07)
+Use \cs {@expandtwoargs} with \cs {in@}
+
+* babel~3.9i (2014/02/21)
+Macro \cs {babeltags} added}{101} }
+
+* babel~3.9a (2012/08/28)
+Macro added}{101} }
+
+* babel-3.9a (2012/07/28)
+Replaced many \cs {allowhyphens} by \cs {bbl at allowhyphen}. They were either no-op or executed always.}{102} }
+
+* babel-3.9i (2014/01/29)
+\cs {bbl at allowhyphens} must be ignored at the beginning of a paragraph or table cell.}{102} }
+
+* babel-3.9t (2017/04/26)
+Fixed misplaced \cs {nobreak} - sx366454 - soft hyphens could vanish.}{102} }
+
+* babel-3.9a (2012/08/27)
+Added \cs {babelhyphen} and related macros}{102} }
+
+* babel~3.9a (2012/09/05)
+Added tentative code for string declarations}{103} }
+
+* babel~3.9a (2012/12/24)
+Added hooks}{103} }
+
+* babel~3.9l (2014/07/29)
+Now tries to catch the parsing macro. Removed some redundant code. Option nocase.}{104} }
+
+* babel~3.9g (2013/07/29)
+Added starred variant. A bit of clean up. Removed \cs {UseString}, which didn't work.}{105} }
+
+* babel~3.9g (2013/08/01)
+Now several languages can be processed with \cs {BabelLanguages}, if set in the ldf.}{105} }
+
+* babel~3.9g (2013/08/04)
+Use \cs {ProvideTextCommand}, which does with encoded strings what the manual says.}{105} }
+
+* babel~3.9h (2013/11/08)
+Tidied up code related to \cs {bbl at scswitch}}{105} }
+
+* babel~3.9g (2013/07/29)
+Added \cs {bbl at forlang} to ignore in the preamble unknown languages, as described in the doc.}{107} }
+
+* babel~3.9i (2014/03/13)
+Added code to expand captions in case transformations.}{108} }
+
+* babel~3.9h (2013/10/16)
+Tidied up and bug fixed - first element expanded prematurely.}{108} }
+
+* babel~3.9h (2013/11/08)
+Use \cs {bbl at encstrings} - they should be defined always, even if no `strings'}{108} }
+
+* babel~3.9t (2017/04/28)
+Renamed \cs {bbl at hymapopt} to \cs {bbl at opt@hyphenmap} for consistency}{109} }
+
+* babel~3.9a (2012/07/28)
+Removed the first \cs {allowhyphens}. Moved the second one just after the kern.}{111} }
+
+* babel~3.16 (2018/01/02)
+Adapted to TU and refactored - redundant code.}{112} }
+
+* babel~3.9a[[2012-05-17[[Languages are best assigned with \cs {chardef}, not \cs {let}}{114} }
+
+* babel~3.18 (2018/02/14)
+Moved \cs {babelprovide}, also for plain}{115} }
+
+* babel~3.10 (2017/05/19)
+Added \cs {babelprovide}}{116} }
+
+* babel~3.13 (2017/08/30)
+Added \cs {import}, which also reads dates. Some refactoring in the ini reader.}{116} }
+
+* babel~3.15 (2017/10/30)
+New keys script, language}{116} }
+
+* babel~3.16 (2018/01/02)
+Make sure ensuring works even before the language is selected}{116} }
+
+* babel~3.19 (2018/04/23)
+New option - mapfont. Currently only with direction}{116} }
+
+* babel~3.20 (2018/05/01)
+Handle native digits (TeX level). New option - maparabic.}{116} }
+
+* babel~3.23 (2018/09/01)
+Valueless import}{116} }
+
+* babel~3.26 (2018/10/16)
+Quick fix for xetex - test the script for intraspace}{116} }
+
+* babel~3.30 (2019/04/22)
+Read some basic parameters from ini even without import.}{116} }
+
+* babel~3.30 (2019/04/22)
+Native digits (lua level).}{116} }
+
+* babel~3.30 (2019/04/22)
+New attribute in luatex for `locale'. Also \cs {localeid}}{116} }
+
+* babel~3.32 (2019/05/30)
+Activate CJK line breaking with an explicit intraspace.}{116} }
+
+* babel~3.34 (2019/09/20)
+Fix - with main the language must not be restored.}{116} }
+
+* babel~3.37 (2019/12/07)
+SEA and CJK linebreaking activated by default.}{116} }
+
+* babel~3.38 (2020/01/15)
+Code for the onchar option.}{116} }
+
+* babel~3.22 (2018/06/05)
+Fix - Error with \cs {chapter} if empty in ini.}{121} }
+
+* babel~3.14 (2017/10/03)
+Take into account ini settings for hyphenrules if `import'.}{122} }
+
+* babel~3.37 (2019/12/07)
+Allow to define key/values (added \cs {bbl at renewlist}).}{123} }
+
+* babel~3.38 (2020/01/15)
+Read numbers are not hardcoded (passim); use \cs {bbl at readstream}.}{123} }
+
+* babel~3.36 (2019/10/30)
+New fields for CJK, because OpenType and the CLDR follow different models.}{124} }
+
+* babel~3.16 (2018/01/02)
+Fix - dates were severely broken.}{125} }
+
+* babel~3.28 (2019/04/01)
+Start work on calendars.}{125} }
+
+* babel~3.16 (2018/01/02)
+Load ids inside a box, to prevent extra spaces.}{127} }
+
+* babel~3.34 (2019/08/05)
+Added \cs {endinput}.}{127} }
+
+* babel~3.38 (2020/01/14)
+Added \cs {localeinfo}.}{127} }
+
+* babel~3.36 (2019/10/30)
+New macro \cs {babeladjust}}{128} }
+
+* babel~3.9t (2017/04/23)
+Refactored \cs {markright} and \cs {markboth}}{133} }
+
+* babel~3.23 (2018/09/01)
+Trick to isolate the bidi in page numbers}{133} }
+
+* babel~3.35 (2019/10/11)
+Now \cs {markboth} is protected. Consider this case.}{133} }
+
+* babel~3.9a (2012/09/07)
+Redefine only if `ref' is `safe'}{134} }
+
+* babel~3.9a (2013/01/03)
+Moved to babel.def}{134} }
+
+* babel~3.9a (2012/06/22)
+\cs {ref} is also taken into account}{134} }
+
+* babel~3.9n (2015/12/14)
+Don't use generic temp macros. babel/4441}{134} }
+
+* babel~3.9i (2014/02/14)
+Macro added, to replace \cs {textlatin} and friends}{137} }
+
+* babel~3.9j (2014/03/17)
+Moved misplaced code - it should be executed only with LaTeX}{137} }
+
+* babel~3.23 (2018/08/28)
+Added TS1, T3, TS3}{137} }
+
+* babel~3.35 (2019/10/01)
+Added PU, PD1}{137} }
+
+* babel~3.9l (2014/08/02)
+fontspec used to set \cs {latinencoding} to EUx, but now it doesn't. So, it's done here.}{138} }
+
+* babel~3.9o (2016/01/27)
+With fontspec, first check if \cs {UTFencname} exists.}{138} }
+
+* babel~3.15 (2017/10/30)
+Use an attribute instead of tex language (reserved for hyphenation).}{139} }
+
+* babel~3.15 (2017/10/30)
+Store direction in @wdir@<lang>.}{139} }
+
+* babel~3.28 (2019/04/01)
+Dir in boxes within math and other contexts (passim).}{139} }
+
+* babel~3.16 (2018/01/02)
+Fix - the direction prevented the removal of the indent to be re-placed}{141} }
+
+* babel~3.16 (2018/01/02)
+New macro \cs {babelsublr}}{142} }
+
+* babel~3.36 (2019/11/07)
+Improved message, now showing the language name}{143} }
+
+* babel~3.9a (2012/09/07)
+Added macro}{143} }
+
+* babel~3.9a (2013/01/23)
+New macro to normalize a macro (eg, \cs {languagename}) to lowercase if necessary}{143} }
+
+* babel~3.9a (2012/11/16)
+\cs {bbl at select@type} keep tracks of the selection method: 0 is select, 1 is foreign}{144} }
+
+* babel~3.9a (2012/09/09)
+Added hook}{146} }
+
+* babel~3.9a (2012/11/07)
+Use a loop for contents files, with the help of \cs {BabelContentsFiles}}{146} }
+
+* babel~3.9a (2013/03/08)
+Don't write to aux if language is unknown}{146} }
+
+* babel~3.9h (2013/11/20)
+Error with a more helpful text }{146} }
+
+* babel~3.16 (2018/01/02)
+New mechanism to pass the language to aux, toc, etc.}{146} }
+
+* babel~3.22 (2018/06/05)
+Unknown languages in aux files do not raise an error any more (only a warning).}{146} }
+
+* babel~3.9a (2012/07/27)
+Moved \cs {bbl at patterns} to the correct place, after setting the extras for the current language}{147} }
+
+* babel~3.9a (2012/08/01)
+Created \cs {bbl at switch} with code shared by \cs {select at language} and \cs {foreing at language}}{147} }
+
+* babel~3.9a (2012/08/01)
+Adddd \cs {bbl at iflanguagename} and \cs {select at language@x}, which is no-op if the language is the same}{148} }
+
+* babel~3.9a (2013/01/23)
+\cs {select at language} sets \textsc {languagename} so that it has the correct value in the aux file (eg, shorthand expansion was wrong)}{148} }
+
+* babel~3.9a (2012/08/14)
+Make sure the save counter is reset even if \cs {originalTeX} is used in other contexts}{148} }
+
+* babel~3.9c (2013/04/08)
+Removed an extra empty line}{148} }
+
+* babel~3.9h (2013/11/29)
+Use \cs {def} instead of \cs {renewcommand} for \cs {BabelLower}}{148} }
+
+* babel~3.9i (2014/03/04)
+Added `afterreset' hook}{148} }
+
+* babel~3.15 (2017/10/30)
+Remove spaces inside captions and date.}{148} }
+
+* babel~3.9a (2012/07/31)
+Removed \cs {originalTeX}}{149} }
+
+* babel~3.9a (2012/07/30)
+Removed unnecesary \cs {noextras} just before closing the group}{150} }
+
+* babel~3.9a (2012/07/31)
+Moved \cs {originalTeX} to \cs {foreing at language} so that it's also used in \texttt {otherlanguage*}}{150} }
+
+* babel~3.9a (2012/12/24)
+\cs {foreignlanguage} defined similarly to \cs {selectlanguage}, protecting the whole macro}{150} }
+
+* babel~3.11 (2017/03/04)
+\cs {foreignlanguage*}, \cs {bbl at beforeforeign} and hooks}{150} }
+
+* babel~3.9h (2013/11/29)
+The warning shows the language actually selected (with fixed case)}{151} }
+
+* babel~3.9a (2012/08/28)
+Extended to set hyphenation exceptions as defined with \cs {babelhyphenation}}{151} }
+
+* babel~3.9m (2015/07/25)
+Preset \cs {bbl at pttnlist} and \cs {bbl at patterns@} to relax, for luatex.}{151} }
+
+* babel~3.15 (2017/10/30)
+Don't set language name. Use temp macro.}{152} }
+
+* babel~3.15 (2018/02/14)
+Fix - didn't work with polyglossia}{152} }
+
+* babel~3.9a (2012/12/09)
+Save info about the babel version in the format (switch.def) so that it can be checked later if necessary}{153} }
+
+* babel~3.9s (2017/04/13)
+Reserved macro names for `locale'}{154} }
+
+* babel~3.9a (2012/07/30)
+\cs {newcommand}s replaced by \cs {def}'s, so that the file can be loaded twice}{154} }
+
+* babel~3.9a (2013/01/26)
+Define generic variants instead of duplicating each predefined message}{154} }
+
+* babel~3.37 (2019/12/07)
+New message type: an into written to the console.}{154} }
+
+* babel~3.9g (2013/05/30)
+Code moved from plain.def}{156} }
+
+* babel~3.9a (2012/12/12)
+Use spaces as delimiters, to avoid extra spaces. Once parsed, pass them in the traditional way}{157} }
+
+* babel~3.9a (2012/06/25)
+Added \cs {bbl at languages}}{157} }
+
+* babel~3.9a (2012/12/10)
+Removed \cs {selectfont} (I presume it was intended to catch wrong encoding codes, but I don't think this is necessary and as a side effect it might preload fonts)}{158} }
+
+* babel~3.9a (2012/06/25)
+Added \cs {bbl at languages}}{158} }
+
+* babel~3.9f (2013/05/16)
+Restored code to set default hyphenmins, which was deleted mistakenly}{158} }
+
+* babel~3.9a (2012/12/11)
+Code much simplified}{159} }
+
+* babel~3.9b (2013/03/25)
+Fixed an idiot slip: \cs {def} intead of \cs {let}}{159} }
+
+* babel~3.9a (2012/12/14)
+Test simplified and moved}{160} }
+
+* babel~3.9a (2012/12/12)
+Use only spaces as delimiters and not /, as previouly done}{160} }
+
+* babel~3.9a (2012/09/25)
+The list of languages is not printed every job any more (it is saved in \cs {bbl at languages}).}{161} }
+
+* babel~3.9g (2013/07/28)
+In non-LaTeX formats the number of languages were not printed. Moved from \cs {dump} and cleaned up: now \cs {toks}8 is expanded here.}{161} }
+
+* babel~3.9o (2016/01/25)
+The number of languages loaded was off by 1.}{161} }
+
+* babel~3.21 (2018/05/09)
+The message is not printed any more.}{161} }
+
+* babel~3.9a (2012/12/11)
+Raise error if there are synonyms without languages}{161} }
+
+* babel~3.15 (2017/10/30)
+New way to select fonts, with \cs {babelfont}}{161} }
+
+* babel~3.30 (2019/04/22)
+Ensure the current textdir inside boxes within math.}{161} }
+
+* babel~3.34 (2019/08/29)
+Better checks for fonts, and improved compatibility with fontspec.}{162} }
+
+* babel~3.28 (2019/04/01)
+\cs {babelfont} now based on \cs {newfontfamily}.}{165} }
+
+* bbunicode~1.0c (2014/03/10)
+Reset ``codes'' set by \cs {LaTeX} to what xetex expects. Used also in luatex.}{166} }
+
+* bbunicode~1.0f (2015/12/06)
+This block was assigned to xetex, even in luatex. Fixed here and below.}{166} }
+
+* babel 3.17 (2018/01/24)
+Tools for bidi footnote}{167} }
+
+* babel~3.16 (2018/01/02)
+Option layout - first available options: sectioning, counters, lists, columns, contents}{169} }
+
+* babel~3.32 (2019/05/04)
+\cs {@tabular}, \cs {list}, etc., are patched, instead of redefined.}{169} }
+
+* bbunicode~1.0b (2013/04/22)
+luatex-hyphen is loaded with require. Changes supplied by \'{E}lie Roux.}{171} }
+
+* bbunicode~1.0c (2014/03/10)
+Defined hook for `initiateactive', to fetch the next token and continue only if letter or other.}{171} }
+
+* bbunicode~1.0d (2014/03/21)
+Removed the `misfeature' for `initiateactive'.}{171} }
+
+* bbunicode~1.0e (2015/05/10)
+Use brackets instead of \cs {luaescapestring}.}{171} }
+
+* bbunicode~1.0e (2015/07/26)
+Added function addpattern and modified the patterns hook.}{171} }
+
+* bbunicode~1.1a (2016/01/26)
+New hyphenation loader for luatex.}{171} }
+
+* bbunicode~1.1b (2016/02/05)
+Also lua(e)tex.}{171} }
+
+* bbunicode~1.1c (2016/02/08)
+Base reading of patterns on number, not in name.}{171} }
+
+* bbunicode~1.1c (2016/02/08)
+Some hacks for polyglossia. To be improved.}{171} }
+
+* bbunicode~1.1c (2016/02/23)
+Thoroughly revised.}{171} }
+
+* bbunicode~1.1d[[2016/4/22[[Lua: Fixed a line break at \cs {foreignlanguage} with unloaded patterns. Added \cs {babelcatcodetablenum}, just in case.}{171} }
+
+* bbunicode~1.0e (2015/07/26)
+Macro \cs {babelpatterns} added}{176} }
+
+* babel~3.24 (2018/09/24)
+Lua code for interword spacing in Southeast Asian scripts.}{177} }
+
+* babel~3.32 (2019/05/25)
+Don't break with CJK if nohyphenation.}{177} }
+
+* babel~3.37 (2019/12/07)
+Added code for non-standard hyphenation.}{177} }
+
+* babel~3.31 (2019/05/04)
+Simple CJK line breaking.}{180} }
+
+* babel~3.38 (2020/01/15)
+Automatic fonts and ids switching}{181} }
+
+* babel~3.32 (2019/05/23)
+New - \cs {babelcharproperty}.}{183} }
+
+* babel~3.18 (2018/02/14)
+\cs {bbl at nextfake}, similar to the old \cs {nextfakemath} in Omega}{188} }
+
+* babel~3.19 (2018/04/23)
+Patch \cs {@eqnnum}, somewhat ad hoc. To be improved.}{188} }
+
+* babel~3.21 (2018/05/09)
+The ad hoc \cs {@eqnnum} was buggy. Fixed.}{188} }
+
+* babel~3.31 (2019/05/04)
+\cs {@tabular} and \cs {list} are patched, instead of redefined.}{188} }
+
+* babel~3.19 (2018/04/23)
+New option extras for layout}{190} }
+
+* babel~3.14 (2017/09/30)
+LuaTeX - support for R/AL texts - basic-r}{191} }
+
+* babel~3.35 (2019/10/11)
+Hack for unboxed boxes - The PUAs are `on'.}{191} }
+
+* babel~3.20 (2018/05/01)
+Adapted to exhyphens in luatex >= 1.07. Fix - now attr at dir is mod 3.}{191} }
+
+* babel~3.30 (2019/04/22)
+Switch to enable/disable bidi.}{191} }
+
+* babel~3.20 (2018/05/01)
+Adapted to exhyphens in luatex >= 1.07. Fix - nsm in mapfont (eg, Arabic vowels)}{195} }
+
+* babel-3.32 (2019/05/21)
+Don't set it to \cs {l at nohyphenation}, best reserved fo special uses.}{202} }
+
+* babel~3.36 (2019/10/30)
+Add nil to the language list.}{202} }
+
+* bbplain-1.0s (2012/12/21)
+\cs {loadlocalcfg} not loaded in the format}{204} }
+
+* bbplain-1.0t (2013/04/10)
+Added \cs {@expandtwoargs}}{204} }
+
+* babel~3.9h (2013/12/02)
+Added \cs {zap at space}}{204} }
+
+* babel~3.9k (2014/03/22)
+Added \cs {@nnil}}{204} }
+
+* babel~3.9k (2014/03/22)
+Added \cs {@gobbletwo}}{204} }
+
+* babel~3.9k (2014/03/22)
+Added \cs {protected at edef}}{204} }
+
+* babel~3.9h (2013/11/28)
+Set \cs {bbl at opt@hyphenmap} to 0 - we presume hyphenmap=off in plain}{205} }
+
+* bbplain-1.0s (2013/01/15)
+Use \cs {bbl at tempa} as documented}{207} }
\ No newline at end of file
diff --git a/samples/images/polytonic-greek.jpg b/samples/images/polytonic-greek.jpg
new file mode 100644
index 0000000..cbf9ffe
Binary files /dev/null and b/samples/images/polytonic-greek.jpg differ





More information about the latex3-commits mailing list.