}
}
+\newpage
+xkanjiskip手動挿入.
+
+\texttt{\string\insertxkanjiskip}で挿入されたグルーは\\
+\texttt{\string\hskip\string\ltjgetparameter\{xkanjiskip\}}\insertxkanjiskip によるグルー%
+(下段)とは違い,
+優先度付き行長調整でも通常のxkanjiskipと同等の挙動をする.
+
+{\ltjsetparameter{xkanjiskip=10pt plus 50pt minus 50pt,kanjiskip=0pt plus 5pt minus 5pt}%
+\testbox{%
+ \vrule width2.5\zw ◆◆◆◆◆◆◆◆\insertxkanjiskip a\null ◆◆◆◆◆◆◆a%
+}
+\testbox{%
+ \vrule width2.5\zw ◆◆◆◆◆◆◆◆\hskip\ltjgetparameter{xkanjiskip}a\null ◆◆◆◆◆◆◆a%
+}
+}
+
+\bigskip
+
次ページ以降の出典:
Wikisource日本語版「竹取物語」(一部),2016/08/11閲覧\\
{\catcode`\%=11\texttt{https://ja.wikisource.org/wiki/%E7%AB%B9%E5%8F%96%E7%89%A9%E8%AA%9E}}
local t = tex.getbox(a)
local x = {}
for n in node.traverse_id(node.id('hlist'), t.head) do
- local b = n.glue_order>0 and 0 or math.floor(100*math.pow(n.glue_set, 3)+0.5);
+ local b = n.glue_order>0 and 0 or math.floor(100*n.glue_set^3+0.5);
if b<=12 then x[#x+1]={2,b} % decent
elseif n.glue_sign==1 and b>=100 then x[#x+1]={0,b} %very loose
elseif n.glue_sign==1 then x[#x+1]={1,b} % loose
x[0]={2, 0}
local d = 0
for i=1,#x do
- d = d + math.floor(math.pow(tex.linepenalty + x[i][2], 2)+0.5)
+ d = d + math.floor((tex.linepenalty + x[i][2])^2+0.5)
if math.abs(x[i][1]-x[i-1][1])>=1 then d = d + tex.adjdemerits end
end
tex.sprint(-2,tostring(d) )
\noindent
\vrule\copy40014\vrule\relax\getbadness{40014}
-\clearpage
\R28\zw
\ltjenableadjust[lineend=extended, priority=true]
\setbox40000=\vtop{\sample{lineend=extended, priority=true}}