[latex3-commits] [latex3/babel] main: Fix #279. (627ec55)

github at latex-project.org github at latex-project.org
Sun Feb 4 18:11:37 CET 2024


Repository : https://github.com/latex3/babel
On branch  : main
Link       : https://github.com/latex3/babel/commit/627ec554a40fbb94927d8cc3640fcaa119ddda6f

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

commit 627ec554a40fbb94927d8cc3640fcaa119ddda6f
Author: Javier <email at localhost>
Date:   Sun Feb 4 18:11:37 2024 +0100

    Fix #279.


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

627ec554a40fbb94927d8cc3640fcaa119ddda6f
 README.md      |   4 +++-
 babel-code.pdf | Bin 646753 -> 647212 bytes
 babel.dtx      |  27 +++++++++++++++++++++------
 babel.pdf      | Bin 421616 -> 421616 bytes
 bbcompat.dtx   |   2 +-
 5 files changed, 25 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index 994871a..c97f522 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 24.1.40037
+## Babel 24.1.40072
 
 (dev)
 
@@ -49,6 +49,8 @@ respective authors.
 ### Summary of latest changes
 ```
 24.2 (dev)
+     * Cleaned up some language names.
+     * Mosty internal changes and minor fixes.
 
 24.1 2024-01-07
      * New version numbering scheme.
diff --git a/babel-code.pdf b/babel-code.pdf
index 1b4543d..c69c780 100644
Binary files a/babel-code.pdf and b/babel-code.pdf differ
diff --git a/babel.dtx b/babel.dtx
index abe8604..b625bad 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -32,7 +32,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2024/02/04 v24.1.40037 The Babel package]
+\ProvidesFile{babel.dtx}[2024/02/04 v24.1.40072 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -5429,7 +5429,7 @@ wouldn’t exist.
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=24.1.40037>>
+%<<version=24.1.40072>>
 %<<date=2024/02/04>>
 %    \end{macrocode}
 %
@@ -23026,6 +23026,13 @@ Babel.fontmap[0] = {}      -- l
 Babel.fontmap[1] = {}      -- r
 Babel.fontmap[2] = {}      -- al/an
 
+-- To cancel mirroring. Also OML, OMS, U?
+Babel.symbol_fonts = Babel.symbol_fonts or {}
+Babel.symbol_fonts[font.id('tenln')] = true
+Babel.symbol_fonts[font.id('tenlnw')] = true
+Babel.symbol_fonts[font.id('tencirc')] = true
+Babel.symbol_fonts[font.id('tencircw')] = true
+
 Babel.bidi_enabled = true
 Babel.mirroring_enabled = true
 
@@ -23069,6 +23076,14 @@ local function insert_numeric(head, state)
   return head, new_state
 end
 
+local function glyph_not_symbol_font(node)
+ 	if node.id == GLYPH then
+    return not Babel.symbol_fonts[node.font] 
+ 	else
+ 		 return false
+  end
+end
+
 -- TODO - \hbox with an explicit dir can lead to wrong results
 -- <R \hbox dir TLT{<R>}> and <L \hbox dir TRT{<L>}>. A small attempt
 -- was s made to improve the situation, but the problem is the 3-dir
@@ -23124,7 +23139,7 @@ function Babel.bidi(head, ispar, hdir)
     -- current one is not added until we start processing the neutrals.
 
     -- three cases: glyph, dir, otherwise
-    if item.id == GLYPH
+    if glyph_not_symbol_font(item)
        or (item.id == 7 and item.subtype == 2) then
 
       local d_font = nil
@@ -23253,7 +23268,7 @@ function Babel.bidi(head, ispar, hdir)
         temp = 'on'     -- W6
       end
       for e = first_et, #nodes do
-        if nodes[e][1].id == GLYPH then nodes[e][2] = temp end
+        if glyph_not_symbol_font(nodes[e][1]) then nodes[e][2] = temp end
       end
       first_et = nil
       has_en = false
@@ -23293,7 +23308,7 @@ function Babel.bidi(head, ispar, hdir)
       temp = 'on'     -- W6
     end
     for e = first_et, #nodes do
-      if nodes[e][1].id == GLYPH then nodes[e][2] = temp end
+      if glyph_not_symbol_font(nodes[e][1]) then nodes[e][2] = temp end
     end
   end
 
@@ -23329,7 +23344,7 @@ function Babel.bidi(head, ispar, hdir)
       for r = first_on, q - 1 do
         nodes[r][2] = temp
         item = nodes[r][1]    -- MIRRORING
-        if Babel.mirroring_enabled and item.id == GLYPH
+        if Babel.mirroring_enabled and glyph_not_symbol_font(item)
              and temp == 'r' and characters[item.char] then
           local font_mode = ''
           if item.font > 0 and font.fonts[item.font].properties then
diff --git a/babel.pdf b/babel.pdf
index c61dea2..015ea51 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 671201f..bf75bdd 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
 %
 % \iffalse
 %<*dtx>
-\ProvidesFile{bbcompat.dtx}[2024/02/04 v24.1.40037]
+\ProvidesFile{bbcompat.dtx}[2024/02/04 v24.1.40072]
 %</dtx>
 %
 %% File 'bbcompat.dtx'





More information about the latex3-commits mailing list.