aozora4reader 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,463 @@
1
+ \NeedsTeXFormat{pLaTeX2e}
2
+ \ProvidesPackage{aozorakindle}[2009/02/05 v0.5 takayama]
3
+ \RequirePackage{verbatim}
4
+ \RequirePackage{keyval}
5
+ %
6
+ %$B%9%?%$%k%*%W%7%g%s(B
7
+ %
8
+ \newif\if@waku \@wakutrue
9
+ \def\aozora@title@style{plain}
10
+ \def\aozora@dviware{dvipdfm}
11
+ \def\kindle@type{kindle2}
12
+ \def\base@size{normal}
13
+ \define@key{aozora}{title}[plain]{\def\aozora@title@style{#1}}
14
+ \define@key{aozora}{device}[kindle2]{\def\kindle@type{#1}}
15
+ \define@key{aozora}{size}[normal]{\def\base@size{#1}}
16
+ \define@key{aozora}{dviware}[dvipdfm]{\def\aozora@dviware{#1}}
17
+ \define@key{aozora}{final}[true]{\let\footnote\@gobble}
18
+ \define@key{aozora}{draft}[false]{\relax}
19
+ \define@key{aozora}{nowaku}[false]{\@wakufalse}
20
+ \def\ProcessOptionsWithKV#1{%
21
+ \let\@tempc\relax%
22
+ \let\aozora@tempa\@empty
23
+ \@for\CurrentOption:=\@classoptionslist\do{%
24
+ \@ifundefined{KV@#1@\CurrentOption}%
25
+ {}%
26
+ {\edef\aozora@tempa{\aozora@tempa,\CurrentOption,}}%
27
+ }%
28
+ \edef\aozora@tempa{%
29
+ \noexpand\setkeys{#1}{%
30
+ \aozora@tempa\@ptionlist{\@currname.\@currext}%
31
+ }%
32
+ }%
33
+ \aozora@tempa
34
+ }
35
+ \ProcessOptionsWithKV{aozora}
36
+ \AtEndOfPackage{%
37
+ \let\@unprocessedoptions\relax
38
+ }
39
+ %graphic package$B$NFI$_9~$_(B
40
+ \RequirePackage[\aozora@dviware]{graphicx}
41
+ %$B?7$7$$C10L$N@_Dj(B
42
+ \newlength{\JQ}
43
+ \setlength{\JQ}{0.259817mm}
44
+ %
45
+ %$BMQ;f%5%$%:$*$h$SJ8;z%5%$%:$N@_Dj(B
46
+ %
47
+ \def\device@a{kindle2}
48
+ \def\device@b{kindledx}
49
+ \def\size@a{normal}
50
+ \def\size@b{small}
51
+ \def\size@c{large}
52
+ \newdimen\nmls
53
+ \newdimen\nmlbs
54
+ \newdimen\smls
55
+ \newdimen\smlbs
56
+ \newdimen\ftns
57
+ \newdimen\ftnbs
58
+ \newdimen\scrs
59
+ \newdimen\scrbs
60
+ \newdimen\hugs
61
+ \newdimen\hugbs
62
+ \newdimen\huges
63
+ \newdimen\hugebs
64
+ \newcount\nmlqn
65
+ \newcount\jisuu
66
+ \newcount\gyousuu
67
+ %$BJ8;z%5%$%:$N7hDj(B
68
+ \ifx\base@size\size@a
69
+ %$BDL>o$NBg$-$5$NDj5A(B
70
+ \nmlqn=13 %\normalsize$B$N5i?t(B
71
+ \nmlbs=22H %\normalsize$B$N9TAw$j(B
72
+ \smls =11\JQ%\small$B$NBg$-$5(B
73
+ \smlbs=18H %\small$B$N9TAw$j(B
74
+ \ftns =10\JQ%\footnotesize$B$NBg$-$5(B
75
+ \ftnbs=15H %\footnotesize$B$N9TAw$j(B
76
+ \scrs = 9\JQ%\scriptsize$B$N5i?t(B
77
+ \scrbs=12H %\scriptsize$B$N9TAw$j(B
78
+ \else
79
+ \ifx\base@size\size@b
80
+ %$B>.$5$$>l9g$NDj5A(B
81
+ \nmlqn=11 %\normalsize$B$N5i?t(B
82
+ \nmlbs=19H %\normalsize$B$N9TAw$j(B
83
+ \smls =10\JQ%\small$B$NBg$-$5(B
84
+ \smlbs=18H %\small$B$N9TAw$j(B
85
+ \ftns = 9\JQ%\footnotesize$B$NBg$-$5(B
86
+ \ftnbs=15H %\footnotesize$B$N9TAw$j(B
87
+ \scrs = 8\JQ%\scriptsize$B$N5i?t(B
88
+ \scrbs=12H %\scriptsize$B$N9TAw$j(B
89
+ \else
90
+ \ifx\base@size\size@c
91
+ %$BBg$-$$>l9g$NDj5A(B
92
+ \nmlqn=15 %\normalsize$B$N5i?t(B
93
+ \nmlbs=26H %\normalsize$B$N9TAw$j(B
94
+ \smls =12\JQ%\small$B$NBg$-$5(B
95
+ \smlbs=21H %\small$B$N9TAw$j(B
96
+ \ftns =11\JQ%\footnotesize$B$NBg$-$5(B
97
+ \ftnbs=16H %\footnotesize$B$N9TAw$j(B
98
+ \scrs =10\JQ%\scriptsize$B$N5i?t(B
99
+ \scrbs=14H %\scriptsize$B$N9TAw$j(B
100
+ \else
101
+ \PackageError{aozorakindle}{Unkown letter size.}{Choose 'normal' or 'small' or 'large'.}
102
+ \fi
103
+ \fi
104
+ \fi
105
+ \nmls =\nmlqn\JQ%normalsize$B$N5i?t(B
106
+ \hugs =25\JQ%\huge$B$NBg$-$5(B
107
+ \hugbs=40H %\huge$B$N9TAw$j(B
108
+ \huges=\smls
109
+ \multiply\huges by 3 %\Huge$B$O(B\small$B$N(B3$BG\(B
110
+ \hugebs=\smlbs
111
+ \multiply\hugebs by 3 %\Huge$B$N9TAw$j(B
112
+ %$BMQ;f%5%$%:$N7hDj(B
113
+ \ifx\kindle@type\device@a
114
+ %Kindle 2$BMQ$N@_Dj(B
115
+ \setlength\paperwidth{340H}
116
+ \setlength\paperheight{453H}
117
+ \ifx\base@size\size@a
118
+ %$BDL>o$NBg$-$5$N>l9g(B
119
+ \jisuu=31 \gyousuu=15
120
+ \else
121
+ \ifx\base@size\size@b
122
+ %$B>.$5$$>l9g$N>l9g(B
123
+ \jisuu=37 \gyousuu=17
124
+ \else
125
+ \ifx\base@size\size@c
126
+ %$BBg$-$$>l9g$N>l9g(B
127
+ \jisuu=27 \gyousuu=13
128
+ \else
129
+ \PackageError{aozorakindle}{Unkown letter size.}{Choose 'normal' or 'small' or 'large'.}
130
+ \fi
131
+ \fi
132
+ \fi
133
+ \else
134
+ \ifx\kindle@type\device@b
135
+ %Kindle DX$BMQ$N@_Dj(B
136
+ \setlength\paperwidth{530H}
137
+ \setlength\paperheight{771H}
138
+ \@twocolumntrue
139
+ \ifx\base@size\size@a
140
+ %$BDL>o$NBg$-$5$N>l9g(B
141
+ \jisuu=55 \gyousuu=23
142
+ \else
143
+ \ifx\base@size\size@b
144
+ %$B>.$5$$>l9g$N>l9g(B
145
+ \jisuu=65 \gyousuu=26
146
+ \else
147
+ \ifx\base@size\size@c
148
+ %$BBg$-$$>l9g$N>l9g(B
149
+ \jisuu=48 \gyousuu=20
150
+ \else
151
+ \PackageError{aozorakindle}{Unkown letter size.}{Choose 'normal' or 'small' or 'large'.}
152
+ \fi
153
+ \fi
154
+ \fi
155
+ \else
156
+ \PackageError{aozorakindle}{Unkown device.}{Choose 'kindle2' or 'kindledx'.}
157
+ \fi
158
+ \fi
159
+ %
160
+ %$BJ8;z%5%$%:$NDj5A(B
161
+ %
162
+ \renewcommand{\normalsize}{%
163
+ \@setfontsize\normalsize{\nmls}{\nmlbs}%
164
+ \abovedisplayskip\z@ \belowdisplayskip\z@
165
+ \abovedisplayshortskip\z@ \belowdisplayshortskip\z@
166
+ \let\@listi\@listI}
167
+ \normalsize
168
+ \setlength\Cht{0.5zh}
169
+ \setlength\Cdp{0.5zh}
170
+ \setlength\Cwd{1zw}
171
+ \setlength\Cvs{\baselineskip}
172
+ \setlength\Chs{1zh}
173
+ \renewcommand{\small}{%
174
+ \@setfontsize\small{\smls}{\smlbs}%
175
+ \abovedisplayskip\z@ \belowdisplayskip\z@
176
+ \abovedisplayshortskip\z@ \belowdisplayshortskip\z@
177
+ \let\@listi\@listI}
178
+ \renewcommand{\footnotesize}{%
179
+ \@setfontsize\footnotesize{\ftns}{\ftnbs}%
180
+ \abovedisplayskip\z@ \belowdisplayskip\z@
181
+ \abovedisplayshortskip\z@ \belowdisplayshortskip\z@
182
+ \let\@listi\@listI}
183
+ \renewcommand{\scriptsize}{\@setfontsize\scriptsize{\scrs}{\scrbs}}
184
+ \renewcommand{\tiny}{\@setfontsize\tiny{0.5\nmls}{0.5\nmlbs}}
185
+ \newcommand{\TINY}{\@setfontsize\TINY{0.25\nmls}{0.25\nmlbs}}
186
+ \renewcommand{\huge}{\@setfontsize\huge{\hugs}{\hugbs}}
187
+ \renewcommand{\Huge}{\@setfontsize\Huge{\huges}{\hugebs}}
188
+ %
189
+ %$BHGLL$N@_Dj(B
190
+ %
191
+ \setlength\columnseprule{0pt}
192
+ \setlength\marginparsep{0pt}
193
+ \setlength\marginparwidth{0pt}
194
+ \setlength{\footskip}{0H}%$B%U%C%?$O;H$o$J$$$N$G(B0$B$H$9$k!#(B
195
+ \setlength\columnsep{3zw}%$BCJ4V(B3$BJ8;zJ,(B
196
+ \textwidth=\nmlqn H
197
+ \multiply \textwidth by \jisuu
198
+ \advance\gyousuu by -1
199
+ \textheight=\baselineskip
200
+ \multiply \textheight by \gyousuu
201
+ \advance \textheight by \nmlqn H
202
+ \setlength\topskip{\Cht}
203
+ \setlength\topmargin{-1in}
204
+ %$B:81&$N6u$-(B($BHGLL$,:81&Cf1{$KMh$k$h$&$K@_Dj(B)
205
+ \dimen0=\paperwidth
206
+ \advance\dimen0 by -\textheight
207
+ \oddsidemargin=.5\dimen0
208
+ \advance\oddsidemargin by -1in
209
+ \evensidemargin=\oddsidemargin
210
+ %$BM>Gr$rD4@0(B
211
+ \addtolength\topmargin{2mm}%$BMQ;f>eC<$H%X%C%@>eC<$N4V3V(B
212
+ \setlength\headheight{8H}%$B%X%C%@$N9b$5(B
213
+ \setlength\headsep{15H}%$B%X%C%@$N2<C<$HK\J8$N>eC<$N4V3V(B
214
+ %$B6&DL$N@_Dj(B
215
+ \kanjiskip=0pt plus .0625zw minus .0625zw%$BOB;z4V$O:GBg(B16$BJ,$^$G1d$S!":GBg(B16$BJ,=L$`(B
216
+ \xkanjiskip=.25zw plus .083zw minus .125zw%$BOB2$J84V$O:GBg(B3$BJ,$^$G1d$S!":GBg(B8$BJ,$^$G=L$`(B
217
+ \maxdepth=\topskip
218
+ %$BCJMn$N@_Dj(B
219
+ \setlength\parskip{0pt}
220
+ \setlength\parsep{0pt}
221
+ \setlength\partopsep{0pt}
222
+ \setlength\parindent{0pt}
223
+ \raggedbottom
224
+ \AtBeginDocument{\obeylines}
225
+ %
226
+ %$B9T@07AMQ%Q%i%a!<%?(B
227
+ %
228
+ \clubpenalty=0
229
+ \widowpenalty=0
230
+ \jcharwidowpenalty=0
231
+ \displaywidowpenalty=0
232
+ \prebreakpenalty\jis"2147=10000 % 5000 $B!G(B
233
+ \postbreakpenalty\jis"2148=10000 % 5000 $B!H(B
234
+ \prebreakpenalty\jis"2149=10000 % 5000 $B!I(B
235
+ \inhibitxspcode`$B")(B=2
236
+ \prebreakpenalty\jis"2133=10000
237
+ \prebreakpenalty\jis"2134=10000
238
+ \prebreakpenalty\jis"2135=10000
239
+ \prebreakpenalty\jis"2136=10000
240
+ %
241
+ %font$B$N@_Dj(B
242
+ %
243
+ \def\headfont{\mcfamily\sffamily}%\section, \subsetion$B$N8+=P$7(B
244
+ \def\titlefont{\mcfamily\bfseries}%$BBjL>$N%U%)%s%H(B
245
+ \def\subtitlefont{\mcfamily}%$BI{Bj$N%U%)%s%H(B
246
+ \def\authorfont{\mcfamily}%$BCx<T$N%U%)%s%H(B
247
+ %
248
+ %$B%?%$%H%kItJ,(B
249
+ %
250
+ \def\metadata#1{\relax}
251
+ \def\subtitle#1{\gdef\@subtitle{#1}}
252
+ \def\subauthor#1{\gdef\@subauthor{#1}}
253
+ \def\biblioname{$B@D6uJ88K(B}
254
+ \def\azbanner{\hbox{\yoko\includegraphics[height= 1.5cm]{azlogo.eps}}\hspace*{50Q}}
255
+ \renewcommand{\maketitle}{
256
+ \cleardoublepage
257
+ \if@twocolumn
258
+ \@restonecoltrue\onecolumn
259
+ \else
260
+ \@restonecolfalse\newpage
261
+ \fi
262
+ \thispagestyle{empty}
263
+ \setcounter{page}\@ne
264
+ \begingroup
265
+ \let\footnotesize\small
266
+ \let\footnoterule\relax
267
+ \let\thanks\p@thanks
268
+ \let\footnote\thanks
269
+ \@ifundefined{\aozora@title@style @a5}
270
+ {\plain@a5}%
271
+ {\expandafter\csname\aozora@title@style @a5\endcsname}
272
+ \endgroup
273
+ \clearpage
274
+ \thispagestyle{empty}
275
+ \az@title@back
276
+ \if@restonecol\twocolumn \else \newpage \fi
277
+ \clearpage
278
+ \setcounter{footnote}{0}%
279
+ \global\let\thanks\relax
280
+ \global\let\p@thanks\relax
281
+ \global\let\@thanks\@empty
282
+ \global\let\@author\@empty
283
+ \global\let\@date\@empty
284
+ \global\let\date\relax
285
+ \global\let\and\relax
286
+ }%
287
+ \def\az@title@back{%$B%?%$%H%k$NN"(B
288
+ \vbox to\textheight{\vss%
289
+ \hbox to\textwidth{\tate\hfill\azbanner}
290
+ \vss
291
+ }%
292
+ }
293
+ %
294
+ %$B%G%U%)%k%H$N%?%$%H%k%Z!<%8(B
295
+ %
296
+ \@namedef{plain@a5}{\begingroup
297
+ \def\rubykatuji{\rubyfamily\small}
298
+ \vbox to\textheight\bgroup\tate\hsize\textwidth
299
+ \null\vfil
300
+ \begin{center}%
301
+ {\Huge\titlefont \@title \par}%
302
+ \@ifundefined{@subtitle}{\relax}{{\vskip 0.5em\huge\subtitlefont \@subtitle \par}}
303
+ \vskip 3em%
304
+ {\huge
305
+ \lineskip .75em%
306
+ \begin{tabular}[t]{c}%
307
+ \authorfont\@author
308
+ \@ifundefined{@subauthor}{\relax}{\\\authorfont\@subauthor}
309
+ \end{tabular}\par}%
310
+ \end{center}\par
311
+ \vfil\null
312
+ \egroup
313
+ \endgroup
314
+ }
315
+ \def\cleardoublepage{\clearpage
316
+ \ifodd\c@page
317
+ \else
318
+ \hbox{}\thispagestyle{empty}\newpage
319
+ \if@twocolumn\hbox{}\newpage\fi
320
+ \fi
321
+ }
322
+ % $B%^%/%m$J$I(B
323
+ \def\ruby{\kana}
324
+ \def\Ruby#1#2{\kana[2]{#1}{#2}}
325
+ \def\RUBY#1#2{\kana[3]{#1}{#2}}
326
+ \let\KANA=\KANAtop
327
+ \def\$B!=!=(B{$B!=(B\kern-.5zw$B!=(B\kern-.5zw$B!=(B}
328
+ \newenvironment{jisage}[1]{\advance\leftskip#1zw}{}
329
+ \def\sirogomabou#1{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny\ajWhiteSesame}}\bou{#1}\egroup}
330
+ \def\marubou#1{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny$B!|(B}}\bou{#1}\egroup}
331
+ \def\siromarubou#1{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny$B!{(B}}\bou{#1}\egroup}
332
+ \def\kurosankakubou#1{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny$B"%(B}}\bou{#1}\egroup}
333
+ \def\sirosankakubou#1{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny$B"$(B}}\bou{#1}\egroup}
334
+ \def\nijyuumarubou#1{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny$B!}(B}}\bou{#1}\egroup}
335
+ \def\jyanomebou#1{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny\UTF{25C9}}}\bou{#1}\egroup}
336
+ \def\ajKunojiwithsirogomaBou{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny\ajWhiteSesame}}\ajKunojiwithBou\egroup}
337
+ \def\ajKunojiwithmaruBou{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny$B!|(B}}\ajKunojiwithBou\egroup}
338
+ \def\ajKunojiwithsiromaruBou{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny$B!{(B}}\ajKunojiwithBou\egroup}
339
+ \def\ajKunojiwithkurosankakuBou{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny$B"%(B}}\ajKunojiwithBou\egroup}
340
+ \def\ajKunojiwithsirosankakuBou{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny$B"$(B}}\ajKunojiwithBou\egroup}
341
+ \def\ajKunojiwithnijyuumaruBou{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny$B!}(B}}\ajKunojiwithBou\egroup}
342
+ \def\ajKunojiwithjyanomeBou{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny\UTF{25C9}}}\ajKunojiwithBou\egroup}
343
+ \def\ajDKunojiwithsirogomaBou{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny\ajWhiteSesame}}\ajDKunojiwithBou\egroup}
344
+ \def\ajDKunojiwithmaruBou{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny$B!|(B}}\ajDKunojiwithBou\egroup}
345
+ \def\ajDKunojiwithsiromaruBou{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny$B!{(B}}\ajDKunojiwithBou\egroup}
346
+ \def\ajDKunojiwithkurosankakuBou{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny$B"%(B}}\ajDKunojiwithBou\egroup}
347
+ \def\ajDKunojiwithsirosankakuBou{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny$B"$(B}}\ajDKunojiwithBou\egroup}
348
+ \def\ajDKunojiwithnijyuumaruBou{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny$B!}(B}}\ajDKunojiwithBou\egroup}
349
+ \def\ajDKunojiwithjyanomeBou{\bgroup\renewcommand{\boutenchar}{\hbox to 1zh{\tate\hfil\tiny\UTF{25C9}}}\ajDKunojiwithBou\egroup}
350
+ \def\kaeriten#1{%
351
+ \nobreak\setbox1\hbox{$B$"(B}\setbox2\hbox{\tiny $B$"(B}
352
+ \ifdim\ht1=\ht2
353
+ \setbox1\hbox{$B$"(B}\setbox2\hbox{\TINY $B$"(B}
354
+ \dimen1=\ht1 \advance\dimen1 by -\ht2
355
+ \raisebox{-\dimen1}{\TINY #1}%
356
+ \else
357
+ \dimen1=\ht1 \advance\dimen1 by -\ht2
358
+ \raisebox{-\dimen1}{\tiny #1}%
359
+ \fi
360
+ }%
361
+ \def\okurigana#1{%
362
+ \nobreak\setbox1\hbox{$B$"(B}\setbox2\hbox{\tiny $B$"(B}
363
+ \ifdim\ht1=\ht2
364
+ \setbox1\hbox{$B$"(B}\setbox2\hbox{\TINY $B$"(B}
365
+ \dimen1=\ht1 \advance\dimen1 by -\ht2
366
+ \raisebox{\dimen1}{\TINY #1}%
367
+ \else
368
+ \dimen1=\ht1 \advance\dimen1 by -\ht2
369
+ \raisebox{\dimen1}{\tiny #1}%
370
+ \fi
371
+ }%
372
+ \def\sashie#1{%
373
+ \hbox{\yoko\includegraphics[keepaspectratio=true, width = 8cm]{#1}}
374
+ }%
375
+ \def\bousen#1{#1}
376
+ \AtBeginDvi{\special{pdf: pagesize height \the\paperheight\space width \the\paperwidth}}
377
+ \AtBeginDvi{\special{pdf:docview <</ViewerPreferences <</Direction /R2L>> >>}}
378
+ %
379
+ %$B8eCp$NDj5A(B
380
+ %
381
+ \newcounter{notecount}
382
+ \setcounter{notecount}{0}
383
+ \def\thenotecount{\@arabic\c@notecount}
384
+ \def\endnote#1{%
385
+ \stepcounter{notecount}%
386
+ \raisebox{0.75zh}{\tiny\kanji\c@notecount}%
387
+ \expandafter\gdef\csname note@\number\c@notecount\endcsname{#1}%
388
+ }
389
+ \def\endnotehead{$B8eCp(B}
390
+ \def\theendnotes{%
391
+ \@ifundefined{note@1}{\relax}{%
392
+ {\headfont\normalsize\noindent\endnotehead\par}%
393
+ \@tempcnta=\thenotecount\relax%
394
+ \advance\@tempcnta by1\relax%
395
+ \setcounter{notecount}{0}%
396
+ \begin{description}
397
+ \footnotesize
398
+ \loop
399
+ \stepcounter{notecount}
400
+ \ifnum\@tempcnta>\c@notecount
401
+ \item[\kanji\c@notecount]\csname note@\number\c@notecount\endcsname\par
402
+ \global\expandafter\let\csname note@\number\c@notecount\endcsname=\@undefined%
403
+ \repeat
404
+ \end{description}
405
+ }%
406
+ \setcounter{notecount}{0}%
407
+ }
408
+ %
409
+ %$B%X%C%@$NDj5A(B
410
+ %
411
+ \def\ps@aozora{\let\ps@jpl@in\ps@headnombre
412
+ \let\@oddfoot\@empty\let\@evenfoot\@empty
413
+ \def\@oddhead{\scriptsize\null
414
+ \hspace*{\nmls}\@ifundefined{@title}{\relax}{\@title}%
415
+ \hspace*{1zw}\@ifundefined{@subtitle}{\relax}{\@subtitle}%
416
+ \hfil}
417
+ \let\@evenhead\@oddhead
418
+ \let\@mkboth\markboth
419
+ }
420
+ \pagestyle{aozora}
421
+ %
422
+ %$BDlK\$N=hM}$NJQ99!J%@%_!<4D6-!K(B
423
+ %
424
+ \newenvironment{teihon}{\relax}{\relax}
425
+ %
426
+ %$B;fLL$N>e2<$K;fI}$N@~$r0z$/(B
427
+ %
428
+ \newdimen\waku@line@width
429
+ \setlength{\waku@line@width}{.1\p@}
430
+ \newdimen\waku@top@shift
431
+ \setlength{\waku@top@shift}{-1in}
432
+ \newdimen\waku@left@shift
433
+ \setlength{\waku@left@shift}{1in}
434
+ \newbox\@WTC
435
+ \newbox\@WBC
436
+ \def\makewakubox{%
437
+ \setbox\@WTC\hbox to\z@{\yoko\hss
438
+ \vrule width \paperwidth height\z@ depth\waku@line@width\hss}%
439
+ \setbox\@WBC\hbox to\z@{\yoko\hss
440
+ \vrule width \paperwidth depth\z@ height\waku@line@width\hss}%
441
+ }
442
+ \let\orig@outputtombow\@outputtombow
443
+ \def\@outputtombow{%
444
+ \iftombow
445
+ \orig@outputtombow
446
+ \else
447
+ \if@waku
448
+ \moveleft\waku@left@shift\vbox to\z@{\kern\waku@top@shift\relax
449
+ \vbox to\paperheight{%
450
+ \hbox to\paperwidth{\hss\copy\@WTC\hss}%
451
+ \vss
452
+ \hbox to\paperwidth{\hss\copy\@WBC\hss}%
453
+ }\vss
454
+ }%
455
+ \fi
456
+ \fi
457
+ }
458
+ \if@waku
459
+ \setlength{\waku@line@width}{.1\p@}%
460
+ \makewakubox%
461
+ \fi
462
+ \endinput
463
+ %based on aozora.sty by psitau