diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/patches')
6 files changed, 101 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty index a592e731ea2..8a7ac6b4104 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty @@ -3,7 +3,7 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjdefs}[2017/11/12 Default font settings of LuaTeX-ja] +\ProvidesPackage{lltjdefs}[2017/12/31 Default font settings of LuaTeX-ja] \def\ltj@stdmcfont{IPAExMincho} \def\ltj@stdgtfont{IPAExGothic} diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty index cfff0f06b7c..ce566c30c8f 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty @@ -3,7 +3,7 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjfont}[2017/05/05 Patch to NFSS2 for LuaTeX-ja] +\ProvidesPackage{lltjfont}[2018/01/12 Patch to NFSS2 for LuaTeX-ja] \def\ltj@chardef@text@cmd#1{% \let\@ifdefinable\@@ifdefinable% @@ -320,6 +320,7 @@ } \def\ltj@selectfont@patch{% \directlua{luatexja.base.start_time_measure('selectfont')}% + \global\let\ltj@afont@name=\font@name \let\tmp@error@fontshape\error@fontshape \let\error@fontshape\error@kfontshape \directlua{luatexja.jfont.is_kyenc('\luatexluaescapestring{\k@encoding}')}\ifin@% @@ -374,6 +375,7 @@ % 警告: 再び \selectfont を呼んでいる.無限ループの可能性あり \fi \fi + \global\let\font@name=\ltj@afont@name \directlua{luatexja.base.stop_time_measure('selectfont')}% } \EverySelectfont{\ltj@selectfont@patch} diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-geometry.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-geometry.sty index 14e46b3bd67..678556e55ef 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-geometry.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-geometry.sty @@ -3,14 +3,25 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjp-geometry}[2017/05/05 Patch to geometry for LuaTeX-ja with vertical writing mode] -\RequirePackage{ifluatex} - +\ProvidesPackage{lltjp-geometry}[2018/01/19 Patch to geometry for LuaTeX-ja with vertical writing mode] \ifdefined\if@ltj@@geometry@tate\expandafter\endinput\fi \newif\if@ltj@@geometry@tate +\newif\if@ltj@@geometry@forceoff \@ltj@@geometry@tatefalse -\ifluatex\else % pTeX - \@ltj@@geometry@tatetrue +\@ltj@@geometry@forceofffalse +\DeclareOption{force}{\@ltj@@geometry@tatetrue} +\DeclareOption{disable}{\@ltj@@geometry@forceofftrue} + +\ProcessOptions\relax + +\RequirePackage{ifluatex} +\ifluatex + \ifdefined\luatexjaLoaded\else + \PackageError{lltjp-geometry}{% + lltjp-geometry does not work without luatexja. + }{} +\fi +\else % pTeX \def \AtBeginDvi #1{% \global \setbox \@begindvibox \vbox{\yoko\unvbox \@begindvibox #1}% @@ -30,9 +41,16 @@ \edef\Gm@ltj@footskip{\the\footskip} \ifluatex \ifnum\ltjgetparameter{direction}=3 \@ltj@@geometry@tatetrue\fi +\else + \@gobble\iftrue\csname iftdir\endcsname\@ltj@@geometry@tatetrue\fi \fi +\patchcmd\@begindocumenthook{\tate}{\tate}{\@ltj@@geometry@tatetrue}{}% \if@ltj@@geometry@tate - \let\PackageWarningNoLine\@gobbletwo% 警告抑止 + \if@ltj@@geometry@forceoff + \@ltj@@geometry@tatefalse + \else + \let\PackageWarningNoLine\@gobbletwo% 警告抑止 + \fi \fi } \AtEndOfPackageFile{geometry}{% diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-preview.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-preview.sty index f8a90efa05f..cfd8e527e6f 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-preview.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-preview.sty @@ -3,14 +3,20 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjp-preview}[2017/05/08 Patch to preview for LuaTeX-ja] +\ProvidesPackage{lltjp-preview}[2018/01/20 Patch to preview for LuaTeX-ja] \RequirePackage{etoolbox,preview,luatexja} +\newbox\ltj@preview@box \patchcmd\pr@endbox{% \pr@ship@end }{% - \setbox\pr@box\hbox{\yoko\box\pr@box}\pr@ship@end + \setbox\ltj@preview@box=\box\AtBeginShipoutBox + \setbox\AtBeginShipoutBox=\vbox{\yoko\box\pr@box}% + \directlua{luatexja.direction.finalize()}% + \setbox\pr@box=\box\AtBeginShipoutBox + \setbox\AtBeginShipoutBox=\box\ltj@preview@box + \pr@ship@end }{}{} \endinput diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-tascmac.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-tascmac.sty index b351cfe01d8..31cbef3e737 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-tascmac.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-tascmac.sty @@ -7,13 +7,28 @@ % \dimen...=\ybaselineshift ==> \dimen...=\ltj@yablshift sp \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjp-tascmac}[2017/05/05 Patch to (t)ascmac for LuaTeX-ja] +\ProvidesPackage{lltjp-tascmac}[2017/12/23 Patch to (t)ascmac for LuaTeX-ja] \RequirePackage{tascmac,luatexja} %% use Type1 font for ascgrp \pdfextension mapline{+ascgrp <ascgrp.pfb} +%% oval command +\def\ascmac@parse@ovarg#1{% + \ifnum\ltjgetparameter{direction}=3\relax + \def\ascmac@ovarg{}% + \@tfor\reserved@a:=#1\do{% + \if l\reserved@a \edef\ascmac@ovarg{\ascmac@ovarg t}% + \else\if t\reserved@a \edef\ascmac@ovarg{\ascmac@ovarg r}% + \else\if r\reserved@a \edef\ascmac@ovarg{\ascmac@ovarg b}% + \else\if b\reserved@a \edef\ascmac@ovarg{\ascmac@ovarg l}% + \fi\fi\fi\fi}% + \else + \def\ascmac@ovarg{#1}% + \fi +} + %% boxnote environment \def\boxnote{\par\vspace{.3\baselineskip}% \@saveybaselineshift\ltj@yablshift sp\ltj@yablshift\z@ diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty index 2642dd1e4f9..acca226a7f0 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty @@ -3,17 +3,15 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjp-unicode-math}[2017/11/12 Patch to unicode-math for LuaTeX-ja] +\ProvidesPackage{lltjp-unicode-math}[2018/01/14 Patch to unicode-math for LuaTeX-ja] -\RequirePackage{unicode-math,luatexja} +\RequirePackage{unicode-math,luatexja,etoolbox} \ExplSyntaxOn \group_begin: - \bool_new:N \lltjp_um_patch_mathgroup_bool - \bool_set_true:N \lltjp_um_patch_mathgroup_bool -%% Recent unicode-math (2017-10-02, v0.8g) does not have \ProvidesPackage, -%% So we can't use the date option of \@ifpackageloaded. + \bool_new:N \__lltjp_um_patch_mathgroup_bool + \bool_set_true:N \__lltjp_um_patch_mathgroup_bool \cs_gset:Nn \__um_define_math_chars: { \group_begin: \cs_set:Npn \__um_sym:nnn ##1##2##3 @@ -22,7 +20,7 @@ { \mathord \mathalpha \mathbin \mathrel \mathpunct \mathop \mathfence } {##3} { - \exp_last_unbraced:NNx \cs_gset_eq:NN ##2 { \Ucharcat ##1 ~ 12 ~ } + \exp_last_unbraced:NNx \cs_gset_eq:NN ##2 { \char_generate:nn {##1} {12} } \ltjsetmathletter{ ##1 } } } @@ -30,7 +28,7 @@ \group_end: } -\bool_if:NT \lltjp_um_patch_mathgroup_bool { +\bool_if:NT \__lltjp_um_patch_mathgroup_bool { \cs_gset:Npn \use@mathgroup #1 #2 { %\typeout{UM <#1><#2>} @@ -47,6 +45,49 @@ } \group_end: +\ifcsname jsc@mag@xrealtrue \endcsname \else + \expandafter\expandafter\expandafter \ExplSyntaxOff \expandafter \endinput +\fi +\ifjsc@mag@xreal + \cs_if_exist:cTF { ltjs@orig@get@external@font } { + % ltjsclasses: use lua + \cs_new:Nn \lltjp_um_unmag_fsize: + { + \cs_gset:Nx \lltjp_um_f@size: {\directlua{luatexja.ltjs_unmagnify_fsize(\f@size)}} + \cs_gset:Nx \lltjp_um_sf@size: {\directlua{luatexja.ltjs_unmagnify_fsize(\sf@size)}} + \cs_gset:Nx \lltjp_um_ssf@size: {\directlua{luatexja.ltjs_unmagnify_fsize(\ssf@size)}} + } + }{ + % bxjscls: use \jsc@preadjust@extract@font + \cs_new:Nn \lltjp_um_unmag_fsize: + { + \group_begin: + \jsc@preadjust@extract@font + \cs_gset_eq:NN \lltjp_um_f@size: \f@size + \group_end: + \group_begin: + \cs_set_eq:NN \f@size \sf@size \jsc@preadjust@extract@font + \cs_gset_eq:NN \lltjp_um_sf@size: \f@size + \group_end: + \group_begin: + \cs_set_eq:NN \f@size \ssf@size \jsc@preadjust@extract@font + \cs_gset_eq:NN \lltjp_um_ssf@size: \f@size + \group_end: + } + } + \pretocmd { \__um_fontspec_select_font: } { + \cs_set_eq:NN \lltjp_um_orig_fsize: \f@size + \lltjp_um_unmag_fsize: + \cs_set_eq:NN \f@size \lltjp_um_f@size: + \cs_set_eq:NN \tf@size \lltjp_um_f@size: + \cs_set_eq:NN \sf@size \lltjp_um_sf@size: + \cs_set_eq:NN \ssf@size \lltjp_um_ssf@size: + } {} {} + \apptocmd { \__um_fontspec_select_font: } { + \cs_set_eq:NN \f@size \lltjp_um_orig_fsize: + } {} {} +\fi + \ExplSyntaxOff \endinput |