summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/patches
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/patches')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec-immediate.sty131
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty137
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty10
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty20
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-stfloats.sty3
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty58
6 files changed, 165 insertions, 194 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec-immediate.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec-immediate.sty
deleted file mode 100644
index a0ee7b6dba4..00000000000
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec-immediate.sty
+++ /dev/null
@@ -1,131 +0,0 @@
-%
-% lltjp-fontspec-immediate.sty
-%
-
-\NeedsTeXFormat{LaTeX2e}
-%%% \ProvidesPackage{lltjp-fontspec-immediate}[2017/08/07 Patch to fontspec for LuaTeX-ja]
-
-\RequirePackage{fontspec,luatexja}
-\ExplSyntaxOn
-
-% <= v2.6g uses \l__fontspec_nfss_enc_tl instead of \g__fontspec_nfss_enc_tl
-\ifdefined \g__fontspec_nfss_enc_tl \else
- \def \g__fontspec_nfss_enc_tl { \l__fontspec_nfss_enc_tl }
-\fi
-
-%%%%%%%% fontspec v2.5c overwrites \rmfamily etc. in \setmainfont
-\@ifpackagelater{fontspec}{2018/07/29}{ %% 2.6h or later
-\cs_set:Nn \__fontspec_main_setmainfont:nn
- {
- \fontspec_set_family:Nnn \l__fontspec_rmfamily_family_tl {#1} {#2}
- \tl_set_eq:NN \rmdefault \l__fontspec_rmfamily_family_tl
- \use:x
- {
- \exp_not:n { \DeclareRobustCommand \rmfamily }
- {
- \exp_not:N \fontencoding { \g__fontspec_nfss_enc_tl }
- \exp_not:N \fontfamily { \l__fontspec_rmfamily_family_tl }
- \exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\mcdefault\exp_not:N\fi%%%
- \exp_not:N \selectfont
- }
- }
- \str_if_eq_x:nnT {\familydefault} {\rmdefault}
- { \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
- \__fontspec_setmainfont_hook:nn {#1} {#2}
- \normalfont
- }
-\cs_set:Nn \__fontspec_main_setsansfont:nn
- {
- \fontspec_set_family:Nnn \l__fontspec_sffamily_family_tl {#1} {#2}
- \tl_set_eq:NN \sfdefault \l__fontspec_sffamily_family_tl
- \use:x
- {
- \exp_not:n { \DeclareRobustCommand \sffamily }
- {
- \exp_not:N \fontencoding { \g__fontspec_nfss_enc_tl }
- \exp_not:N \fontfamily { \l__fontspec_sffamily_family_tl }
- \exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\gtdefault\exp_not:N\fi%%%
- \exp_not:N \selectfont
- }
- }
- \str_if_eq_x:nnT {\familydefault} {\sfdefault}
- { \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
- \__fontspec_setsansfont_hook:nn {#1} {#2}
- \normalfont
- }
-\cs_set:Nn \__fontspec_main_setmonofont:nn
- {
- \fontspec_set_family:Nnn \l__fontspec_ttfamily_family_tl {#1} {#2}
- \tl_set_eq:NN \ttdefault \l__fontspec_ttfamily_family_tl
- \use:x
- {
- \exp_not:n { \DeclareRobustCommand \ttfamily }
- {
- \exp_not:N \fontencoding { \g__fontspec_nfss_enc_tl }
- \exp_not:N \fontfamily { \l__fontspec_ttfamily_family_tl }
- \exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\jttdefault\exp_not:N\fi%%%
- \exp_not:N \selectfont
- }
- }
- \str_if_eq_x:nnT {\familydefault} {\ttdefault}
- { \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
- \__fontspec_setmonofont_hook:nn {#1} {#2}
- \normalfont
- }
-}{ %% <= 2.6g
-\DeclareDocumentCommand \setmainfont { O{} m O{} }
- {
- \fontspec_set_family:Nnn \g__fontspec_rmfamily_family {#1,#3} {#2}
- \tl_set_eq:NN \rmdefault \g__fontspec_rmfamily_family
- \use:x { \exp_not:n { \DeclareRobustCommand \rmfamily }
- {
- \exp_not:N \fontencoding { \g__fontspec_nfss_enc_tl }
- \exp_not:N \fontfamily { \g__fontspec_rmfamily_family }
- \exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\mcdefault\exp_not:N\fi%%%
- \exp_not:N \selectfont
- }
- }
- \str_if_eq_x:nnT {\familydefault} {\rmdefault}
- { \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
- \normalfont
- \ignorespaces
- }
-\DeclareDocumentCommand \setsansfont { O{} m O{} }
- {
- \fontspec_set_family:Nnn \g__fontspec_sffamily_family {#1,#3} {#2}
- \tl_set_eq:NN \sfdefault \g__fontspec_sffamily_family
- \use:x { \exp_not:n { \DeclareRobustCommand \sffamily }
- {
- \exp_not:N \fontencoding { \g__fontspec_nfss_enc_tl }
- \exp_not:N \fontfamily { \g__fontspec_sffamily_family }
- \exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\gtdefault\exp_not:N\fi%%%
- \exp_not:N \selectfont
- }
- }
- \str_if_eq_x:nnT {\familydefault} {\sfdefault}
- { \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
- \normalfont
- \ignorespaces
- }
-\DeclareDocumentCommand \setmonofont { O{} m O{} }
- {
- \fontspec_set_family:Nnn \g__fontspec_ttfamily_family {#1,#3} {#2}
- \tl_set_eq:NN \ttdefault \g__fontspec_ttfamily_family
- \use:x { \exp_not:n { \DeclareRobustCommand \ttfamily }
- {
- \exp_not:N \fontencoding { \g__fontspec_nfss_enc_tl }
- \exp_not:N \fontfamily { \g__fontspec_ttfamily_family }
- \exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\jttdefault\exp_not:N\fi%%%
- \exp_not:N \selectfont
- }
- }
- \str_if_eq_x:nnT {\familydefault} {\ttdefault}
- { \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
- \normalfont
- \ignorespaces
- }
-}
-\ExplSyntaxOff
-\expandafter\patchcmd\csname TU\string\textasteriskcentered\endcsname{\char}{\ltjalchar}{}{}
-\endinput
-
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty
index 4db2ffe8a4c..32e4ef0b8ab 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty
@@ -1,28 +1,137 @@
%
-% lltjp-fontspec.sty
+% lltjp-fontspec.sty 2018-08-24
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-fontspec}[2017/08/07 Patch to fontspec for LuaTeX-ja]
\RequirePackage{fontspec,luatexja}
\ExplSyntaxOn
-\@ifpackagelater{fontspec}{2017/01/01}{
- \cs_set:Nn \fontspec_visible_space:
+% <= v2.6g uses \l__fontspec_nfss_enc_tl instead of \g__fontspec_nfss_enc_tl
+\ifdefined \g__fontspec_nfss_enc_tl \else
+ \def \g__fontspec_nfss_enc_tl { \l__fontspec_nfss_enc_tl }
+\fi
+
+%%%%%%%% fontspec v2.5c overwrites \rmfamily etc. in \setmainfont
+\@ifpackagelater{fontspec}{2018/07/29}{ %% 2.6h or later
+\cs_set:Nn \__fontspec_main_setmainfont:nn
+ {
+ \fontspec_set_family:Nnn \l__fontspec_rmfamily_family_tl {#1} {#2}
+ \tl_set_eq:NN \rmdefault \l__fontspec_rmfamily_family_tl
+ \use:x
+ {
+ \exp_not:n { \DeclareRobustCommand \rmfamily }
+ {
+ \exp_not:N \fontencoding { \g__fontspec_nfss_enc_tl }
+ \exp_not:N \fontfamily { \l__fontspec_rmfamily_family_tl }
+ \exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\mcdefault\exp_not:N\fi%%%
+ \exp_not:N \selectfont
+ }
+ }
+ \str_if_eq_x:nnT {\familydefault} {\rmdefault}
+ { \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
+ \__fontspec_setmainfont_hook:nn {#1} {#2}
+ \normalfont
+ }
+\cs_set:Nn \__fontspec_main_setsansfont:nn
+ {
+ \fontspec_set_family:Nnn \l__fontspec_sffamily_family_tl {#1} {#2}
+ \tl_set_eq:NN \sfdefault \l__fontspec_sffamily_family_tl
+ \use:x
+ {
+ \exp_not:n { \DeclareRobustCommand \sffamily }
+ {
+ \exp_not:N \fontencoding { \g__fontspec_nfss_enc_tl }
+ \exp_not:N \fontfamily { \l__fontspec_sffamily_family_tl }
+ \exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\gtdefault\exp_not:N\fi%%%
+ \exp_not:N \selectfont
+ }
+ }
+ \str_if_eq_x:nnT {\familydefault} {\sfdefault}
+ { \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
+ \__fontspec_setsansfont_hook:nn {#1} {#2}
+ \normalfont
+ }
+\cs_set:Nn \__fontspec_main_setmonofont:nn
+ {
+ \fontspec_set_family:Nnn \l__fontspec_ttfamily_family_tl {#1} {#2}
+ \tl_set_eq:NN \ttdefault \l__fontspec_ttfamily_family_tl
+ \use:x
+ {
+ \exp_not:n { \DeclareRobustCommand \ttfamily }
+ {
+ \exp_not:N \fontencoding { \g__fontspec_nfss_enc_tl }
+ \exp_not:N \fontfamily { \l__fontspec_ttfamily_family_tl }
+ \exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\jttdefault\exp_not:N\fi%%%
+ \exp_not:N \selectfont
+ }
+ }
+ \str_if_eq_x:nnT {\familydefault} {\ttdefault}
+ { \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
+ \__fontspec_setmonofont_hook:nn {#1} {#2}
+ \normalfont
+ }
+}{ %% <= 2.6g
+\DeclareDocumentCommand \setmainfont { O{} m O{} }
+ {
+ \fontspec_set_family:Nnn \g__fontspec_rmfamily_family {#1,#3} {#2}
+ \tl_set_eq:NN \rmdefault \g__fontspec_rmfamily_family
+ \use:x { \exp_not:n { \DeclareRobustCommand \rmfamily }
+ {
+ \exp_not:N \fontencoding { \g__fontspec_nfss_enc_tl }
+ \exp_not:N \fontfamily { \g__fontspec_rmfamily_family }
+ \exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\mcdefault\exp_not:N\fi%%%
+ \exp_not:N \selectfont
+ }
+ }
+ \str_if_eq_x:nnT {\familydefault} {\rmdefault}
+ { \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
+ \normalfont
+ \ignorespaces
+ }
+\DeclareDocumentCommand \setsansfont { O{} m O{} }
+ {
+ \fontspec_set_family:Nnn \g__fontspec_sffamily_family {#1,#3} {#2}
+ \tl_set_eq:NN \sfdefault \g__fontspec_sffamily_family
+ \use:x { \exp_not:n { \DeclareRobustCommand \sffamily }
{
- \__fontspec_primitive_font_glyph_if_exist:NnTF \font {"2423}
- { \ltjalchar"2423\scan_stop: }
- { \fontspec_visible_space_fallback: }
+ \exp_not:N \fontencoding { \g__fontspec_nfss_enc_tl }
+ \exp_not:N \fontfamily { \g__fontspec_sffamily_family }
+ \exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\gtdefault\exp_not:N\fi%%%
+ \exp_not:N \selectfont
}
-}{
- \cs_set:Nn \fontspec_visible_space:
+ }
+ \str_if_eq_x:nnT {\familydefault} {\sfdefault}
+ { \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
+ \normalfont
+ \ignorespaces
+ }
+\DeclareDocumentCommand \setmonofont { O{} m O{} }
+ {
+ \fontspec_set_family:Nnn \g__fontspec_ttfamily_family {#1,#3} {#2}
+ \tl_set_eq:NN \ttdefault \g__fontspec_ttfamily_family
+ \use:x { \exp_not:n { \DeclareRobustCommand \ttfamily }
{
- \font_glyph_if_exist:NnTF \font {"2423}
- { \ltjalchar"2423\scan_stop: }
- { \fontspec_visible_space_fallback: }
+ \exp_not:N \fontencoding { \g__fontspec_nfss_enc_tl }
+ \exp_not:N \fontfamily { \g__fontspec_ttfamily_family }
+ \exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\jttdefault\exp_not:N\fi%%%
+ \exp_not:N \selectfont
}
+ }
+ \str_if_eq_x:nnT {\familydefault} {\ttdefault}
+ { \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
+ \normalfont
+ \ignorespaces
+ }
}
+
+\cs_set:Nn \fontspec_visible_space:
+ {
+ \__fontspec_primitive_font_glyph_if_exist:NnTF \font {"2423}
+ { \ltjalchar"2423\scan_stop: }
+ { \fontspec_visible_space_fallback: }
+ }
+
\def\verb
{
\relax\ifmmode\hbox\else\leavevmode\fi % same as lltjcore
@@ -32,11 +141,11 @@
\@ifstar\__fontspecsverb\@verb
}
-
-%%%%%%%% shapes in \em
\cs_set:Npn \emshape { \gtfamily \itshape }
\cs_set:Npn \eminnershape { \mcfamily \upshape }
\ExplSyntaxOff
\expandafter\patchcmd\csname TU\string\textasteriskcentered\endcsname{\char}{\ltjalchar}{}{}
+
\endinput
+
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 e0470a2cbee..abcf05b9e79 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty
@@ -1,9 +1,8 @@
%
-% lltjp-listings.sty
+% lltjp-listings.sty 2018-08-25
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-listings}[2017/05/05 Patch to listings for LuaTeX-ja]
\RequirePackage{listings,luatexbase-cctb}
%%%%%%%%%%%%%%%% Japanese support
@@ -387,6 +386,13 @@
\fi}}
\endgroup
+%%%%%%%%%%%%%%%% texcl
+\lst@AddToHook{AfterBeginComment}
+ {\ifnum\lst@mode=\lst@TeXLmode
+ \catcode`\^^M=13\relax
+ \catcode\ltjlineendcomment=9\relax
+ \fi}
+
%%%%%%%%%%%%%%%%
\lstloadaspects{writefile}
\begingroup \catcode`\^^I=11
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty
index 738760c1bba..d629fd3cb1e 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty
@@ -1,5 +1,5 @@
%
-% lltjp-siunitx.sty
+% lltjp-siunitx.sty 2018-08-24
%
\NeedsTeXFormat{LaTeX2e}
@@ -18,17 +18,13 @@
\__ltj_siunix_patch_inner:n { l__siunitx_#1_math }
\__ltj_siunix_patch_inner:n { l__siunitx_#1_text }
}
-\cs_new:Nn \__ltj_siunitx_patch: {
- \AtBeginDocument {
- \__ltj_siunix_patch_inner:n { c__siunitx_minus }
- \__ltj_siunix_patch_inner:n { c__siunitx_mu }
- \__ltj_siunix_patch_inner_math:n { angstrom }
- \__ltj_siunix_patch_inner_math:n { arcminute }
- \__ltj_siunix_patch_inner_math:n { arcsecond }
- \__ltj_siunix_patch_inner_math:n { ohm }
- }
+\AtBeginDocument {
+ \__ltj_siunix_patch_inner:n { c__siunitx_minus }
+ \__ltj_siunix_patch_inner:n { c__siunitx_mu }
+ \__ltj_siunix_patch_inner_math:n { angstrom }
+ \__ltj_siunix_patch_inner_math:n { arcminute }
+ \__ltj_siunix_patch_inner_math:n { arcsecond }
+ \__ltj_siunix_patch_inner_math:n { ohm }
}
-\ifdefined\ltj@patch@siunitx@executed\__ltj_siunitx_patch:\fi
-
\ExplSyntaxOff
\endinput
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-stfloats.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-stfloats.sty
index 34228479510..6f7590c2a4d 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-stfloats.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-stfloats.sty
@@ -1,9 +1,8 @@
%
-% lltjp-stfloats.sty
+% lltjp-stfloats.sty 2017-05-05
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-stfloats}[2017/05/05 Patch to stfloats for LuaTeX-ja]
\RequirePackage{stfloats,luatexja}
\RequirePackage{etoolbox}
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 acca226a7f0..9c8bbfca9f9 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
@@ -1,49 +1,41 @@
%
-% lltjp-unicode-math.sty
+% lltjp-unicode-math.sty 2018-08-24
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-unicode-math}[2018/01/14 Patch to unicode-math for LuaTeX-ja]
\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
- \cs_gset:Nn \__um_define_math_chars: {
- \group_begin:
- \cs_set:Npn \__um_sym:nnn ##1##2##3
- {
- \tl_if_in:nnT
- { \mathord \mathalpha \mathbin \mathrel \mathpunct \mathop \mathfence }
- {##3}
- {
- \exp_last_unbraced:NNx \cs_gset_eq:NN ##2 { \char_generate:nn {##1} {12} }
- \ltjsetmathletter{ ##1 }
- }
- }
- \__um_input_math_symbol_table:
- \group_end:
- }
-
-\bool_if:NT \__lltjp_um_patch_mathgroup_bool {
- \cs_gset:Npn \use@mathgroup #1 #2
- {
- %\typeout{UM <#1><#2>}
- \mode_if_math:T % <- not sure if this is really necessary since we've just checked for mmode and raised an error if not!
+\cs_set:Nn \__um_define_math_chars: {
+ \group_begin:
+ \cs_set:Npn \__um_sym:nnn ##1##2##3
{
- \math@bgroup
- \cs_if_eq:cNF {M@\f@encoding} #1 {#1}
- \__um_switchto_literal:
- \ltj@tempcnta=#2 \expandafter\ltj@@mathJapaneseFonts\string#1\relax%
- \ifin@ \jfam #2 \relax \else \mathgroup #2 \relax \fi
- \math@egroup
+ \ltjsetmathletter{ ##1 }
+ \tl_if_in:nnT
+ { \mathord \mathalpha \mathbin \mathrel \mathpunct \mathop \mathfence }
+ {##3}
+ {
+ \exp_last_unbraced:NNx \cs_gset_eq:NN ##2 { \char_generate:nn {##1} {12} }
+ }
}
+ \__um_input_math_symbol_table:
+ \group_end:
+}
+\cs_set:Npn \use@mathgroup #1 #2
+{
+ %\typeout{UM <#1><#2>}
+ \mode_if_math:T % <- not sure
+ {
+ \math@bgroup
+ \cs_if_eq:cNF {M@\f@encoding} #1 {#1}
+ \__um_switchto_literal:
+ \ltj@tempcnta=#2 \expandafter\ltj@@mathJapaneseFonts\string#1\relax%
+ \ifin@ \jfam #2 \relax \else \mathgroup #2 \relax \fi
+ \math@egroup
}
}
-\group_end:
\ifcsname jsc@mag@xrealtrue \endcsname \else
\expandafter\expandafter\expandafter \ExplSyntaxOff \expandafter \endinput