OSDN Git Service

fix
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sun, 12 Apr 2020 02:00:21 +0000 (11:00 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sun, 12 Apr 2020 02:00:21 +0000 (11:00 +0900)
src/ltj-inputbuf.lua
src/patches/lltjfont.sty

index 75c42b5..0616f4e 100644 (file)
@@ -32,16 +32,16 @@ local function add_comment(buffer)
       local c = utfbyte(buffer, i)
       if c>=0x80 then
         local te = tex.endlinechar
-        local ctl = (te ~= -1) and (getcatcode(te)==5) and (getcatcode(getcount('ltjlineendcomment'))==14)
-        -- Is the catcode of \ltjlineendcomment (new comment char) is 14 (comment)?
         -- Is the catcode of endline character is 5 (end-of-line)?
-        if ctl then
+        if (te ~= -1) and (getcatcode(te)==5) then
            local ct = getcatcode(c)
            if (ct==11) or (ct==12) then
-              if ltjc_is_japanese_char_curlist(c) then
+              local lec = getcount('ltjlineendcomment')
+               -- Is the catcode of \ltjlineendcomment (new comment char) is 14 (comment)?
+              if ltjc_is_japanese_char_curlist(c) and (getcatcode(lec)==14) then
                   stop_time_measure('inputbuf')
-                 return buffer .. utfchar(getcount('ltjlineendcomment'))
-              end
+                  return buffer .. utfchar(lec)
+               end
            end
          end
       end
index 46d367a..436208a 100644 (file)
@@ -3,7 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjfont}[2020-04-07 Patch to NFSS2 for LuaTeX-ja]
+\ProvidesPackage{lltjfont}[2020-04-12 Patch to NFSS2 for LuaTeX-ja]
 
 %% patching \DeclareTextComposite
 \def\ltj@chardef@text@cmd#1{%
     \let\bfseries@rm\bfdef@ult
     \let\bfseries@sf\bfdef@ult
     \let\bfseries@tt\bfdef@ult
+    \let\bfseries@mc\bfdef@ult
+    \let\bfseries@gt\bfdef@ult
+    \let\bfseries@jtt\bfdef@ult
   }{}{}
 \fi
 \ifdefined\@setmdseriesdefaultshook % after 2020-04-07