diff options
author | Karl Berry <karl@freefriends.org> | 2020-01-27 21:56:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-01-27 21:56:42 +0000 |
commit | f5dc95456cfd50e1e65093613f2dcab3e30b6714 (patch) | |
tree | 1965b1f5cc1ab512d14b1ab5573af1e46fc7a978 /Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty | |
parent | c1881c5c5344914a46d0f06387afcb78981a85c5 (diff) |
luatexja (27jan20)
git-svn-id: svn://tug.org/texlive/trunk@53575 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty | 72 |
1 files changed, 52 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty index 204adbc62e4..347f66b4688 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty @@ -32,7 +32,13 @@ \newcommand\kanjiencodingdefault{JY3} \newcommand\kanjifamilydefault{\mcdefault} \newcommand\kanjiseriesdefault{\mddefault} -\newcommand\kanjishapedefault{\updefault} +\ifdefined\shapedefault + %% LaTeX 2020-02-02 + \newcommand\kanjishapedefault{\shapedefault} +\else + %% LaTeX 2019-10-01 + \newcommand\kanjishapedefault{\updefault} +\fi \DeclareKanjiFamily{JY3}{mc}{} \DeclareFontShape{JY3}{mc}{m}{n}{<-> s*[\ifdefined\Cjascale\Cjascale\else 0.962216\fi] \ltj@stdmcfont:jfm=\ltj@stdyokojfm}{} @@ -40,8 +46,8 @@ \DeclareFontShape{JY3}{gt}{m}{n}{<-> s*[\ifdefined\Cjascale\Cjascale\else 0.962216\fi] \ltj@stdgtfont:jfm=\ltj@stdyokojfm}{} \DeclareFontShape{JY3}{mc}{bx}{n}{<-> ssub*gt/m/n}{} \DeclareFontShape{JY3}{gt}{bx}{n}{<-> ssub*gt/m/n}{} -\DeclareFontShape{JY3}{mc}{b}{n}{<-> ssub*mc/bx/n}{} -\DeclareFontShape{JY3}{gt}{b}{n}{<-> ssub*gt/bx/n}{} +\DeclareFontShape{JY3}{mc}{b}{n}{<-> ssub*gt/m/n}{} +\DeclareFontShape{JY3}{gt}{b}{n}{<-> ssub*gt/m/n}{} \DeclareKanjiFamily{JT3}{mc}{} \DeclareFontShape{JT3}{mc}{m}{n}{<-> s*[\ifdefined\Cjascale\Cjascale\else 0.962216\fi] \ltj@stdmcfont:jfm=\ltj@stdtatejfm}{} @@ -49,8 +55,8 @@ \DeclareFontShape{JT3}{gt}{m}{n}{<-> s*[\ifdefined\Cjascale\Cjascale\else 0.962216\fi] \ltj@stdgtfont:jfm=\ltj@stdtatejfm}{} \DeclareFontShape{JT3}{mc}{bx}{n}{<-> ssub*gt/m/n}{} \DeclareFontShape{JT3}{gt}{bx}{n}{<-> ssub*gt/m/n}{} -\DeclareFontShape{JT3}{mc}{b}{n}{<-> ssub*mc/bx/n}{} -\DeclareFontShape{JT3}{gt}{b}{n}{<-> ssub*gt/bx/n}{} +\DeclareFontShape{JT3}{mc}{b}{n}{<-> ssub*gt/m/n}{} +\DeclareFontShape{JT3}{gt}{b}{n}{<-> ssub*gt/m/n}{} \KanjiEncodingPair{JY3}{JT3} \DeclareRelationFont{JY3}{gt}{m}{}{TU}{lmr}{bx}{} @@ -77,25 +83,51 @@ \DeclareMathAlphabet{\mathgt}{JY3}{gt}{m}{n} \fi +\ifdefined\@rmfamilyhook +%%%% LaTeX 2020-02-02 +\edef\bfseries@mc{\bfdefault} +\edef\bfseries@gt{\bfdefault} +\def\bfseries@jtt{\bfseries@mc} +\edef\mdseries@mc{\mddefault} +\edef\mdseries@gt{\mddefault} +\def\mdseries@jtt{\mdseries@mc} +\fi + \newif\if@ltj@match@family \@ltj@match@familyfalse \def\verbatim@font{\normalfont\ttfamily\kanjifamily\jttdefault\selectfont} -\DeclareRobustCommand\rmfamily - {\not@math@alphabet\rmfamily\mathrm - \romanfamily\rmdefault - \if@ltj@match@family\kanjifamily\mcdefault\fi\selectfont} -\DeclareRobustCommand\sffamily - {\not@math@alphabet\sffamily\mathsf - \romanfamily\sfdefault - \if@ltj@match@family\kanjifamily\gtdefault\fi\selectfont} -\DeclareRobustCommand\ttfamily - {\not@math@alphabet\ttfamily\mathtt - \romanfamily\ttdefault - \if@ltj@match@family\kanjifamily\jttdefault\fi\selectfont} + +\def\@ltj@hook@family#1#2{ % #1: csname #2: contents + \ifcsname @#1hook\endcsname % LaTeX 2020-02-02 + \csappto{@#1hook}{#2}% + \else % LaTeX 2019-10-01 + \ifcsname #1 \endcsname + \expandafter\patchcmd\csname #1 \endcsname{\selectfont}{#2\selectfont}{}{}% + \else + \PackageWarningNoLine{luatexja}{% + Patching to \expandafter\string\csname #1\endcsname\space failed + }% + \fi + \fi +} +\@ltj@hook@family{rmfamily}{% + \if@ltj@match@family + \prepare@family@series@update@kanji{mc}\mcdefault + \fi +} +\@ltj@hook@family{sffamily}{% + \if@ltj@match@family + \prepare@family@series@update@kanji{gt}\gtdefault + \fi +} +\@ltj@hook@family{ttfamily}{% + \if@ltj@match@family + \prepare@family@series@update@kanji{jtt}\jttdefault + \fi +} + %%% \eminnershape -\DeclareRobustCommand\em - {\@nomath\em \ifdim \fontdimen\@ne\font >\z@ - \eminnershape \else \gtfamily \itshape \fi} +\expandafter\patchcmd\csname em \endcsname{\itshape}{\gtfamily\itshape}{}{} \def\eminnershape{\mcfamily \upshape} \ltjdefcharrange{1}{"80-"36F, "1E00-"1EFF} |