texlive[55391] Master/texmf-dist: luavlna (2jun20)

commits+karl at tug.org commits+karl at tug.org
Tue Jun 2 23:14:53 CEST 2020


Revision: 55391
          http://tug.org/svn/texlive?view=revision&revision=55391
Author:   karl
Date:     2020-06-02 23:14:53 +0200 (Tue, 02 Jun 2020)
Log Message:
-----------
luavlna (2jun20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/luatex/luavlna/README.md
    trunk/Master/texmf-dist/doc/luatex/luavlna/luavlna-doc.pdf
    trunk/Master/texmf-dist/tex/luatex/luavlna/luavlna.lua
    trunk/Master/texmf-dist/tex/luatex/luavlna/luavlna.sty
    trunk/Master/texmf-dist/tex/luatex/luavlna/luavlna.tex

Modified: trunk/Master/texmf-dist/doc/luatex/luavlna/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luavlna/README.md	2020-06-02 21:14:18 UTC (rev 55390)
+++ trunk/Master/texmf-dist/doc/luatex/luavlna/README.md	2020-06-02 21:14:53 UTC (rev 55391)
@@ -1,4 +1,4 @@
-# Luavlna, version v0.1f, 2019-11-06
+# Luavlna, version v0.1g, 2020-06-02
 
 # Introduction
 

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

Modified: trunk/Master/texmf-dist/tex/luatex/luavlna/luavlna.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luavlna/luavlna.lua	2020-06-02 21:14:18 UTC (rev 55390)
+++ trunk/Master/texmf-dist/tex/luatex/luavlna/luavlna.lua	2020-06-02 21:14:53 UTC (rev 55391)
@@ -30,6 +30,15 @@
 
 local initials = {}
 
+local getchar = function(n)
+  local real_char = n.char
+  -- test if char is valid utf8 value, return dummy value otherwise
+  if (real_char >= 57344 and real_char <= 63743) or (real_char >= 983040 and real_char <= 1048573) or real_char >= 1048576  then 
+    return "a" 
+  end
+  return utf_char(real_char)
+end
+
 local main_language = nil
 
 -- when main_language is set, we will not use lang info in the nodes, but 
@@ -267,9 +276,9 @@
         anchor = head
         word = ""
         init = is_initial " " -- reset initials
-      elseif space==true and id == glyph_id and is_alpha(utf_char(head.char)) then -- a letter 
+      elseif space==true and id == glyph_id and is_alpha(getchar(head)) then -- a letter 
         local lang = get_language(head.lang)
-        local char = utf_char(head.char)
+        local char = getchar(head)
         word = char
         init = is_initial(char,lang)
         local s = singlechars[lang] or {} -- load singlechars for node's lang
@@ -289,7 +298,7 @@
       elseif no_initials~=true and init and head.id == glyph_id and head.char == period_char and nextn.id == glue_id and utf_len(word) == 1 then 
         head = insert_penalty(head)
       elseif head.id == glyph_id then
-        local char = utf_char(head.char)
+        local char = getchar(head)
         word = word .. char
         init = is_initial(char, head.lang)
         -- hlist support
@@ -300,7 +309,7 @@
         prevent_single_letter(head.head)
       end              
     elseif id == glyph_id and in_math then
-      word = word .. utf_char(head.char)
+      word = word .. getchar(head)
     end
     head = head.next                                                            
   end                                                                             

Modified: trunk/Master/texmf-dist/tex/luatex/luavlna/luavlna.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luavlna/luavlna.sty	2020-06-02 21:14:18 UTC (rev 55390)
+++ trunk/Master/texmf-dist/tex/luatex/luavlna/luavlna.sty	2020-06-02 21:14:53 UTC (rev 55391)
@@ -23,7 +23,7 @@
 
 \def\enablesplithyphens#1{%
   \ifcsname l@#1\endcsname%
-  \typeout{set lang #1, \the\csname l@#1\endcsname}
+  \typeout{set lang #1, \the\csname l@#1\endcsname}%
     \directlua{enable_split_hyphens("\the\csname l@#1\endcsname")}%
   \fi%
 }

Modified: trunk/Master/texmf-dist/tex/luatex/luavlna/luavlna.tex
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luavlna/luavlna.tex	2020-06-02 21:14:18 UTC (rev 55390)
+++ trunk/Master/texmf-dist/tex/luatex/luavlna/luavlna.tex	2020-06-02 21:14:53 UTC (rev 55391)
@@ -71,20 +71,20 @@
 
 % Set letters which are prevented from breaking
 \def\singlechars#1#2{%
-\directlua{set_singlechars("#1","#2")}
+\directlua{set_singlechars("#1","#2")}%
 }
 
 % Define compound initials
 \def\compoundinitials#1#2{%
-\directlua{set_compounds("#1","#2")}
+\directlua{set_compounds("#1","#2")}%
 }
 % Enable inserting of visual marks for debugging
 \def\preventsingledebugon{%
-\directlua{luavlna.debug(true)}
+\directlua{luavlna.debug(true)}%
 }
 
 \def\preventsinglelang#1{%
-	\directlua{set_main_language("#1")}
+	\directlua{set_main_language("#1")}%
 } 
 
 %\newluatexattribute\preventsinglestatus
@@ -94,12 +94,12 @@
 	\preventsinglestatus=2
 }
 
-\def\preventsingleoff{
+\def\preventsingleoff{%
 	\preventsinglestatus=1
 }
 % Disable inserting of visual marks for dewbugging
 \def\preventsingledebugoff{%
-\directlua{luavlna.debug(false)}
+\directlua{luavlna.debug(false)}%
 }
 
 % enable/disable split hyphens for a language



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