OSDN Git Service

unicode library -> utf
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Thu, 31 Dec 2020 12:32:43 +0000 (21:32 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Thu, 31 Dec 2020 12:32:43 +0000 (21:32 +0900)
src/ltj-otf.lua
src/patches/lltjp-listings.sty

index 4279276..770749f 100644 (file)
@@ -1,7 +1,6 @@
 --
 -- ltj-otf.lua
 --
-require 'unicode'
 require 'lualibs'
 
 luatexja.load_module 'base';      local ltjb = luatexja.base
@@ -120,9 +119,9 @@ local function append_jglyph(char)
    setfield(p, 'value', char);  node_write(p)
 end
 
-local utf
+local myutf
 do
-   utf = function (ucs)
+   myutf = function (ucs)
       if ltjd_get_dir_count()==dir_tate then
          ucs = ltju.replace_vert_variant(
             tex_get_attr((ltjd_get_dir_count()==dir_tate) and attr_curtfnt or attr_curjfnt),
@@ -235,7 +234,7 @@ local disable_ivs = enable_ivs
 luatexja.otf = {
   append_jglyph = append_jglyph,
   enable_ivs = enable_ivs, disable_ivs = disable_ivs,
-  cid = cid, utf = utf,
+  cid = cid, utf = myutf,
 }
 
 
index ee3c3aa..173b1ed 100644 (file)
@@ -43,7 +43,7 @@
 \directlua{
   local cat_str = luatexbase.catcodetables['string']
   local cat_lp  = luatexbase.catcodetables['latex-package']
-  local ubyte = unicode.utf8.byte
+  local ubyte = utf.byte
   local spccmd = string.char(0x5C) .. 'ltj@lst@hss@normal'
   luatexja.listings = {}
   function luatexja.listings.althss(t)
 }}
 
 \directlua{
-  local utfchar, getcount = unicode.utf8.char, tex.getcount
+  local utfchar, getcount = utf.char, tex.getcount
   luatexja.listings.insert_cb = function()
     if not luatexja.listings.patched then
       luatexja.listings.patched = 1