X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fpatches%2Flltjfont.sty;h=515e0a0f7c5e2b70a0c91babc9fe616cb6fbbd7a;hb=6eb03a9acfcdc7570fff60cb9aa3713a69a16340;hp=9de9eb73b58bc2ec8b942e6516ae03db148f8807;hpb=2b77b29b65a16cb75ba7f83a4bc1319fb36679a1;p=luatex-ja%2Fluatexja.git diff --git a/src/patches/lltjfont.sty b/src/patches/lltjfont.sty index 9de9eb7..515e0a0 100644 --- a/src/patches/lltjfont.sty +++ b/src/patches/lltjfont.sty @@ -3,7 +3,7 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjfont}[2011/11/22 Patch to NFSS2 for LuaLaTeX-ja] +\ProvidesPackage{lltjfont}[2013/01/01 Patch to NFSS2 for LuaLaTeX-ja] \let\k@encoding\@empty \let\ck@encoding\@empty @@ -230,15 +230,20 @@ \fi \endgroup } +\def\DLMfontsw@standard#1#2#3{#1{#2{#3}}} \def\reDeclareMathAlphabet#1#2#3{% \ifdefined#2 - \ifdefined#3 - \toks0\expandafter{#3}% - \@temptokena\expandafter{#2}% - \long\protected\edef#1##1{\the\@temptokena{\the\toks0{##1}}}% - \else\let#1#2\fi + \@temptokena\expandafter{#2}% \else - \ifdefined#3\let#1#3\fi\fi + \@temptokena{#2}% + \fi + \ifdefined#3 + \toks0\expandafter{#3}% + \else + \toks0{#3}% + \fi + \long\protected\edef#1{% + \noexpand\DLMfontsw@standard{\the\@temptokena}{\the\toks0}}% } \@onlypreamble\reDeclareMathAlphabet \def\all@shape{all}% @@ -447,8 +452,8 @@ \edef\k@family{#1}% \else % search font definition file... \ifcsname kfam@list@\k@encoding\endcsname\else - \expandafter\gdef\csname kfam@list@\k@encoding\endcsname{} - \expandafter\gdef\csname notkfam@list@\k@encoding\endcsname{} + \expandafter\gdef\csname kfam@list@\k@encoding\endcsname{}% + \expandafter\gdef\csname notkfam@list@\k@encoding\endcsname{}% \fi \edef\@templist{\@nameuse{kfam@list@\k@encoding}}% \expandafter\expandafter\expandafter\inlist@\expandafter\tmp@item\expandafter{\@templist}% @@ -456,8 +461,8 @@ \edef\@templist{\@nameuse{notkfam@list@\k@encoding}}% \expandafter\expandafter\expandafter\inlist@\expandafter\tmp@item\expandafter{\@templist}% \ifin@\@notkfamtrue\else% - \def\@temp##1+{\lowercase{\def\@@temp{##1}}}\expandafter\@temp\k@encoding+% - \message{(I search kanjifont definition file: \@@temp#1.fd)}% + \def\@temp##1+{\lowercase{\def\@@temp{##1#1.fd}}}\expandafter\@temp\k@encoding+% + \message{(I search kanjifont definition file: \@@temp)}% \IfFileExists{\@@temp#1.fd}{\@tempswztrue}{\@tempswzfalse}% \if@tempswz \expandafter\xdef\csname kfam@list@\k@encoding\endcsname @@ -473,8 +478,8 @@ \edef\f@family{#1}% \else % search font definition file... \ifcsname ffam@list@\f@encoding\endcsname\else - \expandafter\gdef\csname ffam@list@\f@encoding\endcsname{} - \expandafter\gdef\csname notffam@list@\f@encoding\endcsname{} + \expandafter\gdef\csname ffam@list@\f@encoding\endcsname{}% + \expandafter\gdef\csname notffam@list@\f@encoding\endcsname{}% \fi \edef\@templist{\@nameuse{ffam@list@\f@encoding}}% \expandafter\expandafter\expandafter\inlist@\expandafter\tmp@item\expandafter{\@templist}% @@ -482,8 +487,8 @@ \edef\@templist{\@nameuse{notffam@list@\f@encoding}}% \expandafter\expandafter\expandafter\inlist@\expandafter\tmp@item\expandafter{\@templist}% \ifin@\@notffamtrue\else - \def\@temp##1+{\lowercase{\def\@@temp{##1}}}\expandafter\@temp\f@encoding+% - \message{(I search font definition file: \@@temp#1.fd)}% + \def\@temp##1+{\lowercase{\def\@@temp{##1#1.fd}}}\expandafter\@temp\f@encoding+% + \message{(I search font definition file: \@@temp)}% \IfFileExists{\@@temp#1.fd}{\@tempswztrue}{\@tempswzfalse}% \if@tempswz \expandafter\xdef\csname ffam@list@\f@encoding\endcsname @@ -514,7 +519,7 @@ \def\useroman#1#2#3#4{% \romanencoding{#1}\romanfamily{#2}\romanseries{#3}\romanshape{#4}% \selectfont\ignorespaces} -\def\usefont#1#2#3#4{% +\protected\def\usefont#1#2#3#4{% \edef\tmp@item{{#1}}% \expandafter\expandafter\expandafter \inlist@\expandafter\tmp@item\expandafter{\kenc@list}% @@ -564,7 +569,9 @@ \expandafter\ltj@@IsFontJapaneseX#1//:% \expandafter\expandafter\expandafter \inlist@\expandafter\tmp@item\expandafter{\kenc@list}} -\def\ltj@@IsFontJapaneseX#1/#2/:{\edef\tmp@item{{\directlua{tex.print('#1')}}}} +\def\ltj@@IsFontJapaneseX#1/#2/:{\edef\tmp@item{{\directlua{% + tex.print(luatexbase.catcodetables["latex-package"], '#1')}% +}}} \let\extract@afont\extract@font @@ -614,10 +621,11 @@ \pickup@jfont\let\scriptfont@name\font@name \xdef\font@name{\csname \string#2/\ssf@size\endcsname}% \pickup@jfont - \edef\math@fonts{\math@fonts\ltjsetparameter{% - jatextfont={#1,\textfont@name},% - jascriptfont={#1,\scriptfont@name},% - jascriptscriptfont={#1,\font@name}}}% + \edef\math@fonts{\math@fonts\ltj@setpar@global% + \ltj@@set@stackfont#1,\textfont@name:{MJT}% + \ltj@@set@stackfont#1,\scriptfont@name:{MJS}% + \ltj@@set@stackfont#1,\font@name:{MJSS}% + }% } \def\getanddefine@fonts#1#2{%