OSDN Git Service

Trivial changes.
[luatex-ja/luatexja.git] / src / lltjcore.sty
1 %%
2 %% lltjcore.sty: derived from plcore.dtx in pLaTeX.
3 %% This file does not include the code relating to "tategaki".
4 %% 
5 \makeatletter
6 \newif\iftombow \tombowfalse
7 \newif\iftombowdate \tombowdatetrue
8 \newdimen\@tombowwidth
9 \setlength{\@tombowwidth}{.1\p@}
10 \newbox\@TL\newbox\@Tl
11 \newbox\@TC
12 \newbox\@TR\newbox\@Tr
13 \newbox\@BL\newbox\@Bl
14 \newbox\@BC
15 \newbox\@BR\newbox\@Br
16 \newbox\@CL
17 \newbox\@CR
18 \font\@bannerfont=cmtt9
19 \newtoks\@bannertoken
20 \@bannertoken{}
21 \def\maketombowbox{%
22   \setbox\@TL\hbox to\z@{\yoko\hss
23       \vrule width13mm height\@tombowwidth depth\z@
24       \vrule height10mm width\@tombowwidth depth\z@
25       \iftombowdate
26         \raise4pt\hbox to\z@{\hskip5mm\@bannerfont\the\@bannertoken\hss}%
27       \fi}%
28   \setbox\@Tl\hbox to\z@{\yoko\hss
29       \vrule width10mm height\@tombowwidth depth\z@
30       \vrule height13mm width\@tombowwidth depth\z@}%
31   \setbox\@TC\hbox{\yoko
32       \vrule width10mm height\@tombowwidth depth\z@
33       \vrule height10mm width\@tombowwidth depth\z@
34       \vrule width10mm height\@tombowwidth depth\z@}%
35   \setbox\@TR\hbox to\z@{\yoko
36       \vrule height10mm width\@tombowwidth depth\z@
37       \vrule width13mm height\@tombowwidth depth\z@\hss}%
38   \setbox\@Tr\hbox to\z@{\yoko
39       \vrule height13mm width\@tombowwidth depth\z@
40       \vrule width10mm height\@tombowwidth depth\z@\hss}%
41   \setbox\@BL\hbox to\z@{\yoko\hss
42       \vrule width13mm depth\@tombowwidth height\z@
43       \vrule depth10mm width\@tombowwidth height\z@}%
44   \setbox\@Bl\hbox to\z@{\yoko\hss
45       \vrule width10mm depth\@tombowwidth height\z@
46       \vrule depth13mm width\@tombowwidth height\z@}%
47   \setbox\@BC\hbox{\yoko
48       \vrule width10mm depth\@tombowwidth height\z@
49       \vrule depth10mm width\@tombowwidth height\z@
50       \vrule width10mm depth\@tombowwidth height\z@}%
51   \setbox\@BR\hbox to\z@{\yoko
52       \vrule depth10mm width\@tombowwidth height\z@
53       \vrule width13mm depth\@tombowwidth height\z@\hss}%
54   \setbox\@Br\hbox to\z@{\yoko
55       \vrule depth13mm width\@tombowwidth height\z@
56       \vrule width10mm depth\@tombowwidth height\z@\hss}%
57   \setbox\@CL\hbox to\z@{\yoko\hss
58       \vrule width10mm height.5\@tombowwidth depth.5\@tombowwidth
59       \vrule height10mm depth10mm width\@tombowwidth}%
60   \setbox\@CR\hbox to\z@{\yoko
61       \vrule height10mm depth10mm width\@tombowwidth
62       \vrule height.5\@tombowwidth depth.5\@tombowwidth width10mm\hss}%
63 }
64 \def\@outputtombow{%
65   \iftombow
66   \vbox to\z@{\kern-13mm\relax
67     \moveleft3mm\vbox to\@@paperheight{%
68       \hbox to\@@paperwidth{\hskip3mm\relax
69          \copy\@TL\hfill\copy\@TC\hfill\copy\@TR\hskip3mm}%
70       \kern-10mm
71       \hbox to\@@paperwidth{\copy\@Tl\hfill\copy\@Tr}%
72       \vfill
73       \hbox to\@@paperwidth{\copy\@CL\hfill\copy\@CR}%
74       \vfill
75       \hbox to\@@paperwidth{\copy\@Bl\hfill\copy\@Br}%
76       \kern-10mm
77       \hbox to\@@paperwidth{\hskip3mm\relax
78          \copy\@BL\hfill\copy\@BC\hfill\copy\@BR\hskip3mm}%
79     }\vss
80   }%
81   \fi
82 }
83 \newdimen\@@paperheight
84 \newdimen\@@paperwidth
85 \newdimen\@@topmargin
86 \def\@outputpage{%
87 \begingroup % the \endgroup is put in by \aftergroup
88   \iftdir
89     \dimen\z@\textwidth \textwidth\textheight \textheight\dimen\z@
90   \fi
91   \let \protect \noexpand
92   \@resetactivechars
93   \global\let\@@if@newlist\if@newlist
94   \global\@newlistfalse
95   \@parboxrestore
96   \shipout\vbox{\yoko
97     \set@typeset@protect
98     \aftergroup\endgroup
99     \aftergroup\set@typeset@protect
100      \if@specialpage
101        \global\@specialpagefalse\@nameuse{ps@\@specialstyle}%
102      \fi
103      \if@twoside
104        \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot
105           \iftdir\let\@themargin\evensidemargin
106           \else\let\@themargin\oddsidemargin\fi
107        \else \let\@thehead\@evenhead
108           \let\@thefoot\@evenfoot
109            \iftdir\let\@themargin\oddsidemargin
110            \else\let\@themargin\evensidemargin\fi
111      \fi\fi
112      \@@topmargin\topmargin
113      \iftombow
114        \@@paperwidth\paperwidth \advance\@@paperwidth 6mm\relax
115        \@@paperheight\paperheight \advance\@@paperheight 16mm\relax
116        \advance\@@topmargin 1in\relax \advance\@themargin 1in\relax
117      \fi
118      \reset@font
119      \normalsize
120      \normalsfcodes
121      \let\label\@gobble
122      \let\index\@gobble
123      \let\glossary\@gobble
124      \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@
125     \@begindvi
126     \@outputtombow
127     \vskip \@@topmargin
128     \moveright\@themargin\vbox{%
129       \setbox\@tempboxa \vbox to\headheight{%
130         \vfil
131         \color@hbox
132           \normalcolor
133           \hb@xt@\textwidth{\@thehead}%
134         \color@endbox
135       }%                        %% 22 Feb 87
136       \dp\@tempboxa \z@
137       \box\@tempboxa
138       \vskip \headsep
139       \box\@outputbox
140       \baselineskip \footskip
141       \color@hbox
142         \normalcolor
143         \hb@xt@\textwidth{\@thefoot}%
144       \color@endbox
145     }%
146   }%
147   \global\let\if@newlist\@@if@newlist
148   \global \@colht \textheight
149   \stepcounter{page}%
150   \let\firstmark\botmark
151 }
152
153 \endinput