OSDN Git Service

lltjcore.sty, ltj-jfmglue.lua: \linebreak (#37465)
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sat, 26 Aug 2017 21:31:13 +0000 (06:31 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sat, 26 Aug 2017 21:31:13 +0000 (06:31 +0900)
src/ltj-jfmglue.lua
src/patches/lltjcore.sty

index 531a5c7..d33f032 100644 (file)
@@ -127,19 +127,24 @@ end
 
 
 -- penalty 値の計算
 
 
 -- 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
 end
+end
 
 -- 「異なる JFM」の間の調整方法
 diffmet_rule = math.two_paverage
 
 -- 「異なる JFM」の間の調整方法
 diffmet_rule = math.two_paverage
index 43abab1..e56aef4 100644 (file)
@@ -3,7 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
 %
 
 \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
 \RequirePackage{etoolbox}
 
 \def\cleardoublepage{\clearpage\if@twoside
   \ignorespaces
 \fi}
 
   \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}
 
 %%%%%% \@tabclassz
 \def\ltj@sharp{\ltjfakeboxbdd\ignorespaces\@sharp\unskip\ltjfakeboxbdd}