diff options
Diffstat (limited to 'macros/luatex/generic/luatexja/src')
15 files changed, 342 insertions, 200 deletions
diff --git a/macros/luatex/generic/luatexja/src/lltjext.sty b/macros/luatex/generic/luatexja/src/lltjext.sty index fa3d0720b0..9fe18f4f01 100644 --- a/macros/luatex/generic/luatexja/src/lltjext.sty +++ b/macros/luatex/generic/luatexja/src/lltjext.sty @@ -3,7 +3,7 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjext}[2019/09/25 v1.2k-ltj-11 Macros for vertical writing] +\ProvidesPackage{lltjext}[2020-09-30 v1.2k-ltj-12 Macros for vertical writing] \RequirePackage{luatexja} \newcount\ltj@ext@dir \let\ltj@lltjext@orig@tabular=\tabular @@ -538,9 +538,17 @@ \else \let\box@dir\utod \fi \fi +\ifltj@ltfilehook@avail % LaTeX2e >= 2020-10-01 + \@defaultunitsset\@picht{#3}\unitlength + \@defaultunitsset\@picwd{#2}\unitlength + \setbox\@picbox\hbox to\@picwd\bgroup\box@dir + \@defaultunitsset\@tempdimc{#4}\unitlength\hskip-\@tempdimc + \@defaultunitsset\@tempdimc{#5}\unitlength\lower\@tempdimc\hbox\bgroup +\else % <= 2020-02-02 \@picwd=#2\unitlength \@picht=#3\unitlength \setbox\@picbox\hbox to\@picwd\bgroup\box@dir \hskip-#4\unitlength\lower#5\unitlength\hbox\bgroup +\fi \ltj@@pic@reset@blshift \ignorespaces} \def\endpicture{% diff --git a/macros/luatex/generic/luatexja/src/ltj-jfmglue.lua b/macros/luatex/generic/luatexja/src/ltj-jfmglue.lua index 84249a7ad1..0bbf7249e5 100644 --- a/macros/luatex/generic/luatexja/src/ltj-jfmglue.lua +++ b/macros/luatex/generic/luatexja/src/ltj-jfmglue.lua @@ -178,7 +178,7 @@ local function check_box(box_ptr, box_end) local pid = getid(p) if pid==id_kern and getsubtype(p)==2 then p = node_next(node_next(node_next(p))); pid = getid(p) -- p must be glyph_node - end + end if pid==id_glyph then repeat if find_first_char then first_char = p; find_first_char = false end @@ -268,7 +268,7 @@ local function check_next_ickern(lp) local lx = Np.nuc while lp and getid(lp) == id_kern and ( getsubtype(lp)==0 or getsubtype(lp)==3 or ITALIC == get_attr_icflag(lp)) do - set_attr(lp, attr_icflag, IC_PROCESSED); + set_attr(lp, attr_icflag, IC_PROCESSED) lx, lp = lp, node_next(lp) end Np.last = lx; return lp @@ -279,7 +279,7 @@ local function calc_np_pbox(lp, last) --local lpa = get_attr_icflag(lp)==PACKED and PACKED or KINSOKU -- KINSOKU: dummy local lpa = get_attr_icflag(lp) Np.first = Np.first or lp; Np.id = id_pbox - set_attr(lp, attr_icflag, get_attr_icflag(lp)); + set_attr(lp, attr_icflag, get_attr_icflag(lp)) while lp ~=last and (lpa>=PACKED) and (lpa<BOXBDD) do local lpi = getid(lp) if lpa==PACKED then @@ -340,9 +340,9 @@ function calc_np_aux_glyph_common(lp, acc_flag) local y_adjust = has_attr(lp,attr_ablshift) or 0 local node_depth = getfield(lp, 'depth') + min(y_adjust, 0) local adj_depth = (y_adjust>0) and (getfield(lp, 'depth') + y_adjust) or 0 - setfield(lp, 'yoffset', getfield(lp, 'yoffset') - y_adjust) - lp = node_next(lp) - for lx in traverse(lp) do + setfield(lp, 'yoffset', getfield(lp, 'yoffset') - y_adjust); lp = node_next(lp) + local lx=lp + while lx do local lai = get_attr_icflag(lx) if lx==last or lai>=PACKED then lp=lx; break @@ -354,7 +354,7 @@ function calc_np_aux_glyph_common(lp, acc_flag) y_adjust = has_attr(lx,attr_ablshift) or 0 node_depth = max(getfield(lx, 'depth') + min(y_adjust, 0), node_depth) adj_depth = (y_adjust>0) and max(getfield(lx, 'depth') + y_adjust, adj_depth) or adj_depth - setfield(lx, 'yoffset', getfield(lx, 'yoffset') - y_adjust) + setfield(lx, 'yoffset', getfield(lx, 'yoffset') - y_adjust); lx = node_next(lx) elseif lid==id_kern then local ls = getsubtype(lx) if ls==2 then -- アクセント用の kern @@ -367,9 +367,9 @@ function calc_np_aux_glyph_common(lp, acc_flag) end lx = node_next(node_next(lx)) elseif ls==0 then - Np.last = lx + Np.last = lx; lx = node_next(lx) elseif (ls==3) or (lai==ITALIC) then - Np.last = lx; set_attr(lx, attr_icflag, IC_PROCESSED) + Np.last = lx; set_attr(lx, attr_icflag, IC_PROCESSED); lx = node_next(lx) else lp=lx; break end @@ -1235,8 +1235,6 @@ end -- main interface function luatexja.jfmglue.main(ahead, mode, dir) if not ahead then return ahead end - --luatexja.ext_show_node_list(to_node(ahead ), '>B ', print) - --print() head = ahead; local lp, last, par_indented, TEMP = init_var(mode,dir) lp = calc_np(last, lp) diff --git a/macros/luatex/generic/luatexja/src/ltj-jfont.lua b/macros/luatex/generic/luatexja/src/ltj-jfont.lua index d95b34a511..6b7667a0d1 100644 --- a/macros/luatex/generic/luatexja/src/ltj-jfont.lua +++ b/macros/luatex/generic/luatexja/src/ltj-jfont.lua @@ -280,6 +280,7 @@ end ------------------------------------------------------------------------ local load_jfont_metric, check_callback_order +local font_extra_info = {} -- defined later do local cstemp local global_flag -- true if \globaljfont, false if \jfont @@ -314,6 +315,7 @@ do luatexbase.create_callback("luatexja.define_jfont", "data", function (ft, fn) return ft end) -- EXT + local fastcopy=table.fastcopy function luatexja.jfont.jfontdefY() local j = load_jfont_metric(jfm_dir) local fn = font.id(cstemp) @@ -337,9 +339,13 @@ do kanjiskip = sz.kanjiskip, xkanjiskip = sz.xkanjiskip, chars_cbcache = {}, vert_activated = vert_activated, + rotation = fastcopy(font_extra_info[fn].rotation), } if auto_enable_vrt2 then - ltju.enable_feature(fn, ltju.exist_feature(fn, 'vrt2') and 'vrt2' or 'vert') + local vert_name = ltju.exist_feature(fn, 'vrt2') and 'vrt2' or 'vert' + local rot = fmtable.rotation + ltju.enable_feature(fn, vert_name) + ltju.loop_over_feat(f, {[vert_name]=true}, function (i,k) rot[i] = nil end) end fmtable = luatexbase.call_callback("luatexja.define_jfont", fmtable, fn) @@ -775,8 +781,7 @@ end ------------------------------------------------------------------------ -- 追加のフォント情報 ------------------------------------------------------------------------ -local font_extra_info = {} -luatexja.jfont.font_extra_info= font_extra_info -- key: fontnumber +luatexja.jfont.font_extra_info = font_extra_info -- key: fontnumber local font_extra_basename = {} -- key: basename local list_rotate_glyphs @@ -794,7 +799,6 @@ do end return lo%2==1 end - local vert_vrt2 = { vert=true, vrt2 = true } local function list_rorate_dup (i, v, dest) local f = dest[i] if not f then @@ -807,7 +811,6 @@ do for i,_ in pairs(tfmdata.characters) do if rotate_in_uax50(i) then rot[i] = true end end - ltju.loop_over_feat(tfmdata, vert_vrt2, function (i,k) rot[i] = nil end) -- ↓「TeX Live 2019のLuaLaTeXで縦書きの三点リーダーが横書きになる」 -- (https://oku.edu.mie-u.ac.jp/tex/mod/forum/discuss.php?d=2722) により無効化 -- -- 同じグリフが複数の Unicode ポイントを持っている場合. @@ -829,7 +832,7 @@ do end do - local cache_ver = 22 + local cache_ver = 23 local nameonly, lower = file.nameonly, string.lower local lfs = require"lfs" local file_attributes = lfs.attributes @@ -870,12 +873,23 @@ do return bname end end + local dummytable = { } -- dummy + local dtvo, dtvh = {}, {} + setmetatable(dtvo, {__index = function () return 0.88 end } ) + setmetatable(dtvh, {__index = function () return 1 end } ) + ltjr.vert_addfunc = function(id, s) + if not dummytable.rotation then + dummytable = list_rotate_glyphs(s, dummytable) + dummytable.vorigin, dummytable.vheight = dtvo, dtvh + end + end + local function prepare_extra_data_font(id, res) if type(res)=='table' and (res.psname or res.filename) then local bname = res.psname or nameonly(res.filename) local t = font_extra_basename[bname] if not t then bname = prepare_extra_data_base(res) end - font_extra_info[id] = t or font_extra_basename[bname] + font_extra_info[id] = bname and (t or font_extra_basename[bname]) or dummytable end end luatexbase.add_to_callback( @@ -892,9 +906,6 @@ do end, 'ltj.prepare_extra_data', 1) - local nulltable = {} -- dummy - ltjr.vert_addfunc = function (n) font_extra_info[n] = nulltable end - for i=1,font.nextid()-1 do local t = font.getfont(i) if t then diff --git a/macros/luatex/generic/luatexja/src/ltj-latex.sty b/macros/luatex/generic/luatexja/src/ltj-latex.sty index 55fd5d4ebd..834f16e70a 100644 --- a/macros/luatex/generic/luatexja/src/ltj-latex.sty +++ b/macros/luatex/generic/luatexja/src/ltj-latex.sty @@ -12,7 +12,7 @@ \def\luatexjalatexLoaded{\endinput} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ltj-latex}[2020-08-08 LaTeX support of LuaTeX-ja] +\ProvidesPackage{ltj-latex}[2020-10-01 LaTeX support of LuaTeX-ja] % cleanup at end of the document %\let\ltj@@orig@end=\@@end @@ -21,17 +21,23 @@ \endlinechar=13 +%%% LaTeX version detection +\ifcsname tex_shipout:D\endcsname + \expandafter\let\csname tex_shipout:D\endcsname\ltj@shipout +\fi +\newif\ifltj@ltfilehook@avail +\@ifl@t@r\fmtversion{2020-10-01}{% + \ifnum\patch@level<0\relax \ifnum\patch@level<-6 \ltj@ltfilehook@availtrue\fi + \else\ltj@ltfilehook@availtrue\fi +}{} + %%% patch for LaTeX \usepackage{lltjfont} \usepackage{lltjdefs} \usepackage{lltjcore} +\RequirePackage{lltjp-atbegshi} %%% patching commands -\newif\ifltj@ltfilehook@avail -\@ifl@t@r\fmtversion{2020-10-01}{% - \ifnum\patch@level<0\relax \ifnum\patch@level<-6 \ltj@ltfilehook@availtrue\fi - \else\ltj@ltfilehook@availtrue\fi -}{} \ifltj@ltfilehook@avail \def\@@ltj@ExecuteAfterPackage#1{\AddToHook{package/after/#1}} \def\@@ltj@ExecuteBeforePackage#1{\AddToHook{package/before/#1}} @@ -80,15 +86,17 @@ \ltj@pkgpatch{tascmac} \ltj@pkgpatch{ascmac}[lltjp-tascmac] \ltj@pkgpatch@im{stfloats} -\ltj@pkgpatch{preview} %% at \begin{document} +\ifltj@ltfilehook@avail\else + \ltj@pkgpatch{preview} %% at \begin{document} % (preview package has delayed option) +\fi \ltj@pkgpatch{array} %% at \begin{document} \ltj@pkgpatch{collcell} %% at \begin{document} \ltj@pkgpatch@im{unicode-math} \ltj@pkgpatch@im{siunitx} \ltj@pkgpatch@im{microtype} -\ifltj@ltshipout@avail\else\ltj@pkgpatch@im{everyshi}\fi +\ifltj@ltfilehook@avail\else\ltj@pkgpatch@im{everyshi}\fi \RequirePackage{lltjp-geometry} diff --git a/macros/luatex/generic/luatexja/src/ltj-rmlgbm.lua b/macros/luatex/generic/luatexja/src/ltj-rmlgbm.lua index 53f5b0136a..499d3eda4a 100644 --- a/macros/luatex/generic/luatexja/src/ltj-rmlgbm.lua +++ b/macros/luatex/generic/luatexja/src/ltj-rmlgbm.lua @@ -291,7 +291,6 @@ local function mk_rml(name, size, id) local fontdata = {} local cachedata = {} local s = cidfont_data[cid_name] - luatexja.rmlgbm.vert_addfunc(id) for k, v in pairs(s) do fontdata[k] = v cachedata[k] = v @@ -328,6 +327,7 @@ local function mk_rml(name, size, id) fontdata.characters = cache_chars[cid_name][size] cachedata.characters = cache_chars[cid_name][size] end + luatexja.rmlgbm.vert_addfunc(id, fontdata) -- other parameters do diff --git a/macros/luatex/generic/luatexja/src/ltj-setwidth.lua b/macros/luatex/generic/luatexja/src/ltj-setwidth.lua index 372a0e0412..c502e9879e 100644 --- a/macros/luatex/generic/luatexja/src/ltj-setwidth.lua +++ b/macros/luatex/generic/luatexja/src/ltj-setwidth.lua @@ -189,8 +189,8 @@ local function capsule_glyph_tate(p, met, char_data, head, dir) do local pf, pc = getfont(p), getchar(p) local feir = ltjf_font_extra_info[pf] - if feir and feir.rotation and met.vert_activated then - if feir.rotation[pc] and (has_attr(p, attr_vert_ori) or 0)<=0 then + if met.rotation and met.vert_activated then + if met.rotation[pc] and (has_attr(p, attr_vert_ori) or 0)<=0 then return capsule_glyph_tate_rot(p, met, char_data, head, dir, 0.5*(get_ascender(pf)-get_descender(pf))) end diff --git a/macros/luatex/generic/luatexja/src/ltjclasses.dtx b/macros/luatex/generic/luatexja/src/ltjclasses.dtx index a868bcb58e..a9c24bb5b9 100644 --- a/macros/luatex/generic/luatexja/src/ltjclasses.dtx +++ b/macros/luatex/generic/luatexja/src/ltjclasses.dtx @@ -134,6 +134,9 @@ % 句読点を「、」「。」に統一。} % \changes{v1.8e-ltj-19}{2020/07/27}{|everyshi|パッケージへのパッチを別パッケージへ分離。} % \changes{v1.8e-ltj-20}{2020/08/03}{\LaTeX~2020-10-01への対応.} +% \changes{v1.8f}{2020/09/30}{add a fourth argument for better +% hyperref compability +% (sync with ltsect.dtx 2020/07/27 v1.1e)} % \fi % % \iffalse @@ -163,7 +166,7 @@ %<11pt&bk>\ProvidesFile{ltjtbk11.clo} %<12pt&bk>\ProvidesFile{ltjtbk12.clo} %</tate> - [2020/07/27 v1.8e-ltj-19 + [2020-09-30 v1.8f-ltj-20 %<article|report|book> Standard LuaLaTeX-ja class] %<10pt|11pt|12pt> Standard LuaLaTeX-ja file (size option)] %<*driver> @@ -4140,21 +4143,23 @@ % % \begin{macro}{\addcontentsline} % 縦組の場合にページ番号を|\rensuji|で囲むように変更します。 -% ^^A 横組のときにも`|\rensuji|'コマンドが出力されますが、 -% ^^A このコマンドによる影響はありません。 % % このマクロは\file{ltsect.dtx}で定義されています。 +% ^^A 命令 |\addcontentsline| と |\addtocontents| を組み合わせ % \changes{v1.8a}{2018/10/25}{ファイル書き出し時の行末文字対策 % (sync with ltsect.dtx 2018/09/26 v1.1c)} +% \changes{v1.8f}{2020/09/30}{add a fourth argument for better +% hyperref compability +% (sync with ltsect.dtx 2020/07/27 v1.1e)} % \begin{macrocode} \providecommand*\protected@file@percent{} \def\addcontentsline#1#2#3{% \protected@write\@auxout {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble -%<tate> \@temptokena{\rensuji{\thepage}}}% -%<yoko> \@temptokena{\thepage}}% - {\string\@writefile{#1}% - {\protect\contentsline{#2}{#3}{\the\@temptokena}% +%<tate> \@temptokena{\rensuji{\thepage}}% +%<yoko> \@temptokena{\thepage}% + }{\string\@writefile{#1}% + {\protect\contentsline{#2}{#3}{\the\@temptokena}{}% \protected@file@percent}}% } % \end{macrocode} diff --git a/macros/luatex/generic/luatexja/src/luatexja-core.sty b/macros/luatex/generic/luatexja/src/luatexja-core.sty index fee1a78a2f..5cbf4e8da9 100644 --- a/macros/luatex/generic/luatexja/src/luatexja-core.sty +++ b/macros/luatex/generic/luatexja/src/luatexja-core.sty @@ -65,7 +65,7 @@ \expandafter\let\csname ifltj@in@latex\expandafter\endcsname \csname iftrue\endcsname \NeedsTeXFormat{LaTeX2e} - \ProvidesPackage{luatexja-core}[2020-08-08 Core of LuaTeX-ja] + \ProvidesPackage{luatexja-core}[2020-09-27 Core of LuaTeX-ja] \fi %</LaTeX> %% Load prerequisite packages. @@ -79,7 +79,6 @@ \RequirePackage{pdftexcmds} [2011/11/29] % v0.20 \RequirePackage{xkeyval} [2012/10/14] % v2.6b \RequirePackage{etoolbox} - \RequirePackage{lltjp-atbegshi} \IfFileExists{everyhook.sty}{\RequirePackage{everyhook}\ltj@everyhook@availtrue}{} \else %<*!LaTeX> \input luatexbase.sty @@ -650,7 +649,7 @@ \aftergroup\ltj@@reset@badness\the\ltj@@i@everyvbox} \fi -\protected\def\ltj@@reset@badness{\luafunction\ltj@@reset@badness@inner} +\luadef\ltj@@reset@badness\ltj@@reset@badness@inner %%%% \raise, \lower, \moveleft, \moveright \newluafunction\ltj@@lua@raisebox@inner @@ -698,12 +697,7 @@ \protected\luadef\ltj@@lua@shipout\ltj@@lua@shipout@inner \protected\def\ltj@shipout{\ltj@afterbox\ltj@@lua@shipout} \ifprimitive\shipout\let\shipout\ltj@shipout\fi -\ifcsname tex_shipout:D\endcsname - \expandafter\let\csname tex_shipout:D\endcsname\ltj@shipout -\fi -\ifdefined\AtBeginShipoutOriginalShipout - \let\AtBeginShipoutOriginalShipout\ltj@shipout -\fi + %%%% \unhbox and \unvbox \newluafunction\ltj@@lua@unboxcheckdir@inner \directlua{ diff --git a/macros/luatex/generic/luatexja/src/luatexja.lua b/macros/luatex/generic/luatexja/src/luatexja.lua index be2b285880..1c039a7d9f 100644 --- a/macros/luatex/generic/luatexja/src/luatexja.lua +++ b/macros/luatex/generic/luatexja/src/luatexja.lua @@ -83,6 +83,11 @@ dir_table.dir_utod = dir_table.dir_tate + dir_table.dir_math_mod local load_module = luatexja.load_module load_module 'base'; local ltjb = luatexja.base +if tex.outputmode==0 then + ltjb.package_error('luatexja', + 'DVI output is not supported in LuaTeX-ja', + 'Use lua*tex instead dvilua*tex.') +end load_module 'rmlgbm'; local ltjr = luatexja.rmlgbm -- must be 1st if luatexja_debug then load_module('debug') end load_module 'lotf_aux'; local ltju = luatexja.lotf_aux diff --git a/macros/luatex/generic/luatexja/src/luatexja.sty b/macros/luatex/generic/luatexja/src/luatexja.sty index 2bb9f0db4f..cfee092e30 100644 --- a/macros/luatex/generic/luatexja/src/luatexja.sty +++ b/macros/luatex/generic/luatexja/src/luatexja.sty @@ -41,7 +41,7 @@ \ProcessOptions\relax \fi %</LaTeX> %%%% VERSION -\def\LuaTeXjaversion{20200919.0} +\def\LuaTeXjaversion{20201001.0} \directlua{require('ltj-unicode-ccfix.lua')}% catcode of ideographs diff --git a/macros/luatex/generic/luatexja/src/patches/lltjcore.sty b/macros/luatex/generic/luatexja/src/patches/lltjcore.sty index e858a8a957..2af25035a5 100644 --- a/macros/luatex/generic/luatexja/src/patches/lltjcore.sty +++ b/macros/luatex/generic/luatexja/src/patches/lltjcore.sty @@ -3,9 +3,61 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjcore}[2020-09-13 Patch to LaTeX2e Kernel for LuaTeX-ja] +\ProvidesPackage{lltjcore}[2020-09-28 Patch to LaTeX2e Kernel for LuaTeX-ja] \RequirePackage{etoolbox} +%%% expl3 +\RequirePackage{expl3} +\ExplSyntaxOn +\cs_set_eq:NN \platex_direction_yoko: \yoko +\cs_set_eq:NN \platex_direction_tate: \tate +\cs_set_eq:NN \platex_direction_dtou: \dtou +\cs_set_eq:NN \platex_direction_utod: \utod % LuaTeX-ja specific +\prg_new_conditional:Npnn \platex_if_box_yoko:N #1 { p, T, F, TF } + { \if_int_compare:w \ltjgetparameter{boxdir}{#1} = 4 \scan_stop: + \prg_return_true: \else: \prg_return_false: \fi: } +\prg_new_conditional:Npnn \platex_if_box_utod:N #1 { p, T, F, TF } + { \if_int_compare:w \ltjgetparameter{boxdir}{#1} = 11 \scan_stop: + \prg_return_true: \else: \prg_return_false: \fi: } +\prg_new_eq_conditional:NNn \platex_if_box_tate_math:N \platex_if_box_utod:N { p, T, F, TF } +\prg_new_conditional:Npnn \platex_if_box_tate_nomath:N #1 { p, T, F, TF } + { \if_int_compare:w \ltjgetparameter{boxdir}{#1} = 3 \scan_stop: + \prg_return_true: \else: \prg_return_false: \fi: } +\prg_new_conditional:Npnn \platex_if_box_tate:N #1 { p, T, F, TF } + { \if_int_compare:w \ltjgetparameter{boxdir}{#1} = 3 \scan_stop: + \prg_return_true: + \else: \if_int_compare:w \ltjgetparameter{boxdir}{#1} = 11 \scan_stop: % utod + \prg_return_true: + \else + \prg_return_false: + \fi: \fi:} +\prg_new_conditional:Npnn \platex_if_box_dtou:N #1 { p, T, F, TF } + { \if_int_compare:w \ltjgetparameter{boxdir}{#1} = 1 \scan_stop: + \prg_return_true: \else: \prg_return_false: \fi: } +\prg_new_conditional:Npnn \platex_if_direction_yoko: { p, T, F, TF } + { \if_int_compare:w \ltjgetparameter{direction} = 4 \scan_stop: + \prg_return_true: \else: \prg_return_false: \fi: } +\prg_new_conditional:Npnn \platex_if_direction_utod: { p, T, F, TF } + { \if_int_compare:w \ltjgetparameter{direction} = 11 \scan_stop: + \prg_return_true: \else: \prg_return_false: \fi: } +\prg_new_eq_conditional:NNn + \platex_if_direction_tate_math: \platex_if_direction_utod: { p, T, F, TF } +\prg_new_conditional:Npnn \platex_if_direction_tate_nomath: { p, T, F, TF } + { \if_int_compare:w \ltjgetparameter{direction} = 3 \scan_stop: + \prg_return_true: \else: \prg_return_false: \fi: } +\prg_new_conditional:Npnn \platex_if_direction_tate: { p, T, F, TF } + { \if_int_compare:w \ltjgetparameter{direction} = 3 \scan_stop: + \prg_return_true: + \else: \if_int_compare:w \ltjgetparameter{direction} = 11 \scan_stop: % utod + \prg_return_true: + \else + \prg_return_false: + \fi: \fi:} +\prg_new_conditional:Npnn \platex_if_direction_dtou: { p, T, F, TF } + { \if_int_compare:w \ltjgetparameter{direction} = 1 \scan_stop: + \prg_return_true: \else: \prg_return_false: \fi: } +\ExplSyntaxOff + \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page \ifnum\ltjgetparameter{direction}=3 @@ -18,6 +70,10 @@ \if@twocolumn\hbox{}\newpage\fi \fi \fi\fi} + +\patchcmd\@vtryfc{\global\setbox\@outputbox\vbox{}} + {\global\setbox\@outputbox\vbox{\unless\ifnum\ltjgetparameter{direction}=4\hskip\z@\fi}}{}{} + \newif\iftombow \tombowfalse \newif\iftombowdate \tombowdatetrue \newdimen\@tombowwidth @@ -239,14 +295,6 @@ \ifmmode\@@underline{#1}% \else \leavevmode\null$\@@underline{\hbox{#1}}\m@th$\null\relax\fi} -%%% AtBeginDvi: NOT needed to patch in LaTeX 2020-10-01 pre-release 9 or later -\unless\ifltj@ltshipout@avail -\DeclareRobustCommand \AtBeginDvi [1]{% - \global \setbox \@begindvibox - \vbox{\yoko\unvbox \@begindvibox #1}% -} -\fi - \newif\iffnfixbottom \newif\ifltj@ftn@unvboxed %%% @makecol @@ -279,7 +327,7 @@ \@texttop \dimen@ \dp\@outputbox \unvbox \@outputbox - \ifnum\ltjgetparameter{direction}=4\else\vbox{\hskip\z@}\fi %%% LuaTeX-ja + \unless\ifnum\ltjgetparameter{direction}=4\vbox{\hskip\z@}\fi %%% LuaTeX-ja \vskip -\dimen@ \ifltj@ftn@unvboxed\iffnfixbottom\else\@textbottom\fi\else\@textbottom\fi }% diff --git a/macros/luatex/generic/luatexja/src/patches/lltjdefs.sty b/macros/luatex/generic/luatexja/src/patches/lltjdefs.sty index 76a3147036..03366c258f 100644 --- a/macros/luatex/generic/luatexja/src/patches/lltjdefs.sty +++ b/macros/luatex/generic/luatexja/src/patches/lltjdefs.sty @@ -3,7 +3,7 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjdefs}[2020-08-08 Default font settings of LuaTeX-ja] +\ProvidesPackage{lltjdefs}[2020-09-30 Default font settings of LuaTeX-ja] \ifdefined\ltj@stdmcfont\else\def\ltj@stdmcfont{file:HaranoAjiMincho-Regular.otf}\fi \ifdefined\ltj@stdgtfont\else\def\ltj@stdgtfont{file:HaranoAjiGothic-Medium.otf}\fi @@ -32,7 +32,8 @@ \newcommand\kanjiencodingdefault{JY3} \newcommand\kanjifamilydefault{\mcdefault} \newcommand\kanjiseriesdefault{\mddefault} -\ifdefined\@rmfamilyhook%% LaTeX 2020-02-02 +\ifnum 0\ifltj@ltfilehook@avail1\fi\ifdefined\@rmfamilyhook1\fi>0 + %% LaTeX 2020-02-02 \newcommand\kanjishapedefault{\shapedefault} \else %% LaTeX 2019-10-01 \newcommand\kanjishapedefault{\updefault} @@ -80,8 +81,8 @@ \DeclareMathAlphabet{\mathgt}{JY3}{gt}{m}{n} \fi -\ifdefined\@rmfamilyhook -%%%% LaTeX 2020-02-02 +\ifnum 0\ifltj@ltfilehook@avail1\fi\ifdefined\@rmfamilyhook1\fi>0 +%%%% LaTeX >= 2020-02-02 \edef\bfseries@mc{\bfdefault} \edef\bfseries@gt{\bfdefault} \def\bfseries@jtt{\bfseries@mc} @@ -95,7 +96,9 @@ \def\verbatim@font{\normalfont\ttfamily\kanjifamily\jttdefault\selectfont} \def\@ltj@hook@family#1#2{ % #1: csname #2: contents - \ifcsname @#1hook\endcsname % LaTeX 2020-02-02 + \ifltj@ltfilehook@avail % LaTeX 2020-10-01 + \AddToHook{#1}{#2}% + \else\ifcsname @#1hook\endcsname % LaTeX 2020-02-02 \csappto{@#1hook}{#2}% \else % LaTeX 2019-10-01 \ifcsname #1 \endcsname @@ -105,7 +108,7 @@ Patching to \expandafter\string\csname #1\endcsname\space failed% }% \fi - \fi + \fi\fi } \@ltj@hook@family{rmfamily}{% \if@ltj@match@family @@ -122,6 +125,13 @@ \prepare@family@series@update@kanji{jtt}\jttdefault \fi } +\let\@ltj@hook@family\@undefined + +\ifltj@ltfilehook@avail % 2020-10-01 + \expandafter\def\expandafter\kanjiseriesdefault + \expandafter{\kanjiseriesdefault\@empty} + \let\kanjiseriesdefault@kernel\kanjiseriesdefault +\fi %%% \eminnershape \expandafter\patchcmd\csname em \endcsname{\itshape}{\gtfamily\itshape}{}{} diff --git a/macros/luatex/generic/luatexja/src/patches/lltjfont.sty b/macros/luatex/generic/luatexja/src/patches/lltjfont.sty index 3578a84396..564a1b6c15 100644 --- a/macros/luatex/generic/luatexja/src/patches/lltjfont.sty +++ b/macros/luatex/generic/luatexja/src/patches/lltjfont.sty @@ -3,7 +3,7 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjfont}[2020-05-17 Patch to NFSS2 for LuaTeX-ja] +\ProvidesPackage{lltjfont}[2020-09-30 Patch to NFSS2 for LuaTeX-ja] %% patching \DeclareTextComposite \def\ltj@chardef@text@cmd#1{% @@ -432,19 +432,32 @@ \bgroup \def\ltj@@dir@patch#1#2#3{% \global\csletcs{ltj@@orig@#1}{#1}% - \protected\expandafter\xdef\csname #1\endcsname{% - \csname ltj@@orig@#1\endcsname - \unexpanded{\ifnum#3<\z@\let\ltj@@protect\protect\set@typeset@protect}% - \unexpanded{\global\let\ltj@afont@name=\font@name}% - \expandonce{\csname ltj@selectfont@#2\endcsname}% - \unexpanded{\global\let\font@name=\ltj@afont@name}% - \unexpanded{\let\protect\ltj@@protect\fi}% - }% - } + \protected\expandafter\xdef\csname #1\endcsname{% + \csname ltj@@orig@#1\endcsname + \unexpanded{\ifnum#3<\z@\let\ltj@@protect\protect\set@typeset@protect}% + \unexpanded{\global\let\ltj@afont@name=\font@name}% + \expandonce{\csname ltj@selectfont@#2\endcsname}% + \unexpanded{\global\let\font@name=\ltj@afont@name}% + \unexpanded{\let\protect\ltj@@protect\fi}% + }% + } \ltj@@dir@patch{yoko}{yoko}{\ltj@curjfnt} \ltj@@dir@patch{tate}{tate}{\ltj@curtfnt} \ltj@@dir@patch{utod}{yoko}{\ltj@curjfnt} \ltj@@dir@patch{dtou}{yoko}{\ltj@curjfnt} + \global\let\ltj@@box@dirhook@orig=\ltj@@box@dirhook + \gdef\ltj@@box@dirhook{% + \ltj@@box@dirhook@orig + \ifnum\ltjgetparameter{direction}=11 + \ifnum\ltj@curjfnt<\z@ + \let\ltj@@protect\protect\set@typeset@protect + \global\let\ltj@afont@name=\font@name + \ltj@selectfont@yoko + \global\let\font@name=\ltj@afont@name + \let\protect\ltj@@protect + \fi + \fi + } \egroup \def\KanjiEncodingPair#1#2{\@namedef{t@enc@#1}{#2}\@namedef{y@enc@#2}{#1}} @@ -620,24 +633,28 @@ } \newcount\ltj@@latex@plv \ltj@@latex@plv=-1 -\ifdefined\@rmfamilyhook -%%%% LaTeX 2020-02-02 -\newif\if@shape@roman@kanji -%%%%%% 2020-02-02 patchlevel detection -\ifx\@forced@seriestrue\@undefined % 2020-02-02 pl0--2 - \@latex@error - {Please update LaTeX2e!^^J\space\space - At least LaTeX2e 2020-02-02 patch level 3 is required} - {LaTeX2e 2020-02-02 patch level 2 (and 4) has a bug.} -\else - \ltj@@latex@plv=300 - \unless\ifx\series@maybe@drop@one@m@x\@undefined % pl5 + develop - \ltj@@latex@plv=501 - \else\unless\ifx\series@maybe@drop@one@m\@undefined % patch level 5 - \ltj@@latex@plv=500 - \fi\fi -\fi +\ifltj@ltfilehook@avail % 2020-10-01 + \ltj@@latex@plv=1000 +\else\ifdefined\@rmfamilyhook % 2020-02-02 + \ifx\@forced@seriestrue\@undefined % 2020-02-02 pl0--2 + \@latex@error + {Please update LaTeX2e!^^J\space\space + At least LaTeX2e 2020-02-02 patch level 3 is required} + {LaTeX2e 2020-02-02 patch level 2 (and 4) has a bug.} + \else + \ltj@@latex@plv=300 + \unless\ifx\series@maybe@drop@one@m@x\@undefined % pl5 + develop + \ltj@@latex@plv=501 + \else\unless\ifx\series@maybe@drop@one@m\@undefined % patch level 5 + \ltj@@latex@plv=500 + \fi\fi + \fi +\fi\fi + %%%%%% +\ifnum\ltj@@latex@plv>0 +%%%% LaTeX >= 2020-02-02 +\newif\if@shape@roman@kanji \def\merge@kanji@series#1{% \expandafter\expandafter\expandafter @@ -757,7 +774,7 @@ \DeclareRobustCommand\useroman[4]{% \romanencoding{#1}\edef\f@family{#2}\edef\f@series{#3}\edef\f@shape{#4}% \selectfont\ignorespaces} -%%%% LaTeX 2020-02-02 END +%%%% LaTeX >= 2020-02-02 END \else %%%% LaTeX 2019-10-01 \DeclareRobustCommand\romanseries[1]{\edef\f@series{#1}} @@ -794,13 +811,9 @@ \ltj@@is@kenc{#1}\ifin@\usekanji{#1}{#2}{#3}{#4}% \else\useroman{#1}{#2}{#3}{#4}% \fi} -\DeclareRobustCommand\normalfont{% - \useroman\encodingdefault\familydefault\seriesdefault\shapedefault - \usekanji\kanjiencodingdefault\kanjifamilydefault\kanjiseriesdefault\kanjishapedefault} -\let\reset@font\normalfont -\ifdefined\@rmfamilyhook -%%%% LaTeX 2020-02-02 +\ifnum 0\ifltj@ltfilehook@avail1\fi\ifdefined\@rmfamilyhook1\fi>0 +%%%% LaTeX >= 2020-02-02 \let\prepare@family@series@update@kanji=\prepare@family@series@update \patchcmd\prepare@family@series@update{\fontfamily}{\romanfamily}{}{} \patchcmd\prepare@family@series@update@kanji{\fontfamily}{\kanjifamily}{}{} @@ -821,46 +834,35 @@ \patchcmd\update@series@target@value@kanji{\f@series}{\k@series}{}{} \def\@meta@family@list@kanji{\@elt{mc}\@elt{gt}\@elt{jtt}} -\ifdefined\@setbfseriesdefaultshook % after 2020-04-07 - \g@addto@macro\@setbfseriesdefaultshook{% - \let\bfseries@mc\bfdef@ult - \let\bfseries@gt\bfdef@ult - \let\bfseries@jtt\bfdef@ult - } -\else % 2020-02-02 - \expandafter\patchcmd\csname bfseries \endcsname{% - \let\bfseries@rm\bfdef@ult - \let\bfseries@sf\bfdef@ult - \let\bfseries@tt\bfdef@ult - }{% - \let\bfseries@rm\bfdef@ult - \let\bfseries@sf\bfdef@ult - \let\bfseries@tt\bfdef@ult - \let\bfseries@mc\bfdef@ult - \let\bfseries@gt\bfdef@ult - \let\bfseries@jtt\bfdef@ult - }{}{} -\fi -\ifdefined\@setmdseriesdefaultshook % after 2020-04-07 - \g@addto@macro\@setmdseriesdefaultshook{% - \let\mdseries@mc\mddef@ult - \let\mdseries@gt\mddef@ult - \let\mdseries@jtt\mddef@ult - } -\else % 2020-02-02 - \expandafter\patchcmd\csname mdseries \endcsname{% - \let\mdseries@rm\mddef@ult - \let\mdseries@sf\mddef@ult - \let\mdseries@tt\mddef@ult - }{% - \let\mdseries@rm\mddef@ult - \let\mdseries@sf\mddef@ult - \let\mdseries@tt\mddef@ult - \let\mdseries@mc\mddef@ult - \let\mdseries@gt\mddef@ult - \let\mdseries@jtt\mddef@ult - }{}{} -\fi +\def\@ltj@hook@series@default#1#2#3{ + \ifltj@ltfilehook@avail % 2020-10-01 + \AddToHook{#1/defaults}{#2}% + \else\ifcsname @set#1defaultshook\endcsname %after 2020-04-07 + \expandafter\g@addto@macro\csname @set#1defaultshook\endcsname{#2}% + \else % 2020-02-02 + \expandafter\patchcmd\csname #1 \endcsname{#3}{#3#2}{}{} + \fi\fi +} +\@ltj@hook@series@default{bfseries}{ + \let\bfseries@mc\bfdef@ult + \let\bfseries@gt\bfdef@ult + \let\bfseries@jtt\bfdef@ult +}{ + \let\bfseries@rm\bfdef@ult + \let\bfseries@sf\bfdef@ult + \let\bfseries@tt\bfdef@ult +} +\@ltj@hook@series@default{mdseries}{ + \let\mdseries@mc\mddef@ult + \let\mdseries@gt\mddef@ult + \let\mdseries@jtt\mddef@ult +}{ + \let\mdseries@rm\mddef@ult + \let\mdseries@sf\mddef@ult + \let\mdseries@tt\mddef@ult +} +\let\@ltj@hook@series@default\@undefined + \expandafter\patchcmd\csname bfseries \endcsname{% \ifx\f@family\rmdef@ult \fontseries\bfseries@rm \else\ifx\f@family\sfdef@ult \fontseries\bfseries@sf @@ -887,46 +889,91 @@ \else \romanseries\mddefault \fi\fi\fi }{}{} -\expandafter\patchcmd\csname bfseries \endcsname{\selectfont}% -{% + +\def\@ltj@hook@series#1#2{ + \ifltj@ltfilehook@avail % 2020-10-01 + \AddToHook{#1}{#2}% + \else % 2020-02-02 + \expandafter\patchcmd\csname #1 \endcsname{\selectfont}{#2\selectfont}{}{} + \fi +} +\@ltj@hook@series{bfseries}{% \ifx\k@family\mcdef@ult \kanjiseries\bfseries@mc \else\ifx\k@family\gtdef@ult \kanjiseries\bfseries@gt \else\ifx\k@family\jttdef@ult\kanjiseries\bfseries@jtt \else \kanjiseries\bfdefault \fi\fi\fi - \selectfont -}{}{} -\expandafter\patchcmd\csname mdseries \endcsname{\selectfont}% -{% +} +\@ltj@hook@series{mdseries}{% \ifx\k@family\mcdef@ult \kanjiseries\mdseries@mc \else\ifx\k@family\gtdef@ult \kanjiseries\mdseries@gt \else\ifx\k@family\jttdef@ult\kanjiseries\mdseries@jtt \else \kanjiseries\mddefault \fi\fi\fi - \selectfont -}{}{} -\ifdefined\@expandfontdefaultshook % 2020-04-07 - \g@addto@macro\@expandfontdefaultshook{% - \edef\mcdef@ult{\mcdefault}% - \edef\gtdef@ult{\gtdefault}% - \edef\jttdef@ult{\jttdefault}% - \edef\kanjidef@ult{\kanjifamilydefault}% +} +\let\@ltj@hook@series\@undefined + +\def\@ltj@hook@efd#1#2{ + \ifltj@ltfilehook@avail % 2020-10-01 + \AddToHook{expand@font@defaults}{#1}% + \else\ifdefined\@expandfontdefaultshook %after 2020-04-07 + \g@addto@macro\@expandfontdefaultshook{#1#2}% + \else % 2020-02-02 + \appto\expand@font@defaults{#1#2}% + \fi\fi +} +\@ltj@hook@efd{% + \edef\mcdef@ult{\mcdefault}% + \edef\gtdef@ult{\gtdefault}% + \edef\jttdef@ult{\jttdefault}% +}{\edef\kanjidef@ult{\kanjifamilydefault}} +\let\@ltj@hook@efd\@undefined + +\ifltj@ltfilehook@avail % 2020-10-01 + \appto\init@series@setup{ + \ifx\kanjiseriesdefault\kanjiseriesdefault@kernel + \mdseries + \let\kanjiseriesdefault\k@series + \fi } -\else % 2020-02-02 - \appto\expand@font@defaults{% - \edef\mcdef@ult{\mcdefault}% - \edef\gtdef@ult{\gtdefault}% - \edef\jttdef@ult{\jttdefault}% - \edef\kanjidef@ult{\kanjifamilydefault}% +\else + \appto\init@series@setup{% + \ifx\kanjidef@ult\mcdef@ult \mcfamily + \else\ifx\kanjidef@ult\gtdef@ult \gtfamily + \else\ifx\kanjidef@ult\jttdef@ult \jttfamily + \fi\fi\fi } \fi -\appto\init@series@setup{% - \ifx\kanjidef@ult\mcdef@ult \mcfamily - \else\ifx\kanjidef@ult\gtdef@ult \gtfamily - \else\ifx\kanjidef@ult\jttdef@ult \jttfamily - \fi\fi\fi + +\def\@ltj@hook@dfh#1{ + \ifltj@ltfilehook@avail % 2020-10-01 + \AddToHook{normalfont}{#1}% + \else\ifdefined\@defaultfamilyhook + \g@addto@macro\@defaultfamilyhook{#1}% + \else % 2020-02-02 + \expandafter\patchcmd\csname normalfont \endcsname{\selectfont}{#1\selectfont}{}{} + \let\reset@font\normalfont + \fi\fi } +\@ltj@hook@dfh{% + \kanjiencoding{\kanjiencodingdefault}% + \edef\k@family{\kanjifamilydefault}% + \edef\k@series{\kanjiseriesdefault}% + \edef\k@shape{\kanjishapedefault}% +} +\let\@ltj@hook@dfh\@undefined +%%%% LaTeX >= 2020-02-02 END +\else +%%%% LaTeX 2019-10-01 +\DeclareRobustCommand\normalfont{% + \useroman\encodingdefault\familydefault\seriesdefault\shapedefault + \usekanji\kanjiencodingdefault\kanjifamilydefault\kanjiseriesdefault\kanjishapedefault} +\let\reset@font\normalfont +%%%% LaTeX 2019-10-01 END \fi + + + \ifdefined\prepare@family@series@update@kanji\else %%%% LaTeX 2019-10-01 \def\prepare@family@series@update@kanji#1{\kanjifamily} @@ -942,13 +989,12 @@ \selectfont} - \let\romanprocess@table\process@table \def\kanjiprocess@table{% - \kanjiencoding{\kanjiencodingdefault}% - \kanjifamily{\kanjifamilydefault}% - \kanjiseries{\kanjiseriesdefault}% - \kanjishape{\kanjishapedefault}% + \kanjiencoding\kanjiencodingdefault% + \edef\k@family{\kanjifamilydefault}% + \edef\k@series{\kanjiseriesdefault}% + \edef\k@shape{\kanjishapedefault}% } \def\process@table{% \romanprocess@table diff --git a/macros/luatex/generic/luatexja/src/patches/lltjp-atbegshi.sty b/macros/luatex/generic/luatexja/src/patches/lltjp-atbegshi.sty index a4b340136a..a9ca6a2c14 100644 --- a/macros/luatex/generic/luatexja/src/patches/lltjp-atbegshi.sty +++ b/macros/luatex/generic/luatexja/src/patches/lltjp-atbegshi.sty @@ -2,37 +2,59 @@ % lltjp-atbegshi.sty % -\newif\ifltj@ltshipout@avail \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjp-atbegshi}[2020-09-13 Patching \string\shipout\space hooks for LuaTeX-ja] -\@ifl@t@r\fmtversion{2020-10-01}{% - \ifnum\patch@level<0\relax \ifnum\patch@level<-6 \ltj@ltshipout@availtrue\fi - \else\ltj@ltshipout@availtrue\fi -}{} -\ifltj@ltshipout@avail\else\RequirePackage{atbegshi}\fi +\ProvidesPackage{lltjp-atbegshi}[2020-09-30 Patching \string\shipout\space hooks for LuaTeX-ja] % concept: execute all hooks inside yoko direction \vbox -\ifltj@ltshipout@avail +\ifltj@ltfilehook@avail %<*ltshipout>----------------------------------- % \RequirePackage{expl3} \ExplSyntaxOn\makeatletter \box_new:N \l__platex_shipout_dummy_box -\tl_put_left:Nn {\__shipout_execute_cont:} - {\tex_setbox:D \l__platex_shipout_dummy_box \tex_vbox:D \c_group_begin_token \yoko } -\tl_put_right:Nn {\__shipout_execute_cont:} {\c_group_end_token} -\ExplSyntaxOff +\cs_new_eq:NN \__platex_original_shipout_execute_cont: \__shipout_execute_cont: +\cs_set:Npn \__shipout_execute_cont: +{ + % if \l_shipout_box is not a \yoko-box (= horizontal writing), + % then make it a \yoko-box behorehand. + \platex_if_box_yoko:NF \l_shipout_box { + \vbox_set:Nn \l_shipout_box { \platex_direction_yoko: \box_use:N \l_shipout_box } + } + % if the current direction is not \yoko, + % then enclose \__shipout_execute_cont: with + % a dummy \yoko-box named \l__platex_shipout_dummy_box. + \platex_if_direction_yoko:TF { + \__platex_original_shipout_execute_cont: + }{ + \vbox_set:Nn \l__platex_shipout_dummy_box { + \platex_direction_yoko: \__platex_original_shipout_execute_cont: + } + % [Limitation] the code above may discard some contents, + % so we'd like to put it back by \box\l__platex_shipout_dummy_box. + % however, an infinite loop occurs if we uncomment the line below + % so we can't. + %\box_use:N \l__platex_shipout_dummy_box + } +} %</ltshipout>----------------------------------- - +\ExplSyntaxOff \expandafter\endinput \fi -\AtBeginShipoutInit +\RequirePackage{atbegshi} %<*atbegshi>------------------------------------- % patching atbegshi.sty %%% following codes are almost copied from %%% pxatbegshi.sty 2019/09/07 v0.5 (in platex-tools bundle, by H. Yamashita). +\ifdefined\AtBeginShipoutOriginalShipout + \let\AtBeginShipoutOriginalShipout\ltj@shipout +\fi +\AtBeginShipoutInit +\DeclareRobustCommand \AtBeginDvi [1]{% + \global \setbox \@begindvibox + \vbox{\yoko\unvbox \@begindvibox #1}% +} %% internal macros are locally effective \begingroup diff --git a/macros/luatex/generic/luatexja/src/patches/lltjp-preview.sty b/macros/luatex/generic/luatexja/src/patches/lltjp-preview.sty index 00602884ea..b850ec34cd 100644 --- a/macros/luatex/generic/luatexja/src/patches/lltjp-preview.sty +++ b/macros/luatex/generic/luatexja/src/patches/lltjp-preview.sty @@ -3,20 +3,7 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjp-preview}[2018/01/20 Patch to preview for LuaTeX-ja] - -\RequirePackage{etoolbox,preview} -\newbox\ltj@preview@box - -\patchcmd\pr@endbox{% - \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 -}{}{} - +\ProvidesPackage{lltjp-preview}[2020-10-01 Patch to preview for LuaTeX-ja] +\RequirePackage{preview} +\let\pr@shipout=\ltj@shipout \endinput |