OSDN Git Service

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