-- penalty 値の計算
-local function add_penalty(p,e)
- local pp = getfield(p, 'penalty')
- if pp>=10000 then
- if e<=-10000 then setfield(p, 'penalty', 0) end
- elseif pp<=-10000 then
- if e>=10000 then setfield(p, 'penalty', 0) end
- else
- pp = pp + e
- if pp>=10000 then setfield(p, 'penalty', 10000)
- elseif pp<=-10000 then setfield(p, 'penalty', -10000)
- else setfield(p, 'penalty', pp) end
+local add_penalty
+do
+local setpenalty = node.direct.setpenalty or function(n, a) setfield(n,'penalty',a) end
+local getpenalty = node.direct.getpenalty or function(n) return getfield(n,'penalty') end
+function add_penalty(p,e)
+ local pp = getpenalty(p)
+ if (pp>-10000) and (pp<10000) then
+ if e>=10000 then setpenalty(p, 10000)
+ elseif e<=-10000 then setpenalty(p, -10000)
+ else
+ pp = pp + e
+ if pp>=10000 then setpenalty(p, 10000)
+ elseif pp<=-10000 then setpenalty(p, -10000)
+ else setpenalty(p, pp) end
+ end
end
end
+end
-- 「異なる JFM」の間の調整方法
diffmet_rule = math.two_paverage
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjcore}[2017/08/07 Patch to LaTeX2e Kernel for LuaTeX-ja]
+\ProvidesPackage{lltjcore}[2017/08/27 Patch to LaTeX2e Kernel for LuaTeX-ja]
\RequirePackage{etoolbox}
\def\cleardoublepage{\clearpage\if@twoside
\ignorespaces
\fi}
-\def\@no@lnbk #1[#2]{%
- \ifvmode
- \@nolnerr
- \else
- \@tempskipa\lastskip
- \unskip
- \penalty #1\@getpen{#2}%
- \hskip\z@\relax %% added (2017/05/03)
- \ifdim\@tempskipa>\z@
- \hskip\@tempskipa
- \ignorespaces
- \fi
- \fi}
%%%%%% \@tabclassz
\def\ltj@sharp{\ltjfakeboxbdd\ignorespaces\@sharp\unskip\ltjfakeboxbdd}