blob: b271dcb2a9480ac1caaaa6ef87bce8cf2cdd4e44 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
|
% ^^A -*- japanese-latex -*-
% \iffalse
%
% okuverb.dtx
% verb/verbatim $B4X78%^%/%m(B ($B<Q$F$b>F$$$F$b$+$^$$$^$;$s(B)
% okumura@okumuralab.org
% http://oku.edu.mie-u.ac.jp/~okumura/
%
% [2002-12-19] $B$$$m$$$m$J$b$N$K<}O?$7$F$$$?$@$/:]$K%i%$%;%s%9$rL@3N$K$9$k(B
% $BI,MW$,@8$8$F$-$^$7$?!#%"%9%-!<$N$b$N$,:G6a$O(Bmodified BSD$B%i%$%;%s%9$K$J$C(B
% $B$F$$$^$9$N$G!$;d$N$b$N$b$=$l$K=`$8$F(Bmodified BSD$B$H$9$k$3$H$K$7$^$9!#(B
%
%<okuverb>\NeedsTeXFormat{pLaTeX2e}
%<okuverb>\ProvidesFile{okuverb.sty}[2003/09/03 okumura]
%<*driver>
\documentclass{jsarticle}
\usepackage{doc}
\usepackage{okumacro}
\usepackage{okuverb}
\addtolength{\textwidth}{-1in}
\addtolength{\evensidemargin}{1in}
\addtolength{\oddsidemargin}{1in}
\addtolength{\marginparwidth}{1in}
\setlength\marginparsep{5pt}
\setlength\marginparpush{0pt}
% \OnlyDescription
\DisableCrossrefs
\setcounter{StandardModuleDepth}{1}
\GetFileInfo{okuverb.sty}
\begin{document}
\DocInput{okuverb.dtx}
\end{document}
%</driver>
%
% \fi
%
% \title{\pLaTeXe $BMQ(B \texttt{verb...} $B4X78%^%/%m(B}
% \author{$B1|B<@2I'(B}
% \date{\filedate}
% \maketitle
%
% \StopEventually{}
%
% \MakeShortVerb{\|}
%
% $B$^$:%*%W%7%g%s$N@k8@$G$9!#(B
% \begin{macro}{\if@yen}
% |\verb|$B!$(B|verbatim| $BEy$G(B |\| $B$r1_0u$K$9$k$+$I$&$+$N%9%$%C%A$G$9!#(B
% $B$3$l$O%G%U%)!<%k%H$G56$G$9$,!$(B|yen| $B%*%W%7%g%s$G??$K$J$j$^$9!#(B
% \begin{macrocode}
%<*okuverb>
\newif\if@yen \@yenfalse
\DeclareOption{yen}{\@yentrue}
\ProcessOptions\relax
% \end{macrocode}
% \end{macro}
%
% |\verb|, |verbatim| $B$NJQ99$G$9!#(B
% |ltmiscen.dtx| $B$r$4;2>H$/$@$5$$!#(B
%
% \begin{macro}{\yen}
% \begin{macro}{\ttyen}
%
% $B1_5-9f$NDj5A$G$9!#(B
%
% \begin{macrocode}
\DeclareRobustCommand{\yen}{{\ooalign{Y\crcr\hss=\hss}}}
\def\y@n{Y\llap=}
\def\ttyen{{\ttfamily\y@n}}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\ttbslash}
%
% $B%?%$%W%i%$%?%U%)%s%H$N%P%C%/%9%i%C%7%e$G$9!#(B
%
% \begin{macrocode}
\def\ttbslash{{\ttfamily\char`\\}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\BS}
%
% $B%?%$%W%i%$%?%U%)%s%H$N1_5-9f$+%P%C%/%9%i%C%7%e$N$I$A$i$+$K$J$j$^$9!#(B
%
% \begin{macrocode}
\if@yen
\let\BS=\ttyen
\else
\let\BS=\ttbslash
\fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\verbh@@k}
%
% |\verb|$B!$(B|verbatim| $BEy$G;H$&%U%C%/$G$9!#(B
%
% \begin{macrocode}
\if@yen
\begingroup
\catcode`\|=0 \catcode`\\=13
|gdef|verbh@@k{|catcode`|\=13 |let\=|y@n}
|endgroup
\else
\let\verbh@@k=\relax
\fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\verbatim@font}
%
% $B$3$l$O(B |latex.ltx| $B$K(B |\normalfont\ttfamily|
% $B$HDj5A$5$l$F$$$^$9$,!$(B|\bfseries\verb...| $B$H$$$C$?;H$$J}$b$7$?$$$N$G!$(B
% |\normalfont| $B$O:o=|$7$F$7$^$$$^$7$?!#(B
%
% \begin{macrocode}
\def\verbatim@font{\ttfamily}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\verb}
%
% $B85$O?t<0%b!<%I$@$1$G(B |\hbox| $B$KF~$l$k$h$&$K$J$C$F$$$^$7$?$,!$(B
% |\noautoxspacing| $B$N8z2L$rF@$k$?$a!$(B|\hbox| $B$KF~$l$k$h$&$K$7$^$7$?!#(B
%
% \begin{macrocode}
\def\verb{%
\leavevmode\hbox % $BJQ99(B
\bgroup
\verb@eol@error \let\do\@makeother \dospecials
\verbatim@font\@noligs
\noautoxspacing % $BDI2C(B
\verbh@@k % $BDI2C(B
\@ifstar\@sverb\@verb}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@xverbatim}
% \begin{macro}{\@sxverbatim}
%
% |\| $B$N(B |\catcode| $B$r(B12$B$+$i(B13$B$KJQ$($^$7$?!#(B
%
% \begin{macrocode}
\if@yen
\begingroup \catcode `|=0 \catcode `[= 1
\catcode`]=2 \catcode `\{=12 \catcode `\}=12
\catcode`\\=13 |gdef|@xverbatim#1\end{verbatim}[#1|end[verbatim]]
|gdef|@sxverbatim#1\end{verbatim*}[#1|end[verbatim*]]
|endgroup
\fi
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\verbatimleftmargin}
%
% |verbatim| $B4D6-$NM>J,$J:8%^!<%8%s$G$9!#(B
%
% \begin{macrocode}
\newdimen\verbatimleftmargin
\verbatimleftmargin=2zw
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\verbatimsize}
%
% |verbatim| $B4D6-$N%U%)%s%H%5%$%:$G$9!#(B
%
% \begin{macrocode}
% \def\verbatimsize{\small\narrowbaselines}
\def\verbatimsize{\fontsize{9}{11pt}\selectfont}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@verbatim}
%
% |verbatim| $B4D6-$G;H$&%U%)%s%H$N9TAw$j$H%5%$%:!J(B|\f@size|$B!K$,(B
% $BK\J8$H0c$&$H!$A08e$N4V3V$,0c$C$F$7$^$$$^$9!#$=$l$rJd@5$7$^$9!#(B
%
% \begin{macrocode}
\def\@verbatim{%
\trivlist \item\relax
\if@minipage
% $BDI2C$O$8$a(B
\verbatimsize
% $BDI2C$*$o$j(B
\else
% $BDI2C$O$8$a(B
\vskip\baselineskip
\vskip-\f@size pt
\verbatimsize
\vskip-\baselineskip
\vskip\f@size pt
% $BDI2C$*$o$j(B
\vskip\parskip
\fi
\leftskip\@totalleftmargin
% $BDI2C$O$8$a(B
\if@minipage \else
\advance \leftskip \verbatimleftmargin
\fi
% $BDI2C$*$o$j(B
\rightskip\z@skip
\parindent\z@
\parfillskip\@flushglue
\parskip\z@skip
\@@par
\@tempswafalse
\def\par{%
\if@tempswa
\leavevmode \null \@@par\penalty\interlinepenalty
\else
\@tempswatrue
\ifhmode\@@par\penalty\interlinepenalty\fi
\fi}%
\let\do\@makeother \dospecials
\obeylines \verbatim@font
% $BDI2C$O$8$a(B
\noautoxspacing \verbh@@k
% $BDI2C$*$o$j(B
\@noligs
\hyphenchar\font\m@ne
\everypar \expandafter{\the\everypar \unpenalty}%
}
% \end{macrocode}
% \end{macro}
%
% $B0J>e$G=*$o$j$G$9!#(B
%
% \begin{macrocode}
%</okuverb>
\endinput
% \end{macrocode}
%
% \Finale
|