From cb1598e5df04db724850cf179f6f1f82a29830b9 Mon Sep 17 00:00:00 2001 From: Hironori Kitagawa Date: Sun, 12 Apr 2020 11:00:21 +0900 Subject: [PATCH] fix --- src/ltj-inputbuf.lua | 12 ++++++------ src/patches/lltjfont.sty | 5 ++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/ltj-inputbuf.lua b/src/ltj-inputbuf.lua index 75c42b5..0616f4e 100644 --- a/src/ltj-inputbuf.lua +++ b/src/ltj-inputbuf.lua @@ -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 diff --git a/src/patches/lltjfont.sty b/src/patches/lltjfont.sty index 46d367a..436208a 100644 --- a/src/patches/lltjfont.sty +++ b/src/patches/lltjfont.sty @@ -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{% @@ -826,6 +826,9 @@ \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 -- 2.11.0