diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/luatex/luavlna/README.md | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luavlna/luavlna-doc.pdf | bin | 91288 -> 91137 bytes | |||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luavlna/luavlna.lua | 17 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luavlna/luavlna.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luavlna/luavlna.tex | 12 |
5 files changed, 21 insertions, 12 deletions
diff --git a/Master/texmf-dist/doc/luatex/luavlna/README.md b/Master/texmf-dist/doc/luatex/luavlna/README.md index dab00a6ca06..853a3683ff2 100644 --- a/Master/texmf-dist/doc/luatex/luavlna/README.md +++ b/Master/texmf-dist/doc/luatex/luavlna/README.md @@ -1,4 +1,4 @@ -# Luavlna, version v0.1f, 2019-11-06 +# Luavlna, version v0.1g, 2020-06-02 # Introduction diff --git a/Master/texmf-dist/doc/luatex/luavlna/luavlna-doc.pdf b/Master/texmf-dist/doc/luatex/luavlna/luavlna-doc.pdf Binary files differindex e62a9bd1d4e..84e384611fe 100644 --- a/Master/texmf-dist/doc/luatex/luavlna/luavlna-doc.pdf +++ b/Master/texmf-dist/doc/luatex/luavlna/luavlna-doc.pdf diff --git a/Master/texmf-dist/tex/luatex/luavlna/luavlna.lua b/Master/texmf-dist/tex/luatex/luavlna/luavlna.lua index d1eaa6f0044..511ee859a1b 100644 --- a/Master/texmf-dist/tex/luatex/luavlna/luavlna.lua +++ b/Master/texmf-dist/tex/luatex/luavlna/luavlna.lua @@ -30,6 +30,15 @@ local singlechars = {} -- {a=true,i=true,z=true, v=true, u=true, o = true} 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 @@ local function prevent_single_letter (head) 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 @@ local function prevent_single_letter (head) 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 @@ local function prevent_single_letter (head) 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 diff --git a/Master/texmf-dist/tex/luatex/luavlna/luavlna.sty b/Master/texmf-dist/tex/luatex/luavlna/luavlna.sty index c620b670d10..aa6f623aa9c 100644 --- a/Master/texmf-dist/tex/luatex/luavlna/luavlna.sty +++ b/Master/texmf-dist/tex/luatex/luavlna/luavlna.sty @@ -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% } diff --git a/Master/texmf-dist/tex/luatex/luavlna/luavlna.tex b/Master/texmf-dist/tex/luatex/luavlna/luavlna.tex index ab47b8d6fcf..0b6540a5cc6 100644 --- a/Master/texmf-dist/tex/luatex/luavlna/luavlna.tex +++ b/Master/texmf-dist/tex/luatex/luavlna/luavlna.tex @@ -71,20 +71,20 @@ end % 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 @@ end \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 |