• R/O
  • HTTP
  • SSH
  • HTTPS

luatexja: Commit

ソースコードの管理場所


Commit MetaInfo

Revision07cb93b123d2f8f16faabef4bcec41ea0cd1bc77 (tree)
Zeit2020-12-23 09:35:03
AutorHironori Kitagawa <h_kitagawa2001@yaho...>
CommiterHironori Kitagawa

Log Message

Merge branch 'kitagawa_ruby' into kitagawa_test

Ändern Zusammenfassung

Diff

--- a/doc/luatexja-ruby.tex
+++ b/doc/luatexja-ruby.tex
@@ -52,6 +52,7 @@
5252 \def\mybox#1{\unskip\ {\Large \fboxrule=0.1mm\fboxsep=0mm\fcolorbox{cyan}{white}{\hbox{\<\ltjjachar#1\<}}}\ }
5353
5454 \begin{document}
55+
5556 \catcode`\<=13
5657 \def<#1>{{\rmfamily\mdseries\itshape$\langle$#1\/$\rangle$}}
5758 %\fontsize{13.19873}{15}\selectfont%
@@ -251,14 +252,20 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1}
251252 intrude_jfmgk, intrude_kanjiskip, intrude_xkanjiskip
252253 \end{verbatim}
253254
254-\paragraph{\texttt{\textbackslash ltjsetparamater} に追加されるキー}
255+\paragraph{\cs{ltjsetparamater} に追加されるキー}
255256 \begin{description}
256257 \item[\Param{rubypreintrusion}\ttfamily =\{<chr\_code>, <pre\_int>\}]
257258 文字<chr\_code> に,その\textbf{直後}のルビによって掛けられるルビ文字列の最大長
258259 (つまり,\underline{前文字進入許容量})をルビ全角単位で指定.
260+
261+ もし$-a$~($a>0$)を指定した場合は,実際の\underline{前文字進入許容量}は$a$となるが,
262+ 文字<chr\_code>の前のJFMグルーに進入が発生した場合には,\underline{前文字進入許容量}が0でなかった場合は,の後のJFMグルーにはルビの進入は発生しない.
259263 \item[\Param{rubypostintrusion}\ttfamily =\{<chr\_code>, <post\_int>\}]
260264 文字<chr\_code> に,その\textbf{直前}のルビによって掛けられるルビ文字列の最大長
261265 (つまり,\underline{後文字進入許容量})をルビ全角単位で指定.
266+
267+ もし$-a$~($a>0$)を指定した場合は,実際の\underline{後文字進入許容量}は$a$となるが,
268+ 実際の\underline{後文字進入量}が0でなかった場合は,文字<chr\_code>の後のJFMグルーにはルビの進入は発生しない.
262269 \end{description}
263270 以下の文字は\Param{rubypreintrusion},~\Param{rubypostintrusion}とも初期値は1である:
264271 \begin{quote}
@@ -271,15 +278,15 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1}
271278 \begin{quote}
272279 中点類\@for\@tmp:=`\・,`\:,`\; \do{\mybox{\@tmp}}
273280 \end{quote}
274-また,以下の文字は\Param{rubypreintrusion}のみ初期値は1である:
281+また,以下の文字は\Param{rubypreintrusion}のみ初期値は$-1$である:
275282 \begin{quote}
276283 始め括弧類
277284 \@for\@tmp:=`\‘,`\“,`\〈,`\《,`\「,`\『,`\【,`\〔,`\〖,`\〘,`\〝,`\(,`\[,`\{,`\⦅ \do{\mybox{\@tmp}}\unskip,
278285 「文字コード$-1$の文字
279- \footnote{段落開始の\ \texttt{\textbackslash parindent}分インデントを表す.
286+ \footnote{段落開始の\ \cs{parindent}分インデントを表す.
280287 通常の\LuaTeX-jaにおける指定では「文字コード$-1$」は文中数式境界を表していることに注意.}」
281288 \end{quote}
282-さらに,以下の文字は\Param{rubypostintrusion}のみ初期値は1である:
289+さらに,以下の文字は\Param{rubypostintrusion}のみ初期値は$-1$である:
283290 \begin{quote}
284291 閉じ括弧類
285292 \@for\@tmp:=`\’,`\”,`\〉,`\》,`\」,`\』,`\】,`\〕,`\〗,`\〙,`\〟,`\),`\],`\},`\⦆ \do{\mybox{\@tmp}}\unskip,
@@ -289,7 +296,8 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1}
289296
290297 以上で記述されていない\Param{rubypreintrusion},~\Param{rubypostintrusion}の初期値はすべて0である.
291298
292-\paragraph{\texttt{\textbackslash ltjkenten}}
299+
300+\paragraph{\cs{ltjkenten}}
293301 圏点を出力する命令で,\verb+\kenten+ という別名を定義している.
294302 \begin{quote}
295303 \ttfamily\cs{ltjkenten}[<option>]\{親文字\}
@@ -366,8 +374,8 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1}
366374
367375
368376 \section{\ruby{注|意|点}{ちゆう|い|てん}}
369-\paragraph{前後からのルビ文字のはみ出し}
370-「日本語組版処理の要件」の図3.82のように,
377+\paragraph{前後からのルビ文字のはみ出し1}
378+「日本語組版処理の要件」の図117\footnote{2020-08-11版での番号.2012-04-03版では図3.82.}のように,
371379 前後からのルビ文字のはみ出しが繋がらないようにする処理が組み込まれている.
372380
373381 例えば,
@@ -378,8 +386,8 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1}
378386 において,1行目右側の「\ltjruby{陵}{みささぎ}」のルビが前の「と」にかかる量は次のように決まる:
379387 \begin{enumerate}
380388 \item 1回目の実行では,行分割前に「\ltjruby{陵}{りよう}」の\underline{後文字進入量}は前もって知ることはでき
381- ない.なので,「\ltjruby{陵}{りよう}」は行中形で組まれるものとして
382-「\ltjruby{陵}{みささぎ}」前文字進入許容量は
389+ ない.そのため,「\ltjruby{陵}{りよう}」は行中形で組まれるものと想定し,
390+「\ltjruby{陵}{みささぎ}」の前文字進入許容量は
383391 \[
384392 \underbrace{0.5\,\mathrm{zw}}_{\text{元々の許容量}}
385393 -\underbrace{0.25\,\mathrm{zw}}_{\text{前のルビの\underline{後文字進入量}(行中形)}}=0.25\,\mathrm{zw}
@@ -393,6 +401,7 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1}
393401 -\underbrace{0.25\,\mathrm{zw}}_{\text{前のルビの\underline{後文字進入量}(from \texttt{.ltjruby})}}=0.25\,\mathrm{zw}.
394402 \]
395403 \end{enumerate}
404+
396405 <jobname>\texttt{.ltjruby}ファイルに保存する際,各 \verb+\ltjruby+ 命令の呼び出しを識別するキーが必要になるが,
397406 そのキーとしては単純に「何個目の \verb+\ltjruby+ 命令か」である.
398407
@@ -400,6 +409,18 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1}
400409 「\ltjruby{陵}{みささぎ}」の\emph{\underline{前文字進入許容量}指定(\texttt{pre})が自動}になっている場合のみ
401410 実施される.
402411
412+
413+\paragraph{前後からのルビ文字のはみ出し2}
414+また,本パッケージのv0.**以降では,「日本語組版処理の要件」にある
415+\begin{quote}
416+ 後ろにくる終わり括弧類,句点類若しくは読点類,又は前にくる始め括弧類には,
417+ 最大でルビ文字サイズの全角までルビ文字を掛けてもよい.
418+ この場合,後ろにくる終わり括弧類,句点類若しくは読点類の後ろの空き量,
419+ 又は前にくる始め括弧類の前の空き量に掛けてはならない.
420+\end{quote}
421+という処理も組み込まれており,<jobname>\texttt{.ltjruby}に「前後の和文処理グルーに正の量だけ進入したか」という情報を
422+保存することによって実装されている.
423+
403424 \paragraph{段落末尾のルビ}
404425 段落がルビで終わった場合,そのルビが行末形で組まれることはない.
405426 これは,段落の「本当の」末尾には \verb+\penalty10000\parfillskip+ があるためで,
--- a/src/addons/luatexja-ruby.sty
+++ b/src/addons/luatexja-ruby.sty
@@ -18,9 +18,9 @@
1818 %% 引数:ルビ全角を単位とした実数
1919 %% この文字への pre-, post-intrusion の許容量
2020 \define@key[ltj]{japaram}{rubypreintrusion}{%
21- \ltj@@set@stack@real{RIPRE}{0}{0x7FFFFFFF}#1 }
21+ \ltj@@set@stack@real{RIPRE}{-0x7FFFFFFF}{0x7FFFFFFF}#1 }
2222 \define@key[ltj]{japaram}{rubypostintrusion}{%
23- \ltj@@set@stack@real{RIPOST}{0}{0x7FFFFFFF}#1 }
23+ \ltj@@set@stack@real{RIPOST}{-0x7FFFFFFF}{0x7FFFFFFF}#1 }
2424 \def\ltj@@set@stack@real#1#2#3{%
2525 \directlua{luatexja.stack.set_stack_perchar(luatexja.stack_table_index.#1,
2626 #2, #3, token.scan_word)}}
@@ -226,15 +226,15 @@
226226 \advance\count@1\repeat
227227 %% 開き括弧・閉じ括弧
228228 \@for\@tmp:=`\‘,`\“,`\〈,`\《,`\「,`\『,`\【,`\〔,`\〖,`\〘,`\〝,`\(,`\[,`\{,`\⦅ \do
229- {\ltjsetparameter{rubypreintrusion={\@tmp,1}}}
229+ {\ltjsetparameter{rubypreintrusion={\@tmp,-1}}}
230230 \@for\@tmp:=`\’,`\”,`\〉,`\》,`\」,`\』,`\】,`\〕,`\〗,`\〙,`\〟,`\),`\],`\},`\⦆ \do
231- {\ltjsetparameter{rubypostintrusion={\@tmp,1}}}
231+ {\ltjsetparameter{rubypostintrusion={\@tmp,-1}}}
232232 %% 中点類
233233 \@for\@tmp:=`\・,`\:,`\;,`\―,`\‥,`\…,`〳,`\〴,`\〵,"2014 \do
234234 {\ltjsetparameter{rubypreintrusion={\@tmp,0.5},rubypostintrusion={\@tmp,0.5}}}
235235 %% 読点・句点
236236 \@for\@tmp:=`\、,`\,,`\。,`\. \do
237- {\ltjsetparameter{rubypostintrusion={\@tmp,1}}}
237+ {\ltjsetparameter{rubypostintrusion={\@tmp,-1}}}
238238 %% 段落インデント部分
239239 \ltjsetparameter{rubypreintrusion={-1,1}}
240240
--- a/src/jfm-ujis.lua
+++ b/src/jfm-ujis.lua
@@ -356,6 +356,15 @@ for i,v in pairs(t) do
356356 if v.kern and v.kern[0] then v.kern[100] = v.kern[0] end
357357 end
358358 end
359+t[200]=table.fastcopy(t[0])
360+t[200].chars={ 0x3031,0x3032 }
361+t[200].height=1.38; t[200].depth=0.62
362+for i,v in pairs(t) do
363+ if type(i)=='number' and type(v)=='table' then
364+ if v.glue and v.glue[0] then v.glue[200] = v.glue[0] end
365+ if v.kern and v.kern[0] then v.kern[200] = v.kern[0] end
366+ end
367+end
359368
360369 local jf = luatexja.jfont.jfm_feature
361370 if jf and jf.beginpar_middledot_zw==true then
--- a/src/ltj-ruby.lua
+++ b/src/ltj-ruby.lua
@@ -52,6 +52,9 @@ local attr_ruby = luatexbase.attributes['ltj@rubyattr']
5252 -- * (whatsit).value node ではルビ全角の値(sp単位)
5353 -- * 行分割で whatsit の前後に並ぶノードでは,「何番目のルビ関連ノード」か
5454 -- * (whatsit).value に続く整形済み vbox たちでは post_intrusion の値
55+local attr_ruby_post_jfmgk = luatexbase.attributes['ltj@kcat3']
56+-- JAglue 処理時に,2つ前のクラスタもルビであれば,そのルビが直後の和文処理グルーへ
57+-- 正の進入をしたか否か(した:1,しなかった:0)
5558 local cat_lp = luatexbase.catcodetables['latex-package']
5659
5760 local round, floor = tex.round, math.floor
@@ -341,16 +344,24 @@ local function enlarge_parent(r, p, tmp_tbl, no_begin, no_end)
341344 setfield(p, 'width', rwidth)
342345 local ps = getlist(p)
343346 setfield(ps, 'width', getfield(ps, 'width') - pre_intrusion)
344- local orig_post_intrusion = post_intrusion
345- if no_end then orig_post_intrusion = max(orig_post_intrusion - tmp_tbl.after_jfmgk, 0) end
346- return r, p, orig_post_intrusion
347+ local orig_post_intrusion, post_jfmgk = post_intrusion, false
348+ if no_end then
349+ if orig_post_intrusion > tmp_tbl.after_jfmgk then
350+ orig_post_intrusion = orig_post_intrusion - tmp_tbl.after_jfmgk
351+ post_jfmgk = (tmp_tbl.after_jfmgk > 0)
352+ else
353+ orig_post_intrusion = 0
354+ post_jfmgk = (post_intrusion > 0)
355+ end
356+ end
357+ return r, p, orig_post_intrusion, post_jfmgk
347358 end
348359
349360 -- ルビボックスの生成(単一グループ)
350361 -- returned value: <new box>, <ruby width>, <post_intrusion>
351362 local max_margin
352363 local function new_ruby_box(r, p, tmp_tbl, no_begin, no_end)
353- local post_intrusion = 0
364+ local post_intrusion, post_jfmgk = 0, false
354365 local imode
355366 local ppre, pmid, ppost = tmp_tbl.ppre, tmp_tbl.pmid, tmp_tbl.ppost
356367 local mapre, mapost = tmp_tbl.mapre, tmp_tbl.mapost
@@ -360,7 +371,7 @@ local function new_ruby_box(r, p, tmp_tbl, no_begin, no_end)
360371 imode = (imode-rpost)/8; rmid = imode%8;
361372 imode = (imode-rmid)/8; rpre = imode%8
362373 if getfield(r, 'width') > getfield(p, 'width') then -- change the width of p
363- r, p, post_intrusion = enlarge_parent(r, p, tmp_tbl, no_begin, no_end)
374+ r, p, post_intrusion, post_jfmgk = enlarge_parent(r, p, tmp_tbl, no_begin, no_end)
364375 elseif getfield(r, 'width') < getfield(p, 'width') then -- change the width of r
365376 r = enlarge(r, getfield(p, 'width'), rpre, rmid, rpost, 0, 0)
366377 post_intrusion = 0
@@ -390,6 +401,7 @@ local function new_ruby_box(r, p, tmp_tbl, no_begin, no_end)
390401 if tmp_tbl.baseheight >= 0 then setfield(p, 'height', tmp_tbl.baseheight) end
391402 a = node.direct.vpack(r); setfield(a, 'shift', 0)
392403 set_attr(a, attr_ruby, post_intrusion)
404+ set_attr(a, attr_ruby_post_jfmgk, post_jfmgk and 1 or 0)
393405 if rsmash or getfield(a, 'height')<getfield(p, 'height') then
394406 local k = node_new(id_kern, 1)
395407 setfield(k, 'kern', -getfield(a, 'height')+getfield(p, 'height'))
@@ -397,12 +409,12 @@ local function new_ruby_box(r, p, tmp_tbl, no_begin, no_end)
397409 setfield(a, 'height', getfield(p, 'height'))
398410 end
399411
400- return a, getfield(r, 'width'), post_intrusion
412+ return a, getfield(r, 'width'), post_intrusion, post_jfmgk
401413 end
402414
403415
404416 -- High-level routine in pre_linebreak_filter
405-local post_intrusion_backup
417+local post_intrusion_backup, post_jfmgk_backup
406418 local max_allow_pre, max_allow_post
407419
408420
@@ -425,7 +437,7 @@ local function pre_low_cal_box(w, cmp)
425437 local nt, nta, ntb = wv, nil, nil -- nt*: node temp
426438 rst.ppre, rst.pmid, rst.ppost = rtb[6], rtb[5], rtb[4]
427439 rst.mapre, rst.mapost = max_allow_pre, 0
428- for i = 1, cmp do
440+ for i = 1, cmp do
429441 nt = node_next(nt); rb[i] = nt; nta = concat(nta, node_copy(nt))
430442 nt = node_next(nt); pb[i] = nt; ntb = concat(ntb, node_copy(nt))
431443 coef[i] = {}
@@ -455,7 +467,7 @@ local function pre_low_cal_box(w, cmp)
455467 for j = 1, 2*cmp+1 do coef[2*cmp+1][j] = 1 end
456468 rst.ppre, rst.pmid, rst.ppost = rtb[3], rtb[2], rtb[1]
457469 rst.mapre, rst.mapost = max_allow_pre, max_allow_post
458- kf[2*cmp+1], coef[2*cmp+1][2*cmp+2], post_intrusion_backup
470+ kf[2*cmp+1], coef[2*cmp+1][2*cmp+2], post_intrusion_backup, post_jfmgk_backup
459471 = new_ruby_box(nta, ntb, rst, true, true)
460472
461473 -- w.value の node list 更新.
@@ -517,7 +529,7 @@ end
517529 local function pre_high(ahead)
518530 if not ahead then return ahead end
519531 local head = to_direct(ahead)
520- post_intrusion_backup = 0
532+ post_intrusion_backup, post_jfmgk_backup = 0, false
521533 local n = first_whatsit(head)
522534 while n do
523535 if getsubtype(n) == sid_user and getfield(n, 'user_id') == RUBY_PRE then
@@ -526,17 +538,22 @@ local function pre_high(ahead)
526538 max_allow_pre = rst.pre or 0
527539 local atr = has_attr(n, attr_ruby) or 0
528540 if max_allow_pre < 0 then
529- if atr>0 then
530- -- 直前のルビで intrusion がおこる可能性あり.
531- -- 前 run のデータが残っていればそれを使用,
532- -- そうでなければ行中形のデータを利用する
533- local op = old_break_info[atr] or post_intrusion_backup
534- max_allow_pre = max(0, -max_allow_pre - op)
535- else
536- max_allow_pre = -max_allow_pre
537- end
541+ -- 直前のルビで intrusion がおこる可能性あり.
542+ -- 前 run のデータが残っていればそれを使用,
543+ -- そうでなければ行中形のデータを利用する
544+ local op = (atr>0) and (old_break_info[atr] or post_intrusion_backup) or 0
545+ max_allow_pre = max(0, -max_allow_pre - op)
546+ end
547+ if rst.exclude_pre_from_prev_ruby and ((atr>0) and (old_break_info[-atr]>0) or post_jfmgk_backup) then
548+ -- 「直前のルビが JFM グルーに進入→現在のルビの前文字進入はなし」という状況
549+ max_allow_pre = 0; rst.exclude_pre_from_prev_ruby=false
538550 end
539- post_intrusion_backup = 0
551+ if rst.exclude_pre_jfmgk_from_prev_ruby
552+ and (atr>0) and ((old_break_info[atr] or post_intrusion_backup) > 0) then
553+ -- 「直前のルビが文字に進入→現在のルビの和文処理グルーへの進入はなし」という状況
554+ rst.before_jfmgk = 0
555+ end
556+ post_intrusion_backup, post_jfmgk_backup = 0, false
540557 max_allow_post = rst.post or 0
541558 max_margin = rst.maxmargin or 0
542559 local coef = pre_low_cal_box(n, rst.count)
@@ -558,11 +575,11 @@ luatexbase.add_to_callback('hpack_filter', pre_high, 'ltj.ruby.pre', 100)
558575 ----------------------------------------------------------------
559576 local post_lown
560577 do
561- local function write_aux(wv, num)
578+ local function write_aux(wv, num, bool)
562579 local id = has_attr(wv, attr_ruby_id)
563580 if id>0 and cache_handle then
564581 cache_handle:write(
565- 'lrob[' .. tostring(id) .. ']=' .. num .. '\n')
582+ 'lrob[' .. tostring(id) .. ']=' .. num .. '\nlrob[' .. tostring(-id) .. ']=' .. tostring(bool) .. '\n')
566583 end
567584 end
568585
@@ -578,7 +595,7 @@ do
578595 node_remove(wv, hn)
579596 insert_after(ch, rs[1], hn)
580597 set_attr(hn, attr_icflag, PROCESSED)
581- write_aux(wv, has_attr(hn, attr_ruby))-- 行中形
598+ write_aux(wv, has_attr(hn, attr_ruby), has_attr(hn, attr_ruby_post_jfmgk))-- 行中形
582599 else
583600 local deg, hn = (fn-1)/2, wv
584601 for i = 1, deg do hn = node_next(hn) end;
@@ -586,7 +603,7 @@ do
586603 setfield(hn, 'next', nil)
587604 insert_after(ch, rs[1], hn)
588605 set_attr(hn, attr_icflag, PROCESSED)
589- write_aux(wv, has_attr(hn, attr_ruby))
606+ write_aux(wv, has_attr(hn, attr_ruby), has_attr(hn, attr_ruby_post_jfmgk))
590607 end
591608 else
592609 local deg, hn = max((hn-1)/2,2), wv
@@ -597,7 +614,7 @@ do
597614 insert_after(ch, rs[1], hn)
598615 set_attr(hn, attr_icflag, PROCESSED)
599616 if fn == 2*cmp-1 then
600- write_aux(wv, has_attr(hn, attr_ruby))
617+ write_aux(wv, has_attr(hn, attr_ruby), has_attr(hn, attr_ruby_post_jfmgk))
601618 end
602619 end
603620 for i = 1,#rs do
@@ -682,6 +699,8 @@ luatexbase.add_to_callback('hpack_filter', post_high_hbox, 'ltj.ruby.post_hbox',
682699 ----------------------------------------------------------------
683700 do
684701 local RIPRE = luatexja.stack_table_index.RIPRE
702+ local RIPOST = luatexja.stack_table_index.RIPOST
703+ local abs = math.abs
685704 local function whatsit_callback(Np, lp, Nq)
686705 if Np.nuc then return Np
687706 elseif getfield(lp, 'user_id') == RUBY_PRE then
@@ -694,25 +713,27 @@ do
694713 if type(Nq.char)=='number' then
695714 -- Nq is a JAchar
696715 if rst.pre < 0 then -- auto
697- local p = round((ltjs.table_current_stack[RIPRE + Nq.char] or 0)
698- *rst.rubyzw)
716+ local s = ltjs.table_current_stack[RIPRE + Nq.char] or 0
717+ local p = round(abs(s)*rst.rubyzw)
699718 if rst.mode%2 == 0 then -- intrusion 無効
700719 p = 0
701720 end
702- rst.pre = -p
721+ rst.pre = -p; rst.exclude_pre_from_prev_ruby = (s<0);
722+ rst.exclude_pre_jfmgk_from_prev_ruby = (ltjs.table_current_stack[RIPOST +Nq.char] or 0)<0;
703723 end
704724 if Nq.prev_ruby then
705725 set_attr(lp, attr_ruby, Nq.prev_ruby)
706726 end
707727 elseif rst.pre < 0 then -- auto
708728 if Nq.char == 'parbdd' then
709- local p = round((ltjs.table_current_stack[RIPRE-1] or 0)
710- *rst.rubyzw)
729+ local s = ltjs.table_current_stack[RIPRE - 1] or 0
730+ local p = round(abs(s)*rst.rubyzw)
711731 p = min(p, Nq.width)
712- if rst.mode%2 == 0 then -- intrusion 無効
732+ if rst.mode%2 == 0 then -- intrusion 無効
713733 p = 0
714734 end
715- rst.pre = p
735+ rst.pre = p; rst.exclude_pre_from_prev_ruby = (s<0);
736+ rst.exclude_pre_jfmgk_from_prev_ruby = (ltjs.table_current_stack[RIPOST -1] or 0)<0;
716737 else
717738 rst.pre = 0
718739 end
@@ -741,6 +762,7 @@ do
741762 end
742763 end
743764 local RIPOST = luatexja.stack_table_index.RIPOST
765+ local abs = math.abs
744766 local function whatsit_after_callback(s, Nq, Np)
745767 if not s and getfield(Nq.nuc, 'user_id') == RUBY_PRE then
746768 if Np then
@@ -764,8 +786,7 @@ do
764786 if Np and Np.id ~=id_pbox_w and type(Np.char)=='number' then
765787 -- Np is a JAchar
766788 if rst.post < 0 then -- auto
767- local p = round((ltjs.table_current_stack[RIPOST + Np.char] or 0)
768- *rst.rubyzw)
789+ local p = round(abs(ltjs.table_current_stack[RIPOST + Np.char] or 0)*rst.rubyzw)
769790 if rst.mode%2 == 0 then -- intrusion 無効
770791 p = 0
771792 end
--- a/src/patches/lltjp-tascmac.sty
+++ b/src/patches/lltjp-tascmac.sty
@@ -44,6 +44,8 @@
4444
4545 %% screen environment
4646 \def\screen{%
47+ \typeout{AL: \the\ltj@yablshift:\the\ltj@tablshift.}
48+ \typeout{JA: \the\ltj@ykblshift:\the\ltj@tkblshift.}
4749 \@saveybaselineshift\ltj@yablshift sp\ltj@yablshift\z@
4850 \@savetbaselineshift\ltj@tablshift sp\ltj@tablshift\z@
4951 \@ifnextchar[{\@screen}{\@screen[0]}}
Show on old repository browser