summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/patches
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-05-30 20:07:11 +0000
committerKarl Berry <karl@freefriends.org>2022-05-30 20:07:11 +0000
commitfff67648afed7073ee306f42c470d95b978d2de5 (patch)
tree42f9e1a2c7afbd24038f9ad2cb9dbcc680c30d2d /Master/texmf-dist/tex/luatex/luatexja/patches
parent5aca495564c2fa70381412599e45bd974378ae2c (diff)
luatexja (30may22)
git-svn-id: svn://tug.org/texlive/trunk@63447 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/patches')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty17
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty23
2 files changed, 25 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty
index 086771a200b..af49aef7faf 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjcore}[2022-01-17 Patch to LaTeX2e Kernel for LuaTeX-ja]
+\ProvidesPackage{lltjcore}[2022-05-30 Patch to LaTeX2e Kernel for LuaTeX-ja]
\RequirePackage{etoolbox}
%%% expl3
@@ -235,11 +235,16 @@
\hskip\@tempskipa\color@endgroup\egroup}
\pretocmd{\footnote}{\inhibitglue}{}{}
\pretocmd{\footnotemark}{\inhibitglue}{}{}
-\patchcmd{\@footnotemark}{\@makefnmark}{%
- \unless\ifnum\ltjgetparameter{direction}=3 \@makefnmark%
- \else\hbox to\z@{\hskip-.25\zw\raise.9\zh\@makefnmark\hss}\fi%
-}{}{}
-\let\@parboxto\@empty
+\def\@ltj@process@makefnmark#1{%
+ \unless\ifnum\ltjgetparameter{direction}=3 #1%
+ \else\hbox to\z@{\hskip-.25\zw\raise.9\zh#1\hss}\fi%
+}%
+\ifdefined\@kernel@process@makefnmark %% 2022-06-01 latex-lab?
+ \let\ltj@orig@kernel@process@makefnmark=\@kernel@process@makefnmark
+ \def\@kernel@process@makefnmark#1{\ltj@orig@kernel@process@makefnmark{\@ltj@process@makefnmark#1}}
+\else
+ \patchcmd{\@footnotemark}{\@makefnmark}{\@ltj@process@makefnmark\@makefnmark}{}{}
+\fi
\long\def\@iiiparbox#1#2[#3]#4#5{%
\leavevmode
\@pboxswfalse
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty
index 173b1ed94bb..c0377159535 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty
@@ -1,10 +1,11 @@
%
-% lltjp-listings.sty 2020-03-23
+% lltjp-listings.sty 2022-05-22
%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{etoolbox,listings,luatexbase-cctb}
+\newcount\ltj@lst@japanese@min \ltj@lst@japanese@min=128
%%%%%%%%%%%%%%%% Japanese support
%% whether letter-space in a fixed mode box is doubled or not
\newif\if@ltj@lst@double
@@ -197,9 +198,6 @@
\lsthk@PreSet\lstset{flexiblecolumns,#1}%
\lsthk@TextStyle
\@ifnextchar\bgroup \ltj@lst@InlineG \ltj@lstinline@}
-\def\ltj@lstinline@#1{%
- \edef\ltj@lst@temp{\the\catcode`#1}\lst@Init\relax\catcode`#1\ltj@lst@temp
- \lst@InlineJ#1}
\def\ltj@lst@InlineG{%
\lst@Init\relax\edef\ltj@lst@temp{\the\catcode`\}}\catcode`\}=2 \catcode`\ =12\relax
\let\lst@arg\@empty\afterassignment\ltj@lst@InlineG@@\@temptokena}
@@ -207,9 +205,16 @@
\catcode`\}=\ltj@lst@temp%
\expandafter\expandafter\expandafter\lst@InsideConvert%
\expandafter{\the\@temptokena}\lst@arg\lst@DeInit\egroup}
-
-%%%%%%%%%%%%%%%% \lstMakeShortInline
-\patchcmd\lstMakeShortInline@{\lst@shortinlinedef#1}{\lst@shortinlinedef~}{}{}
+\def\ltj@lstinline@#1{%
+ \edef\ltj@lst@temp{\the\catcode`#1}
+ \lst@Init\relax\catcode`#1\ltj@lst@temp
+ \ifnum\ltj@lst@temp=\active
+ \begingroup\lccode`\~=`#1\relax
+ \lowercase{\xdef\lst@next{\noexpand\lst@InlineJ\noexpand~}}\endgroup%
+ \else
+ \edef\lst@next{\noexpand\lst@InlineJ\scantextokens{#1}}%
+ \fi\lst@next
+}
% We redefine \lst@BeginDropInput, since now we have
% two additional `process macros'.
@@ -239,7 +244,7 @@
for i = 1, utf.len(buf) do
local c = utf.sub(buf, i, i)
local cu = utf.byte(c)
- if cu >= 0x80 and tex.getcatcode(cu) \string~= 13 then
+ if cu >= \the\ltj@lst@japanese@min\space and tex.getcatcode(cu) \string~= 13 then
ret = ret .. utfchar(getcount('ltjlineendcomment'))
end
ret = ret .. c
@@ -283,7 +288,7 @@
\gdef\ltj@lst@MakeActive@#1{\let\lst@next\relax%
\ifx#1\relax
\else\let\lst@next\ltj@lst@MakeActive@
- \ifnum`#1>127
+ \ifnum`#1>\numexpr\ltj@lst@japanese@min-1
\lccode`\^^A=`#1
\lowercase{\lst@lAddTo\lst@temp{$^^A}}%$
\else