diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty | 70 |
1 files changed, 49 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty index 738e192004f..1b95d95a4c5 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty @@ -724,29 +724,57 @@ \directlua{luatexja.jfont.does_alt_set'\luatexluaescapestring{#1}'}} %%%% patch \@text@composite because of {y,t}albaselineshift -\def\@text@composite#1#2#3#{% - \begingroup - \setbox\z@=\hbox\bgroup% - \ltj@yablshift\z@\ltj@tablshift\z@ - \expandafter\@text@composite@x - \csname\string#1-\string#2\endcsname} + +%% \pltx@isletter from plfonts.dtx +\def\pltx@mark{\pltx@mark@} +\let\pltx@scanstop\relax +\long\def\pltx@cond#1\fi{% + #1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} +\long\def\pltx@isletter#1{% + \expandafter\pltx@isletter@i\romannumeral-`0#1\pltx@scanstop} +\long\def\pltx@isletter@i#1\pltx@scanstop{% + \pltx@cond\ifx\pltx@mark#1\pltx@mark\fi{\@firstoftwo}% + {\pltx@isletter@ii\pltx@scanstop#1\pltx@scanstop{}#1\pltx@mark}} +\long\def\pltx@isletter@ii#1\pltx@scanstop#{% + \pltx@cond\ifx\pltx@mark#1\pltx@mark\fi% + {\pltx@isletter@iii}{\pltx@isletter@iv}} +\long\def\pltx@isletter@iii#1\pltx@mark{\@secondoftwo} +\long\def\pltx@isletter@iv#1#2#3\pltx@mark{% + \pltx@cond\ifx\pltx@mark#3\pltx@mark\fi{% + \pltx@cond{\ifnum0\ifcat A\noexpand#21\fi\ifcat=\noexpand#21\fi>\z@}\fi + {\@firstoftwo}{\@secondoftwo}% + }{\@secondoftwo}} + \def\@text@composite@x#1#2{% \ifx#1\relax - \expandafter\@secondoftwo - \else - \expandafter\@firstoftwo - \fi - #1{#2}\egroup - \leavevmode - \expandafter\lower - \ifnum\ltjgetparameter{direction}=3 - \ltjgetparameter{talbaselineshift} - \else\ifmmode - \z@ + #2% + \else\pltx@isletter{#1}{#1}{% + \begingroup + \setbox\z@\hbox\bgroup% + \ltj@yablshift\z@ \ltj@tablshift\z@ + #1% + \@tempcntb\directlua{luatexja.pltx_composite_last_node_char()}%) + \xdef\pltx@composite@temp{\noexpand\@tempcntb=\the\@tempcntb\relax}% + \aftergroup\pltx@composite@temp + \egroup + \ifnum\ltjgetparameter{direction}=3 % + \@tempdima=\ltj@tablshift sp\else\@tempdima=\ltj@yablshift sp\fi + \ifnum\@tempcntb<\z@\@tempcnta\z@\else + \@tempcnta=\ltjgetparameter{jacharrange}{\ltjgetparameter{chartorange}{\@tempcntb}}\relax + \ifnum\@tempcnta=\z@\@tempdima\z@\fi + \fi + \ifnum\@tempcnta>\z@ + \ifodd\ltjgetparameter{alxspmode}{\@tempcntb}\else\leavevmode\hbox{}\fi + \begingroup\mathsurround\z@$% + \hbox{\lower\@tempdima\box\z@} + $\endgroup% + \ifnum\ltjgetparameter{alxspmode}{\@tempcntb}<2\hbox{}\fi \else - \ltjgetparameter{yalbaselineshift} - \fi\fi - \box\z@ - \endgroup} + \ifdim\@tempdima=\z@{\ltj@yablshift\z@ \ltj@tablshift\z@#1}% + \else\lower\@tempdima\box\z@\fi + \fi + \endgroup}% + \fi +} \endinput |