OSDN Git Service

ltj-jfmglue.lua: Fix handle_penalty_always() to always insert non-zero penalty.
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Tue, 2 Sep 2014 05:15:22 +0000 (14:15 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Tue, 2 Sep 2014 05:15:22 +0000 (14:15 +0900)
doc/luatexja.dtx
src/ltj-jfmglue.lua

index ba21034..abf7977 100644 (file)
@@ -7753,11 +7753,11 @@ If this attempt fails, \LuaTeX-ja use the method ``\textsf{\Param{kanjiskip}~[K]
 
 (a)部分にペナルティが存在していない場合,
 \LuaTeX-ja は\textit{Nq}と\textit{Np}の間の行分割を可能にしようとする.
-そのために,以下の場合に$a$をもつ\textit{penalty\_node}を作って
+そのために,以下のいずれかの場合に$a$をもつ\textit{penalty\_node}を作って
 「右空白」の(もし未定義なら\textit{Np}の)直前に挿入する:
 \begin{itemize}
 \item 「右空白」がグルーでない(カーンか未定義)であるとき.
-%\item 「左空白」がカーンとしてきっちり定義されている時
+\item $a\neq 0$のときは,「右空白」がグルーであっても\textit{penalty\_node}を作る
 \end{itemize}
 
 \item[P-suppress~{[PS]}]
index b67fcdd..963c251 100644 (file)
@@ -567,7 +567,7 @@ end
 local function handle_penalty_always(post, pre, g)
    local a = (pre or 0) + (post or 0)
    if #Bp == 0 then
-      if not (g and getid(g)==id_glue) then
+      if not (g and getid(g)==id_glue) or a~=0 then
         local p = node_new(id_penalty)
         if a<-10000 then a = -10000 elseif a>10000 then a = 10000 end
         setfield(p, 'penalty', a)