2 % lltjext.sty: derived from plext.sty in pLaTeX.
4 \NeedsTeXFormat{LaTeX2e}
5 \ProvidesPackage{lltjext}
6 [2014/07/26 v1.2-ltj-1 ...]
7 \RequirePackage{luatexja}
11 \def\array{\let\@acol\@arrayacol \let\@classz\@arrayclassz
12 \let\@classiv\@arrayclassiv
13 \let\\\@arraycr\let\@halignto\@empty\X@tabarray}
14 \def\tabular{\let\@halignto\@empty\X@tabular}
15 \@namedef{tabular*}{\@ifnextchar<%>
16 {\@stabular}{\@stabular<Z>}}
17 \def\X@tabarray{\@ifnextchar<%>
18 {\p@tabarray}{\p@tabarray<Z>}}
19 \def\X@tabular{\@ifnextchar<%>
20 {\p@tabular}{\p@tabular<Z>}}
21 \def\@stabular<#1>#2{\def\@halignto{to#2}\p@tabular<#1>}
22 \def\p@tabular<#1>{\leavevmode \hbox \bgroup $\let\@acol\@tabacol
23 \let\@classz\@tabclassz
24 \let\@classiv\@tabclassiv \let\\\@tabularcr\p@tabarray<#1>}
25 \def\p@tabarray<#1>{\m@th\@ifnextchar[%]
26 {\p@array<#1>}{\p@array<#1>[c]}}
28 \def\p@array<#1>[#2]#3{%
31 \ifnum\ltjgetparameter{direction}=3\relax
32 \let\box@dir\utod\@tempcnta=\zstrutbox
36 \let\box@dir\yoko\@tempcnta=\strutbox
38 \let\box@dir\tate\@tempcnta=\tstrutbox
40 \let\box@dir\dtou\@tempcnta=\dstrutbox
42 \let\box@dir\utod\@tempcnta=\zstrutbox
46 \ifcase\ltjgetparameter{direction}
47 \or \let\box@dir\dtou\@tempcnta=\dstrutbox% dtou
48 \or\or\let\box@dir\tate\@tempcnta=\tstrutbox% tate
49 \or \let\box@dir\yoko\@tempcnta=\strutbox% yoko
50 \else \let\box@dir\utod\@tempcnta=\zstrutbox% utod
53 \setbox\@arstrutbox\hbox{%
55 \vrule\@height\arraystretch\ltjgetht\@tempcnta
56 \@depth\arraystretch\ltjgetdp\@tempcnta \@width\z@}%
57 \fork@array@option<#1>[#2]%
58 \@mkpream{#3}\edef\@preamble{\ialign \noexpand\@halignto
59 \bgroup \tabskip\z@skip \@arstrut \@preamble \tabskip\z@skip \cr}%
60 \let\@startpbox\@@startpbox \let\@endpbox\@@endpbox
61 \let\tabularnewline\\%
62 \@begin@alignbox\bgroup\box@dir\adjustbaseline
64 \let\@sharp##\let\protect\relax
65 \lineskip\z@skip\baselineskip\z@skip\@preamble}
66 \def\endarray{\crcr\egroup\egroup\@end@alignbox}
67 \def\endtabular{\crcr\egroup\egroup\@end@alignbox$\egroup}
68 \expandafter \let \csname endtabular*\endcsname = \endtabular
69 \def\fork@array@option<#1>[#2]{%
70 \ifnum\ltjgetparameter{direction}=4 % yoko
73 \let\@begin@alignbox\vtop
74 \let\@end@alignbox\relax
76 \let\@begin@alignbox\vbox
77 \let\@end@alignbox\relax
79 \let\@begin@alignbox\vcenter
80 \let\@end@alignbox\relax
84 \def\@begin@alignbox{\vtop\bgroup\kern\z@\vbox}%
85 \def\@end@alignbox{\egroup}%
87 \let\@begin@alignbox\vbox
88 \let\@end@alignbox\relax
90 \let\@begin@alignbox\vcenter
91 \let\@end@alignbox\relax
94 \else\ifnum\ltjgetparameter{direction}=1 % dtou
97 \def\@begin@alignbox{\vtop\bgroup\kern\z@\vbox}%
98 \def\@end@alignbox{\egroup}%
100 \let\@begin@alignbox\vbox
101 \let\@end@alignbox\relax
103 \let\@begin@alignbox\vcenter
104 \let\@end@alignbox\relax
106 \else\ifx\box@dir\dtou
108 \let\@begin@alignbox\vtop
109 \let\@end@alignbox\relax
111 \let\@begin@alignbox\vbox
112 \let\@end@alignbox\relax
114 \let\@begin@alignbox\vcenter
115 \let\@end@alignbox\relax
117 \else % 180 度回転→vtop, vbox を入れ替える
119 \let\@begin@alignbox\vbox %%% !!!
120 \let\@end@alignbox\relax
122 \let\@begin@alignbox\vtop %%% !!!
123 \let\@end@alignbox\relax
125 \let\@begin@alignbox\vcenter
126 \let\@end@alignbox\relax
132 \def\@begin@alignbox{\vtop\bgroup\kern\z@\vbox}%
133 \def\@end@alignbox{\egroup}%
135 \def\@begin@alignbox{\vbox\bgroup\vbox}%
136 \def\@end@alignbox{\kern\z@\egroup}%
138 \let\@begin@alignbox\vcenter
139 \let\@end@alignbox\relax
141 \else\ifx\box@dir\dtou % 180 度回転→vtop, vbox を入れ替える
143 \let\@begin@alignbox\vbox %%% !!!
144 \let\@end@alignbox\relax
146 \let\@begin@alignbox\vtop %%% !!!
147 \let\@end@alignbox\relax
149 \let\@begin@alignbox\vcenter
150 \let\@end@alignbox\relax
154 \let\@begin@alignbox\vtop
155 \let\@end@alignbox\relax
157 \let\@begin@alignbox\vbox
158 \let\@end@alignbox\relax
160 \let\@begin@alignbox\vcenter
161 \let\@end@alignbox\relax
170 \newdimen\floatheight
171 \newdimen\floatruletick \floatruletick=0.4pt
172 \newdimen\captionfloatsep \captionfloatsep=10pt
174 \let\captiondir\relax
175 \newdimen\captionwidth \captionwidth\z@
179 \def\captionfontsetup{\normalfont\normalsize}
180 \def\layoutfloat{\@ifnextchar(%)
181 {\X@layoutfloat}{\X@layoutfloat(-5\p@,-5\p@)}}
182 \def\X@layoutfloat(#1,#2){\@ifnextchar[%]
183 {\@layoutfloat(#1,#2)}{\@layoutfloat(#1,#2)[c]}}
184 \long\def\@layoutfloat(#1,#2)[#3]#4{%
186 \floatwidth=#1 \floatheight=#2 \edef\float@pos{#3}%
187 \ifdim\floatwidth<\z@
188 \floatwidth\ltjgetwd\z@\floatruletick\z@
190 \ifdim\floatheight<\z@
191 \floatheight\ltjgetht\z@\advance\floatheight\ltjgetdp\z@\relax
194 \setbox\@floatbox\vbox to\floatheight{\offinterlineskip
195 \hrule width\floatwidth height\floatruletick depth\z@
196 \vss\hbox to\floatwidth{%
197 \vrule width\floatruletick height\floatheight depth\z@
198 \hss\vbox to\floatheight{\hsize\floatwidth\vss#4\vss}\hss
199 \vrule width\floatruletick height\floatheight depth\z@
200 }\hrule width\floatwidth height\floatruletick depth\z@}}
201 \def\DeclareLayoutCaption#1<#2>(#3)[#4#5]{%
203 \ifx\csname #1@layoutcaption\endcsname\relax \else
204 \@latex@info{Redeclaring capiton layout setting of '#1'}%
207 \gdef\csname #1@layoutcaption\endcsname{%
208 \if Z\caption@dir\def\caption@dir{#2}\fi
209 \ifdim\captionwidth=\z@ \captionwidth=#3\relax\fi
210 \if Z\caption@posa\def\caption@posa{#4}\fi
211 \if Z\caption@posb\def\caption@posb{#5}\fi}}
212 \@onlypreamble\DeclareLayoutCaption
213 \DeclareLayoutCaption{figure}<y>(.8\linewidth)[cd]
214 \DeclareLayoutCaption{table}<y>(.8\linewidth)[cu]
215 \def\layoutcaption{\def\caption@dir{Z}\captionwidth\z@
216 \def\caption@posa{Z}\def\caption@posb{Z}%
217 \@ifnextchar<\X@layoutcaption{%
218 \@ifnextchar(\@ilayoutcaption{%
219 \@ifnextchar[\@iilayoutcaption\relax}}}
220 \def\X@layoutcaption<#1>{\def\caption@dir{#1}%
221 \@ifnextchar(\@ilayoutcaption{%
222 \@ifnextchar[\@iilayoutcaption\relax}}
223 \def\@ilayoutcaption(#1){\setlength\captionwidth{#1}%
224 \@ifnextchar[{\@iilayoutcaption}{\relax}}
225 \def\@iilayoutcaption[#1#2]{%
226 \def\caption@posa{#1}\def\caption@posb{#2}}
227 \def\pcaption{\refstepcounter\@captype \@dblarg{\@pcaption\@captype}}
228 \long\def\@pcaption#1[#2]#3{%
229 \addcontentsline{\csname ext@#1\endcsname}{#1}{%
230 \protect\numberline{\csname the#1\endcsname}{\ignorespaces#2}}%
232 \latex@error{Use with `\protect\layoutfloat'.}\@eha
234 \make@pcaptionbox{#3}%
236 \setbox\@tempboxa\vbox{\hbox to\hsize{\if l\float@pos\else\hss\fi
237 \if l\caption@posb\box\@captionbox\kern\captionfloatsep\fi
238 \if t\caption@posa\vtop
239 \else\if b\caption@posa\vbox
240 \else\ifmmode\vcenter \else\@pboxswtrue $\vcenter \fi\fi\fi
241 {\if u\caption@posb\box\@captionbox\kern\captionfloatsep\fi
243 \if d\caption@posb\kern\captionfloatsep\box\@captionbox\fi}%
244 \if r\caption@posb\kern\captionfloatsep\box\@captionbox\fi
245 \if@pboxsw \m@th$\fi \if r\float@pos\else\hss\fi}}%
246 \par\vskip.25\baselineskip
248 \def\make@pcaptionbox#1{%
250 \ifx\csname\@captype @layoutcaption\endcsname\relax
251 \@latex@warning{Default caption layout of `\@captype' unknown.}%
252 \def\caption@dir{Z}\captionwidth\z@
253 \def\caption@posa{Z}\def\caption@posb{Z}%
255 \csname \@captype @layoutcaption\endcsname
258 % tempswa\hline 基本組の組方向とキャプションの組方向が直交するか?
259 \if y\caption@dir \let\captiondir\yoko
260 \ifodd\ltjgetparameter{direction}\relax\@tempswatrue\fi
261 \else\if z\caption@dir \let\captiondir\relax
262 \ifnum\ltjgetparameter{direction}=3\relax\let\captiondir\utod\fi
263 \else\if d\caption@dir \let\captiondir\dtou
264 \ifodd\ltjgetparameter{direction}\else\@tempswatrue\fi
265 \else\if u\caption@dir \let\captiondir\utod
266 \ifodd\ltjgetparameter{direction}\else\@tempswatrue\fi
267 \else\if t\caption@dir \let\captiondir\tate
268 \ifodd\ltjgetparameter{direction}\else\@tempswatrue\fi
270 \setbox0\hbox{\hbox{\captiondir
271 \captionfontsetup\parindent\z@\inhibitglue
272 \csname fnum@\@captype\endcsname #1}}%"
273 \if@tempswa\@tempdima\ltjgetht0\relax\else\@tempdima\ltjgetwd0\relax\fi
274 \ifdim\@tempdima>\captionwidth \@tempdima\captionwidth \fi
277 \if u\caption@posb\vbox
278 \else\if d\caption@posb\vbox
279 \else\if t\caption@posa\vtop
280 \else\if b\caption@posa\vbox
281 \else\ifmmode\vcenter\else\@pboxswtrue $\vcenter\fi
283 {\hsize\@tempdima\kern\z@
284 \vbox{\captiondir\hsize\@tempdima
285 \captionfontsetup\parindent\z@\inhibitglue
286 \csname fnum@\@captype\endcsname #1}\kern\z@
287 }\if@pboxsw \m@th$\fi}%
288 \let\to@captionboxwidth\relax
289 \if l\caption@posb \else\if r\caption@posb\else
290 \def\to@captionboxwidth{to\floatwidth}\fi\fi
291 \setbox\@captionbox\hbox\to@captionboxwidth{%
292 \if t\caption@posa\else\hss\fi
294 \if b\caption@posa\else\hss\fi}}
296 %%% minipage and parbox
297 \def\minipage{\@ifnextchar<%>
298 {\X@minipage}{\X@minipage<Z>}}
299 \def\X@minipage<#1>{\@ifnextchar[%]
300 {\@iminipage<#1>}{\@iiiminipage<#1>{c}\@empty[s]}}
301 \def\@iminipage<#1>[#2]{\@ifnextchar[%]
302 {\@iiminipage<#1>{#2}}{\@iiiminipage<#1>{#2}\@empty[s]}}
303 \def\@iiminipage<#1>#2[#3]{\@ifnextchar[%]
304 {\@iiiminipage<#1>{#2}{#3}}{\@iiiminipage<#1>{#2}{#3}[#2]}}
305 \def\@iiiminipage<#1>#2#3[#4]#5{%
307 \setlength\@tempdima{#5}%
308 \def\@mpargs{<#1>{#2}{#3}[#4]{#5}}%
311 \ifnum\ltjgetparameter{direction}=3\relax
315 \if #1y\relax \let\box@dir\yoko
316 \else\if #1t\relax\let\box@dir\tate
317 \else\if #1d\relax\let\box@dir\dtou
318 \else\if #1u\relax\let\box@dir\utod
322 \ifcase\ltjgetparameter{direction}\relax
323 \or \let\box@dir\dtou
324 \or\or\let\box@dir\tate
325 \or \let\box@dir\yoko
326 \else \let\box@dir\utod
329 \setbox\@tempboxa\vbox\bgroup\box@dir
333 \textwidth\hsize \columnwidth\hsize
335 \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}%
337 \let\@footnotetext\@mpfootnotetext
338 \let\@listdepth\@mplistdepth \@mplistdepth\z@
340 \global\@minipagetrue %% \global added 24 May 89
341 \everypar{\global\@minipagefalse\everypar{}}}
345 \ifvoid\@mpfootins\else
346 \vskip\skip\@mpfootins
351 \global\@minipagefalse %% added 24 May 89
354 \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}\egroup}
355 \def\parbox{\@ifnextchar<%>
356 {\X@parbox}{\X@parbox<Z>}}
357 \def\X@parbox<#1>{\@ifnextchar[%]
358 {\@iparbox<#1>}{\@iiiparbox<#1>{c}\@empty[s]}}
359 \def\@iparbox<#1>[#2]{\@ifnextchar[%]
360 {\@iiparbox<#1>{#2}}{\@iiiparbox<#1>{#2}\@empty[s]}}
361 \def\@iiparbox<#1>#2[#3]{\@ifnextchar[%]%
362 {\@iiiparbox<#1>{#2}{#3}}{\@iiiparbox<#1>{#2}{#3}[#2]}}
363 \long\def\@iiiparbox<#1>#2#3[#4]#5#6{%
365 \setlength\@tempdima{#5}%
366 \fork@parbox@option<#1>[#2]%
367 \@begin@tempboxa\vbox{\box@dir
368 \hsize\@tempdima\@parboxrestore\adjustbaseline#6\endgraf}%
369 \ifx\@empty#3\relax\else
370 \setlength\@tempdimb{#3}%
371 \def\@parboxto{to\@tempdimb}%
373 \@begin@parbox\@parboxto{\box@dir\adjustbaseline
374 \let\hss\vss\let\unhbox\unvbox
375 \csname bm@#4\endcsname}\@end@parbox
376 \@end@tempboxa\egroup}
377 \def\fork@parbox@option<#1>[#2]{%
380 \ifnum\ltjgetparameter{direction}=3\relax
384 \if #1y\relax \let\box@dir\yoko
385 \else\if #1t\relax\let\box@dir\tate
386 \else\if #1d\relax\let\box@dir\dtou
387 \else\if #1u\relax\let\box@dir\utod
391 \ifcase\ltjgetparameter{direction}\relax
392 \or \let\box@dir\dtou
393 \or\or\let\box@dir\tate
394 \or \let\box@dir\yoko
395 \else \let\box@dir\utod
398 %%% now almost same as \fork@array@option
399 \ifnum\ltjgetparameter{direction}=4 % yoko
402 \let\@begin@parbox\vtop
403 \let\@end@parbox\relax
405 \let\@begin@parbox\vbox
406 \let\@end@parbox\relax
408 \def\@begin@parbox{$\vcenter}%
409 \def\@end@parbox{\m@th$}%
413 \def\@begin@parbox{\vtop\bgroup\kern\z@\vbox}%
414 \def\@end@parbox{\egroup}%
416 \let\@begin@parbox\vbox
417 \let\@end@parbox\relax
419 \def\@begin@parbox{$\vcenter}%
420 \def\@end@parbox{\m@th$}%
423 \else\ifnum\ltjgetparameter{direction}=1 % dtou
426 \def\@begin@parbox{\vtop\bgroup\kern\z@\vbox}
427 \def\@end@parbox{\egroup}
429 \let\@begin@parbox\vbox
430 \let\@end@parbox\relax
432 \def\@begin@parbox{$\vcenter}%
433 \def\@end@parbox{\m@th$}%
435 \else\ifx\box@dir\dtou
437 \let\@begin@parbox\vtop
438 \let\@end@parbox\relax
440 \let\@begin@parbox\vbox
441 \let\@end@parbox\relax
443 \def\@begin@parbox{$\vcenter}%
444 \def\@end@parbox{\m@th$}%
446 \else % 180 度回転→vtop, vbox を入れ替える
448 \let\@begin@parbox\vbox %%% !!!
449 \let\@end@parbox\relax
451 \let\@begin@parbox\vtop %%% !!!
452 \let\@end@parbox\relax
454 \def\@begin@parbox{$\vcenter}%
455 \def\@end@parbox{\m@th$}%
461 \def\@begin@parbox{\vtop\bgroup\kern\z@\vbox}%
462 \def\@end@parbox{\egroup}%
464 \def\@begin@parbox{\vbox\bgroup\vbox}%
465 \def\@end@parbox{\kern\z@\egroup}%
467 \def\@begin@parbox{$\vcenter}%
468 \def\@end@parbox{\m@th$}%
470 \else\ifx\box@dir\dtou % 180 度回転→vtop, vbox を入れ替える
472 \let\@begin@parbox\vbox %%% !!!
473 \let\@end@parbox\relax
475 \let\@begin@parbox\vtop %%% !!!
476 \let\@end@parbox\relax
478 \def\@begin@parbox{$\vcenter}%
479 \def\@end@parbox{\m@th$}%
483 \let\@begin@parbox\vtop
484 \let\@end@parbox\relax
486 \let\@begin@parbox\vbox
487 \let\@end@parbox\relax
489 \def\@begin@parbox{$\vcenter}%
490 \def\@end@parbox{\m@th$}%
497 \def\pbox{\leavevmode\@ifnextchar<{\X@makePbox}{\X@makePbox<Z>}}
498 \def\X@makePbox<#1>{%
499 \@ifnextchar[{\@imakePbox<#1>}{\@imakePbox<#1>[-5\p@]}}
500 \def\@imakePbox<#1>[#2]{\@ifnextchar[%]
501 {\@iimakePbox<#1>{#2}}{\@iimakePbox<#1>{#2}[c]}}
502 \def\@iimakePbox<#1>#2[#3]#4{%
503 \bgroup\let\box@dir\relax
505 \ifnum\ltjgetparameter{direction}=3 \relax
509 \if #1y\relax \let\box@dir\yoko
510 \else\if #1t\relax\let\box@dir\tate
511 \else\if #1d\relax\let\box@dir\dtou
512 \else\if #1u\relax\let\box@dir\utod
516 \ifcase\ltjgetparameter{direction}
517 \or \let\box@dir\dtou
518 \or\or\let\box@dir\tate
519 \or \let\box@dir\yoko
520 \else \let\box@dir\utod
523 \ifdim #2 <\z@ \hbox{\box@dir#4}\else
525 \if #3l\relax\else\hss\fi
527 \if #3r\relax\else\hss\fi}\fi\egroup}
530 \def\picture{\@ifnextchar<%>
531 {\X@picture}{\X@picture<Z>}}
532 \def\X@picture<#1>(#2,#3){\@ifnextchar(%)
533 {\@@picture<#1>(#2,#3)}{\@@picture<#1>(#2,#3)(0,0)}}
535 \def\ltj@@pic@reset@blshift{%
536 \ltj@yablshift\z@\ltj@ykblshift\z@
537 \ltj@tablshift\z@\ltj@tkblshift\z@
539 \def\@@picture<#1>(#2,#3)(#4,#5){%
540 \edef\ltj@@pic@save@blshift{%
541 \noexpand\ltj@yablshift\the\ltj@yablshift\noexpand\relax
542 \noexpand\ltj@ykblshift\the\ltj@ykblshift\noexpand\relax
543 \noexpand\ltj@tablshift\the\ltj@tablshift\noexpand\relax
544 \noexpand\ltj@tkblshift\the\ltj@tkblshift\noexpand\relax
546 \bgroup\let\box@dir\relax
548 \ifnum\ltjgetparameter{direction}=3 \relax
552 \if #1y\relax \let\box@dir\yoko
553 \else\if #1t\relax\let\box@dir\tate
554 \else\if #1d\relax\let\box@dir\dtou
555 \else\if #1u\relax\let\box@dir\utod
559 \ifcase\ltjgetparameter{direction}
560 \or \let\box@dir\dtou
561 \or\or\let\box@dir\tate
562 \or \let\box@dir\yoko
563 \else \let\box@dir\utod
566 \@picwd=#2\unitlength \@picht=#3\unitlength
567 \setbox\@picbox\hbox to\@picwd\bgroup\box@dir
568 \hskip-#4\unitlength\lower#5\unitlength\hbox\bgroup
569 \ltj@@pic@reset@blshift
573 \setbox0=\hbox{\box@dir%
574 \ltjsetht\@picbox\@picht \ltjsetdp\@picbox\z@
577 \ifnum\ltjgetparameter{direction}=3 \@tempswatrue\fi
578 \ifnum\ltjgetparameter{direction}=11 \@tempswatrue\fi
580 \ifx\box@dir\yoko % この場合だけ垂直位置補正が必要
581 \ltjsetht\@picbox\dimexpr\ltjgetht\@picbox+\ltjgetdp\@picbox\relax
586 \egroup\ltj@@pic@save@blshift}
588 \def\put{\ltj@@pic@reset@blshift\org@put}
590 \def\line{\ltj@@pic@reset@blshift\org@line}
591 \let\org@vector\vector
592 \def\vector{\ltj@@pic@reset@blshift\org@vector}
593 \let\org@dashbox\dashbox
594 \def\dashbox{\ltj@@pic@reset@blshift\org@dashbox}
596 \def\oval{\ltj@@pic@reset@blshift\org@oval}
597 \let\org@circle\circle
598 \def\circle{\ltj@@pic@reset@blshift\org@circle}
601 \newif\ifnot@advanceline
603 \rensujiskip=0.25\chs plus.25\zw minus.25\zw
604 \DeclareRobustCommand\rensuji{%
605 \@ifstar{\not@advancelinetrue\@rensuji}{\@rensuji}}
606 \def\@rensuji{\@ifnextchar[{\@@rensuji}{\@@rensuji[c]}}
607 \def\@@rensuji[#1]#2{\ifnum\ltjgetparameter{direction}=4\relax%
610 \ifvmode\leavevmode\fi
611 \ifnot@advanceline\not@advancelinefalse\else
612 \setbox\z@\hbox{\yoko#2}%
613 \@tempdima\ltjgetht\z@ \advance\@tempdima\ltjgetdp\z@
614 \ifnum\ltjgetparameter{direction}=1\relax
615 \if #1c\relax\vrule \@width \z@ \@height.5\@tempdima \@depth.5\@tempdima
616 \else\if #1l\relax\vrule\@width \z@\@height\z@ \@depth\@tempdima
617 \else\vrule\@width \z@ \@height\@tempdima \@depth\z@
620 \if #1c\relax\vrule \@width \z@ \@height.5\@tempdima \@depth.5\@tempdima
621 \else\if #1r\relax\vrule\@width \z@\@height\z@ \@depth\@tempdima
622 \else\vrule\@width \z@ \@height\@tempdima \@depth\z@
626 \ifnum\ltjgetparameter{direction}=1\relax
627 \if #1c\relax\hbox to\zw{\yoko\hss#2\hss}%
628 \else\if #1r\relax\vbox{\hbox to\zw{\yoko\hss#2}\kern\z@}%
629 \else\vtop{\kern\z@\hbox to\zw{\yoko#2\hss}}%
632 \if #1c\relax\hbox to\zw{\yoko\hss#2\hss}%
633 \else\if #1r\relax\vtop{\kern\z@\hbox to\zw{\yoko\hss#2}}%
634 \else\vbox{\hbox to\zw{\yoko #2\hss}\kern\z@}%
640 \let\prensuji\rensuji
643 \def\Kanji#1{\expandafter\@Kanji\csname c@#1\endcsname}
644 \def\@Kanji#1{\expandafter\kansuji\number #1}
645 \def\kanji{\iftdir\expandafter\kansuji\fi}
649 \def\boutenchar{\char\euc"A1A2}
650 \def\bou#1{\ifvmode\leavevmode\fi\@bou#1\end}
652 \ifx#1\end \let\next=\relax
654 \ifnum\ltjgetparameter{direction}=3\relax
655 \hbox to\z@{\vbox to\z@{\boxmaxdepth\maxdimen
656 \vss\moveleft0.2\zw\hbox{\yoko\boutenchar}\nointerlineskip
657 \hbox{\char\euc"A1A1}}\hss}\nobreak#1\relax
659 \hbox to\z@{\vbox to\z@{\boxmaxdepth\maxdimen
660 \vss\moveleft-0.2\zw\hbox{\boutenchar}\nointerlineskip
661 \hbox{\char\euc"A1A1}}\hss}\nobreak#1\relax
668 \ifnum\ltjgetparameter{direction}=3\relax
669 \setbox\z@\hbox{#1}\leavevmode\raise.7\zw
670 \hbox to\z@{\vrule\@width\wd\z@ \@depth\z@ \@height.4\p@\hss}%
672 \else\underline{#1}\fi}
675 \def\@eqnnum{{\reset@font\rmfamily \normalcolor
676 \ifnum\ltjgetparameter{direction}=3 \raise.25\zh\hbox{\yoko(\theequation)}%
677 \else (\theequation)\fi}}
678 \def\@thecounter#1{\noexpand\rensuji{\noexpand\arabic{#1}}}
679 \def\@thmcounter#1{\noexpand\rensuji{\noexpand\arabic{#1}}}