summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/newvbtm/newvbtm.dtx
blob: 7e85cd2ec6fe7b081f758c0d120188bb295722eb (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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
% \iffalse
%<newvbtm>%% Style file `newvbtm'.
%<varvbtm>%% Style file `varvbtm'.
%% Copyright (C) 1999-2002  Hiroshi Nakashima <nakasima@tutics.tut.ac.jp>
%%			    (Toyohashi Univ. of Tech.)
%% 
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1 of the License, or any later version.
%% 
% \fi
%
% \CheckSum{578}
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
% \iffalse
%%
%<*dtx>
\ProvidesFile{newvbtm.dtx}
%</dtx>
%<newvbtm|varvbtm>\newif\ifnvb@LaTeXe
%<newvbtm|varvbtm>\def\next{LaTeX2e}
%<newvbtm|varvbtm>\ifx\fmtname\next \nvb@LaTeXetrue
%<newvbtm|varvbtm>\def\next{
%<newvbtm|varvbtm>\NeedsTeXFormat{LaTeX2e}[1994/12/01]
%<newvbtm>\ProvidesPackage{newvbtm}}
%<varvbtm>\ProvidesPackage{varvbtm}}
%<newvbtm|varvbtm>\else \nvb@LaTeXefalse
%<newvbtm|varvbtm>\def\next[#1]{}\fi
%<newvbtm|varvbtm>\next
%<driver>\ProvidesFile{newvbtm-man.tex}
% \fi
% \ProvidesFile{newvbtm.dtx}
[2002/04/08 v1.1 ]
% \iffalse
%<*driver>
\documentclass{ltxdoc}
\usepackage{varvbtm}
\DisableCrossrefs
\PageIndex
\CodelineNumbered
\RecordChanges
%</driver>
%<driver>\OnlyDescription
%<driver>\def\ONLYDESCRIPTION{}
%<*driver>
\advance\textwidth4em
\begin{document}
\DocInput{newvbtm.dtx}
\end{document}
%</driver>
% \fi
% \changes{v0.1}{1991/12/18}
%	{The macros for tabbing verbatim etc. has already been born.}
% \changes{v0.2}{1992/03/26}
%	{The style defverbatim is born.}
% \changes{v0.3}{1992/10/27}
%	{The style newverbatim has already been born.}
% \changes{v1.0}{1999/07/14}
%	{The Style and macros are merged into newvbtm.dtx and rewritten.}
% \changes{v1.1}{2002/04/08}
%	{The following are to fix the bug revealed in LaTeX-2.09.}
%
% \errorcontextlines10000
% \GetFileInfo{newvbtm.dtx}
% \setcounter{IndexColumns}{2}
% 
% \def\bottomfraction{.9}
% \def\cs#1{\hbox{\tt\char\escapechar#1}}
% \def\Item{\vskip-\itemsep\vskip-\parsep\vskip0pt\item}
%
% \makeatletter
% \def\nosv{\catcode`\|12}
% 
% \def\eqnarray{\stepcounter{equation}\let\@currentlabel=\theequation
% \global\@eqnswtrue
% \global\@eqcnt\z@\tabskip\@centering\let\\=\@eqncr
% $$\halign to \displaywidth\bgroup\hskip\@centering
%   $\displaystyle\tabskip\z@{##}$\@eqnsel&\global\@eqcnt\@ne
%   \hfil$\;{##}\;$\hfil
%   &\global\@eqcnt\tw@ $\displaystyle\tabskip\z@{##}$\hfil
%    \tabskip\@centering&\llap{##}\tabskip\z@\cr}
%
% \def\Meta#1{\penalty\@highpenalty
%	\hbox{{\tt\char`\{}{\it\meta{#1}}{\tt\char`\}}}}
% \def\opt#1{{\tt[}{\it\meta{#1}}{\tt]}}
% \def\optn#1{{\tt[#1]}}
% \def\arg#1{{\tt\char`\{#1\char`\}}}
%
% \let\latex@addmarginpar\@addmarginpar
% \let\latex@latex@warning@no@line\@latex@warning@no@line
% \def\@addmarginpar{\let\@latex@warning@no@line\@gobble
%	\latex@addmarginpar
%	\let\@latex@warning@no@line\latex@latex@warning@no@line}
% \let\@font@warning\@gobble
%
% \long\def\m@cro@#1#2{\endgroup \topsep\MacroTopsep \trivlist
%    \edef\saved@macroname{\string#2}
%   \def\makelabel##1{\llap{##1\hskip\@totalleftmargin}}
%   \if@inlabel
%     \let\@tempa\@empty \count@\macro@cnt
%     \loop \ifnum\count@>\z@
%       \edef\@tempa{\@tempa\hbox{\strut}}\advance\count@\m@ne \repeat
%     \edef\makelabel##1{\llap{\vtop to\baselineskip
%                                {\@tempa\hbox{##1}\vss}
%			       \hskip\@totalleftmargin}}
%     \advance \macro@cnt \@ne
%   \else  \macro@cnt\@ne  \fi
%   \edef\@tempa{\noexpand\item[
%      #1
%        \noexpand\PrintMacroName
%      \else
%        \noexpand\PrintEnvName
%      \fi
%      {\string#2}]}
%   \@tempa
%   \global\advance\c@CodelineNo\@ne
%    #1
%       \SpecialMainIndex{#2}\nobreak
%       \DoNotIndex{#2}
%    \else
%       \SpecialMainEnvIndex{#2}\nobreak
%    \fi
%   \global\advance\c@CodelineNo\m@ne
%   \ignorespaces}
% 
% \def\dummymacro{\topsep\MacroTopsep \trivlist \item[]}
% \let\enddummymacro\endtrivlist
% 
% \def\DescribeOpt{\leavevmode\@bsphack\begingroup\MakePrivateLetters
%   \Describe@Opt}
% \def\Describe@Opt#1{\endgroup \Describe@pt{#1}}
% \def\Describe@pt#1#2{
%               \marginpar{\raggedleft\PrintDescribeMacro{#1}}
% 		\SpecialOptUsageIndex{#1}{#2}}
% \def\SpecialOptUsageIndex#1#2{
% 	\index{#1\actualchar{\protect\ttfamily#1} (#2)\encapchar usage}
%	\index{#2s:\levelchar{\protect\ttfamily#1}\encapchar usage}
%	\@esphack\ignorespaces}
% \def\SpecialOptMainIndex#1#2{
% 	\index{#1\actualchar{\protect\ttfamily#1} (#2)\encapchar main}
%	\index{#2s:\levelchar{\protect\ttfamily#1}\encapchar main}
%	\@esphack\ignorespaces}
% \def\SpecialOptIndex#1#2{
% 	\index{#1\actualchar{\protect\ttfamily#1} (#2)}
%	\index{#2s:\levelchar{\protect\ttfamily#1}}
%	\@esphack\ignorespaces}
% \def\SpecialOptIndexS#1#2{
% 	\index{#1\actualchar{\protect\ttfamily#1} (#2)}
%	\index{#2es:\levelchar{\protect\ttfamily#1}}
%	\@esphack\ignorespaces}
%
% \begingroup
% \gdef\@sverbcat{\catcode`\@\active\catcode`\#\active}
% \catcode`\@\active \gdef@{\char`\@\penalty\exhyphenpenalty}
% \catcode`\#\active \gdef#{\penalty\exhyphenpenalty}
% \endgroup
% \let\latex@sverb\@sverb
% \def\@sverb{\@sverbcat\latex@sverb}
%
% \def\theglossary{\onecolumn \glossary@prologue
%	\GlossaryParms \let\item\@idxitem \ignorespaces}
% \def\endtheglossary{\relax}
% 
% 
%
% \def\bracepair{`{\tt\char`\{\char`\}'}}
%
% \ifx\ONLYDESCRIPTION\undefined\else
% \let\SpecialUsageIndex\SpecialMainIndex
% \let\SpecialOptUsageIndex\SpecialOptMainIndex
% \fi
% \newverbatim{iverbatim}{\begin{itemize}\item[]\ttfamily}{}{}{\end{itemize}}
% 
% 
%
% \title{\textsf{newvbtm} and \textsf{varvbtm}\\
%	Packages for Variants of \texttt{verbatim} Environment\thanks{
%	This file has version number \fileversion, last revised \filedate.}}
% \author{Hiroshi Nakashima\\(Toyohashi Univ. of Tech.)}
% \date{\filedate}
% \maketitle
% 
% \begin{abstract}
% This file provides two style files; \textsf{newvbtm} to define
% |verbatim|-like environments; \textsf{varvbtm} to provide set of macros
% for variants of |verbatim|, e.g.\ in which \texttt{\char`\^I} acts as a tab.
% \end{abstract}
%
% \tableofcontents
% \newpage
%
% 
%
% \section{Introduction}
% \label{sec:intro}
%
% \SpecialOptIndex{verbatim}{environment}
% \LaTeX{} users often have trouble when they wish to have their own
% customized |verbatim|-like environment.  Probably you once wished to have
% an indented-footnotesize-|verbatim| instead of always typing;
%
%\begin{iverbatim}
%\begin{itemize}\item[]\footnotesize
%\begin{verbatim}
%...
%\end{verbatim}
%\end{itemize}
%\end{iverbatim}
%
% and tried the following just to know it does not work.
%
%\begin{iverbatim}
%\newenvironment{myverbatim}{\begin{itemize}\item[]\footnotesize
%                            \begin{verbatim}}%
%                           {\end{verbatim}\end{itemize}}
%\end{iverbatim}
%
% Another trouble you probablly have had is that what you see in |verbatim|
% text with |<TAB>| is not what you get because |<TAB>| does not acts as an
% tab but a space.
%
% Of course it is possible to define your own |verbatim|-like environments
% if you have enough knowledge of the implementation of |verbatim| including 
% dirty tricks with |\catcode|.  However, even a \TeX{}pert should be bored
% with typing a dirty code like;
%
%\begin{iverbatim}
%\begingroup \catcode`\|=0 \catcode`\[=1 \catcode`\]=2
%\catcode`\{=12 \catcode`\}=12 \catcode`\\=12
%|long|def|@myxverbatim##1\end{myverbatim}[##1|end[myverbatim]]
%|endgroup
%\end{iverbatim}
%
% \DescribeOpt{newvbtm}{style file}
% \DescribeOpt{varvbtm}{style file}
% The style files distributed with this document will solve these problems.
% You will have two style files, \textsf{newvbtm.sty} and
% \textsf{varvbtm.sty}, by processing \textsf{newvbtm.dtx} with
% \textsf{docstrip}, or simply doing the following.
%
%\begin{iverbatim}
%% tex newvbtm.ins
%\end{iverbatim}
%
% The former style provides you |\(re)newverbatim| command to (re)define
% your own |verbatim|-like environment easily.  The latter gives you a set
% of various macros for tab-emulation, page break control, etc.
%
% 
%
% \section{Usage}
% \label{sec:usage}
% \subsection{Loading Style Files}
% \label{sec:usage-load}
%
% Both style files are usable to both \LaTeXe{} and \LaTeX-2.09
% users with their standard package loading declaration.  If you use
% \LaTeXe{} and wish to load, for example, \textsf{newvbtm}, simply do the
% following.
%
% \SpecialUsageIndex{\usepackage}
%\begin{iverbatim}
%\usepackage{newvbtm}
%\end{iverbatim}
%
% If you still love \LaTeX-2.09, the following is what you have to do.
%
% \begin{quote}
% \SpecialUsageIndex{\documentstyle}
% |\documentstyle[..,newvbtm,...]|\Meta{main-style}
% \end{quote}
%
% Note that loading \textsf{varvbtm} automatically loads \textsf{newvbtm}
% too.  Thus you may not load both though doing so is safe.
%
% 
%
% \subsection{\textsf{newvbtm}: Define \texttt{verbatim}-like Environments}
% \label{sec:usage-new}
%
% \SpecialOptIndex{newvbtm}{style file}
% \DescribeMacro{\newverbatim}
% The command;
%
% \begin{quote}
% |\newverbatim|\Meta{env}\opt{n-args}
%	\Meta{beg-def-outer}\Meta{beg-def-inner}|%|\\
% \phantom{\texttt{+newverbatim}\Meta{env}\opt{n-args}}
%	\Meta{end-def-inner}\Meta{end-def-outer}
% \end{quote}
%
% defines an environment named \meta{env} with \meta{n-args} arguments
% (optionally), and acting conceptually as follows:
%
% \begin{quote}
% \meta{beg-def-outer}|\begin{verbatim}|\meta{beg-def-inner}\\
% \meta{body-of-environment}\\
% \meta{end-def-inner}|\end{verbatim}|\meta{end-def-outer}
% \end{quote}
%
% Thus to have indented-footnotesize-|verbatim| named, say |indfnsverbatim|, 
% you may simply do the following.
%
%\begin{iverbatim}
%\newverbatim{indfnsverbatim}{\begin{itemize}\item[]\footnotesize}{}{}%
%                            {\end{itemize}}
%\end{iverbatim}
%
% Since |\newverbatim| defines not only \meta{env} but also its starred 
% counterpart \meta{env}\texttt{*} that acts like |verbatim*|, the
% definition above also defines |indfnsverbatim*| environment.
%
% If you use \LaTeXe{}, you may make \meta{env} have an optional argument
% whose default value is \meta{default} by;
%
% \begin{itemize}\item[]
% |\newverbatim|\Meta{env}\opt{n-args}\opt{default}
%	\Meta{beg-def-outer}\Meta{beg-def-inner}|%|\\
% \phantom{\texttt{+newverbatim}\Meta{env}\opt{n-args}\opt{default}}
%	\Meta{end-def-inner}\Meta{end-def-outer}
% \end{itemize}
%
% For example, our |indfnsverbatim| environment can have an optional
% argument to specify a font size other than |\footnotesize| by the
% following definition.
%
%\begin{iverbatim}
%\newverbatim{indfnsverbatim}[1][\footnotesize]%
%        {\begin{itemize}\item[]#1}{}{}{\end{itemize}}
%\end{iverbatim}
%
% The argument \meta{beg-def-inner} is for \TeX{}perts who wish to do
% something overriding what \LaTeX's |\verbatim| does.  Even if you don't
% have much confidence in your \TeX{}pertise, however, you can do some
% useful thing with this argument.  For example, the following is obtained
% by itself.
%
% \begin{itemize}\item[]
%\newverbatim{slverbatim}{\ttfamily}{\slshape}{}{}
%\begin{slverbatim}
%\newverbatim{slverbatim}{}{\slshape}{}{}
%\end{slverbatim}
% \end{itemize}
%
% Also you will find a few commands for this argument in
% \S\ref{sec:usage-var}.
% 
% The needs of \meta{end-def-inner} is much more limited.  One example is to
% check if |\end{verbatim}| is at the beginning of a line.  This examination
% is done by;
%
% \begin{quote}
% |\newverbatim{myverbatim}{...}{...}%|\\
% |        {\ifvmode |\meta{at-bol}| \else |\meta{not-at-bol}| \fi}{...}|
% \end{quote}
%
% \DescribeMacro{\renewverbatim}
% You may redefine your own |verbatim|-like environment, or even |verbatim|
% itself, by |\renewverbatim| whose arguments are same as those of
% |\newenvironment|.
%
% 
%
% \subsection{\textsf{varvbtm}: To Make Variants of \texttt{verbatim}}
% \label{sec:usage-var}
%
% \subsubsection{Tab Emulation}
% \label{sec:usage-var-tab}
%
% \DescribeMacro{\newtabverbatim}
% \DescribeMacro{\renewtabverbatim}
% The commands |\(re)newtabverbatim| is to (re)define a |verbatim|-like
% environment in which |<TAB>| acts as a tab.  The syntax of the command is
% same as that of |\(re)newverbatim|, and its operation is equivalent to;
%
% \begin{itemize}\item[]
% |\(re)newverbatim|\Meta{env}\opt{n-args}\opt{default}\\
% \mbox{}\qquad\qquad\Meta{beg-def-outer}|%|\\
% \mbox{}\qquad\qquad|{|\meta{beg-def-inner}\meta{beg-def-for-tab}|}%|\\
% \mbox{}\qquad\qquad|{|\meta{end-def-for-tab}\meta{end-def-inner}|}%|\\
% \mbox{}\qquad\qquad\Meta{end-def-outer}
% \end{itemize}
%
% For example;
%
%\begin{iverbatim}
%\newtabverbatim{tabverbatim}{}{}{}{}
%\end{iverbatim}
%
% defines |tabverbatim| environment just to make |<TAB>| act as a tab.
% Another example to have tab emulation version of |indfnsverbatim| with
% optional argument, say |indfnstabverbatim| is;
%
%\begin{iverbatim}
%\newtabverbatim{indfnstabverbatim}[1][\footnotesize]%
%        {\begin{itemize}\item[]#1}{}{}{\end{itemize}}
%\end{iverbatim}
%
% Note that in the starred version, e.g. |tabverbatim*|, a |<TAB>| is
% translated into a sequence of \verb*! !.
%
% \DescribeOpt{VVBtabwidth}{counter}
% The distance between tab stops is the width of eight characters of the
% font used in the environment, i.e. typewriter font usually.  If you want
% to change this default value, set the counter |VVBtabwidth| to the number
% of characters of the distance.
% 
% \DescribeMacro{\VVBbegintab}
% \DescribeMacro{\VVBendtab}
% The magical stuff for \meta{beg-def-for-tab} and \meta{end-def-for-tab}
% is also accessible through commands |\VVBbegintab| and |\VVBendtab| for
% \TeX{}perts who wish to do something with |\(re)newverbatim| rather than
% |\(re)newtabverbatim|.
%
% 
%
% \subsubsection{Form Feed Character}
% \label{sec:usage-var-ff}
%
% \DescribeMacro{\VVBprintFF}
% \DescribeMacro{\VVBprintFFas}
% You might have found that |<FF>| (or |^L|) in |verbatim| caused a
% mysterious error;
%
%\begin{iverbatim}
%! Forbidden control sequence found while scanning use of \@xverbatim.
%\end{iverbatim}
%
% This is because |<FF>| is not {\em verbatimized}.  Giving the command
% |\VVBprintFF| to $\langle$\textit{beg-def-}\allowbreak
% \textit{outer}$\rangle$ (or \meta{beg-def-inner}) of |\newverbatim| does
% it for you and makes |<FF>| printed as |^L| in default.  You may change
% this default print image by;
%
% \begin{quote}
% |\VVBprintFFas|\Meta{str}
% \end{quote}
% where \meta{str} is a sequence of any printable characters other than |{|
% and |}|.  Note that this command is very {\em fragile} as |\verb| and
% |\index|, and thus should not be used in an argument of other commands
% including |\(re)newverbatim|.
%
% \DescribeMacro{\VVBbreakatFF}
% \DescribeMacro{\VVBbreakatFFonly}
% The other way to make |<FF>| acceptable is to give it a useful and natural
% job, i.e.\ page breaking.  This is done by giving |\VVBbreakatFF| to
% \meta{beg-def-inner} (not {\em outer}).  Its more powerful relative,
% |\VVBbreakatFFonly|, is also available to allow page breaking at |<FF>|
% only.  Unfortunately, these two commands are incompatible with
% |\(re)newtabverbatim| and thus you have to use |\(re)newverbatim| with
% |\VVBbegintab| {\em followed by} them.
%
% 
%
% \subsubsection{Non-Verbatim Stuff in \texttt{verbatim}-like Environment}
% \label{sec:usage-var-nonverb}
%
% \DescribeMacro{\VVBnonverb}
% You might have once wished to insert a few non-verbatim stuff, for example 
% math stuff.  The command, to be given to \meta{beg-def-outer};
%
%\begin{quote}
%\newverbatim{verbatimwithnv}{\VVBnonverb{\!}\ttfamily}{}{}{}
%\begin{verbatimwithnv}
%\VVBnonverb{\!$\langle\mbox{\textit{char}}\rangle$!}
%\end{verbatimwithnv}
%\end{quote}
%
% makes it possible.  For example, the author just did the following to
% produce the result shown above.
%
%\begin{iverbatim}
%\newverbatim{verbatimwithnv}{\VVBnonverb{\!}}{}{}{}
%\begin{verbatimwithnv}
%\VVBnonverb{\!$\langle\mbox{\textit{char}}\rangle$!}
%\end{verbatimwithnv}
%\end{iverbatim}
%
% As shown in the example above, the non-verbatim staff is surrounded by
% a pair of \meta{char}, the letter `|!|' in this case.  Note that
% \meta{char} has to be preceded by `|\|' when it is given as the argument of
% |\VVBnonbverb|, and \meta{char} should not be `|\|'.  Also note that the
% default font for the non-verbatim part % is not that for verbatim part,
% but the font used outside the environment
%
% \footnote{Strictly speaking, the font used when \cs{VVBnonverb} is
% invoked.  Thus if \cs{VVBnonverb} is preceded by a font changing command,
% the fond chosen by the command will be used.}.
% 
% \DescribeMacro{\VVBnonverbmath}
% As mentioned above, math stuffs will be most desirable to be
% non-verbatim.  Thus the macro;
%
%\begin{quote}
%\newverbatim{verbatimwithnv}{\VVBnonverbmath\ttfamily}{}{}{}
%\begin{verbatimwithnv}
%\VVBnonverbmath[\$\langle\mbox{\textit{char}}\rangle$]
%\end{verbatimwithnv}
%\end{quote}
% gives you a shorthand to typeset the stuff surrounded by a pair of
% \meta{char} in math mode.  Since the default of \meta{char} is |$| as
% expected, the example above may be;
%
%\begin{iverbatim}
%\newverbatim{verbatimwithnv}{\VVBnonverbmath}{}{}{}
%\begin{verbatimwithnv}
%\VVBnonverb{\$\langle\mbox{\textit{char}}\rangle$}
%\end{verbatimwithnv}
%\end{iverbatim}
%
% 
%
% \subsubsection{Verbatim Input}
% \label{sec:usage-var-input}
%
% The last thing \textsf{varvbtm} gives you is;
%
% \begin{itemize}\item[]
% |\(re)newverbatiminput|\Meta{command}\opt{n-args}\opt{default}|%|\\
% \phantom{\texttt{+(re)newverbatiminput}}
%	\Meta{beg-def-outer}\Meta{beg-def-inner}|%|\\
% \phantom{\texttt{+(re)newverbatiminput}}
%	\Meta{end-def-inner}\Meta{end-def-outer}
% \end{itemize}
%
% to define a \meta{command} to |\input| a file.  Since this define a
% \meta{command} instead of an environment, \meta{command} should have `|\|'
% as its prefix.  The \meta{command} has at least one mandatory argument,
% \meta{file} to be input, which can be referred as first argument if
% \opt{default} is not supplied, or as second otherwise.  Note that,
% however, if the \meta{command} does not have any other arguments, you can
% omit \opt{n-arg}.
%
% For example;
%
%\begin{iverbatim}
%\newverbatiminput{\vinput}{}{}{}{}
%\end{iverbatim}
%
% defines |\vinput|\Meta{file} (and |\vinput*|) that |\input| a \meta{file}
% as if the \meta{file} has |\begin|\slash|\end{verbatim}| at its first and
% last lines.  A little bit more complicated example;
%
%\begin{iverbatim}
%\newverbatiminput{\indfnsvinput}[2][\footnotesize]%
%        {\begin{itemize}\item[]#1}{}{}{\end{itemize}}
%\end{iverbatim}
%
% defines a indented-footnotesize-by-default version of |\vinput|.
%
% 
%
% \IndexPrologue{\newpage\section*{Index}
% Underlined number refers to the page where the specification of
% corresponding entry is described.}
% \StopEventually{
% \section*{Acknowledgments}
%
% The author thanks to Noboru Matsuda and Carlos Puchol whose posts to
% news groups triggered writing very first version of macros in
% \textsf{newvbtm} and \textsf{varvbtm}.
%
% For the implementation of these style files, the author refers the base
% implementations of the macros for \texttt{verbatim} environment.
% These macros are written by Leslie Lamport as a part of
% \LaTeX-2.09 and \LaTeXe{} (1997/12/01) to which Johannes Braams and other
% authors also contributed.
%
% \PrintIndex}
%
% 
%
% \newpage
% \section{Implementation}
% \label{sec:imp}
% \subsection{Tricks for Compatibility}
% \label{sec:imp-compat}
%
% \begin{macro}{\ifnvb@LaTeXe}
% At the very beginning of each style file, we check whether it is loaded by
% \LaTeXe{} or \LaTeX-2.09, declare the flag |\ifnvb@LaTeXe| and set it to
% true or false, and then declare |\NeedsTeXFormat| and |\ProvidesPackage|
% if \LaTeXe{}.  This part is embedded at the beginning of
% \textsf{newvbtm.dtx} in a tricky manner to let \textsf{docstrip} produce
% the following code, for example for \textsf{newvbtm}.
% \SpecialIndex{\NeedsTeXFormat}
% \SpecialIndex{\ProvidesPackage}
% \end{macro}
%
%\begin{itemize}\item[]
%\begin{verbatim}
%\newif\ifnvb@LaTeXe
%\def\next{LaTeX2e}
%\ifx\fmtname\next \nvb@LaTeXetrue
%\def\next{
%\NeedsTeXFormat{LaTeX2e}[1994/12/01]
%\ProvidesPackage{newvbtm}}
%\else \nvb@LaTeXefalse
%\def\next[#1]{}\fi
%\next
%[2002/04/08 v1.1 ]
%\end{verbatim}
%\end{itemize}
%
% \SpecialIndex{\RequirePackage}
% In \textsf{varvbtm}, loading \textsf{newvbtm} also takes care of the
% compatibility.  That is, \textsf{newvbtm} is loaded by |\RequirePackage| if 
% \LaTeXe, while simply by |\input| otherwise.  Since \textsf{newvbtm} does
% not modifies any existential macros nor declares anything by |\new| except 
% for |\newif|\footnote{
%
% Multiple \cs{newif} for a flag is safe, and thus we do it for
% \cs{nvb@LaTeXe} both in \textsf{newvbtm} and \textsf{varvbtm}.},
%
% it is safe even if |\newvbtm| is loaded multiple times in \LaTeX-2.09.
%
% \iffalse
%<*varvbtm>
% \fi
%    \begin{macrocode}

\ifnvb@LaTeXe
\RequirePackage{newvbtm}
\else
\input{newvbtm.sty}
\fi
%    \end{macrocode}
% \iffalse
%</varvbtm>
% \fi
%
% 
%
% \subsection{\textsf{newvbtm}}
% \label{sec:imp-new}
%
% \iffalse
%<*newvbtm>
% \fi
% \begin{macro}{\newverbatim}
% \begin{macro}{\renewverbatim}
% \begin{macro}{\nvb@newenv}
% \begin{macro}{\nvb@Xnewverbatim}
% The macros |\newverbatim| and |\renewverbatim| call a macro
% |\nvb@newverbatim| after |\nvb@newenv| and |\nvb@Xnewverbatim| are made
% |\let|-equal to appropriate macros.  That is, |\nvb@newenv| is either
% |\newenvironment| or |\renewenvironment|, and |\nvb@Xnewverbatim| is, in
% both cases, |\nvb@xnewverbatim| that is the body of our environment
% definition as explained later.  Note that |\nvb@Xnewverbatim| will be set
% differently in the macros defined in \textsf{varvbtm}.
% \end{macro}\end{macro}\end{macro}\end{macro}
%
% \begin{macro}{\nvb@newverbatim}
% \begin{macro}{\nvb@inewverbatim}
% The common macro |\nvb@newverbatim| checks the existence of \opt{n-args}
% and then calls |\nvb@inewverbatim| to check that of \opt{default}.  Note
% that since \LaTeX-2.09's |\(re)newenvironment| does not have
% \opt{default}, these macros have definitions slightly different from those
% for \LaTeXe{} to pass an empty argument to |\nvb@Xnewverbatim| always.
% \end{macro}\end{macro}
%
%    \begin{macrocode}

\def\newverbatim{\let\nvb@newenv\newenvironment
        \let\nvb@Xnewverbatim\nvb@xnewverbatim \nvb@newverbatim}
\def\renewverbatim{\let\nvb@newenv\renewenvironment
        \let\nvb@Xnewverbatim\nvb@xnewverbatim \nvb@newverbatim}

\ifnvb@LaTeXe
\def\nvb@newverbatim#1{\@ifnextchar[%]
        {\nvb@inewverbatim{#1}}{\nvb@inewverbatim{#1}[0]}}
\def\nvb@inewverbatim#1[#2]{\@ifnextchar[%]
        {\nvb@Xnewverbatim{#1}[#2]}{\nvb@Xnewverbatim{#1}[#2][]}}
\else
\def\nvb@newverbatim#1{\@ifnextchar[%]
        {\nvb@inewverbatim{#1}}{\nvb@Xnewverbatim{#1}[0][]}}
\def\nvb@inewverbatim#1[#2]{\nvb@Xnewverbatim{#1}[#2][]}
\fi

%    \end{macrocode}
%
% \begin{macro}{\nvb@xnewverbatim}
% \changes{v1.1}{2002/04/05}
%	{\cs{@tempa} is replaced by \cs{nvb@tempa} to avoid conflict in 2.09.}
% \begin{macro}{\nvb@currenvir}
% \begin{macro}{\nvb@defxverbatim}
% \begin{macro}{\nvb@xverbatim}
% \begin{macro}{\nvb@beginhook}
% \begin{macro}{\nvb@endinhook}
% \begin{macro}{\nvb@endouthook}
% The macro |\nvb@xnewverbatim| performs the essential part of the function
% to define a verbatim-like environment.  First it checks if \meta{default}
% is empty so that this optional argument is not passed to
% |\(re)newenvironment|, especially of \LaTeX-2.09.  Then it calls
% |\(re)newenvironment| to define \meta{env} which performs the following in
% \meta{beg-def} part.
%
% \begin{enumerate}
% \def\labelenumi{b\arabic{enumi}.}
% \item
% |\def|-ine |\nvb@currenvir| to let it have \meta{env} as its body, so that
% the name of environment can be referred by the macros in \textsf{varvbtm}.
%
% \item
% Execute \meta{beg-def-outer}.
%
% \item
% Open a group to localize assignments in \LaTeX's |\@verbatim|, especially
% those of flags referred in |\list|-related macros.
%
% \item
% Perform what \LaTeX's |\verbatim| does, i.e.\ |\@verbatim| etc., except for
% |\@xverbatim|.  In starred-version, only |\@verbatim| is called in this
% step.
%
% \item
% Call |\nvb@defxverbatim| to define |\nvb@xverbatim| that performs what
% \LaTeX's \hbox{|\@xverbatim|} does but its argument terminator is
% ``|\end|\Meta{env}''.  The definition of |\nvb@defxverbatim| is done in a
% group in which `|\|', `|{|' and `|}|' have ``other'' |\catcode| with the
% well-known technique using `\verb!|!', `|[|' and `|]|'.
%
% \item
% Call |\nvb@beginhook|, which is usually |\relax| but will not be if
% |\VVBnonverb| is executed in \meta{beg-def-outer} as described in
% \S\ref{sec:imp-var-nonverb}.
%
% \item
% Execute \meta{beg-def-inner}.
%
% \item
% Call |\nvb@xverbatim| to typeset the body of environment verbatim.
% \end{enumerate}
%
% The \meta{end-def} part for \meta{env} performs the following.
%
% \begin{enumerate}
% \def\labelenumi{e\arabic{enumi}.}
% \item
% Execute \meta{end-def-inner}.
%
% \item
% Call |\nvb@endinhook|, which is |\relax| now but could do something if
% necessary.
%
% \item
% Call |\endverbatim| to close the |\trivlist| opened by |\@verbatim|.
%
% \item
% Close the group opened by \meta{beg-def}.
%
% \item
% Execute \meta{end-def-outer}.
%
% \item
% Call |\nvb@endouthook|, which is also |\relax| now but might not be.
%
% \item
% Turn |\if@endpe| true to tell |\end| that \meta{env} is list-like.
% \end{enumerate}
% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
%
%    \begin{macrocode}
\long\def\nvb@xnewverbatim#1[#2][#3]#4#5#6#7{\def\nvb@tempa{#3}%
        \ifx\nvb@tempa\@empty \def\nvb@tempa{[#2]}%
        \else                 \def\nvb@tempa{[#2][#3]}\fi
        \def\@tempb{\nvb@newenv{#1}}%
        \expandafter\@tempb\nvb@tempa
                {\def\nvb@currenvir{#1}%
                        #4\begingroup \@verbatim \frenchspacing \@vobeyspaces
                        \nvb@defxverbatim{#1}\nvb@beginhook #5\nvb@xverbatim}%
                {#6\nvb@endinhook \endverbatim \endgroup
                        #7\nvb@endouthook \@endpetrue}%
        \def\@tempb{\nvb@newenv{#1*}}%
        \expandafter\@tempb\nvb@tempa
                {\def\nvb@currenvir{#1*}%
                        #4\begingroup \@verbatim
                        \nvb@defxverbatim{#1*}\nvb@beginhook #5\nvb@xverbatim}%
                {\@nameuse{end#1}}}
\let\nvb@beginhook\relax
\let\nvb@endinhook\relax
\let\nvb@endouthook\relax

\begingroup \catcode`\|\z@ \catcode`\[\@ne \catcode`\]\tw@
\@makeother\{ \@makeother\} \@makeother\\
|gdef|nvb@defxverbatim#1[|long|def|nvb@xverbatim##1\end{#1}[##1|end[#1]]]
|endgroup
%    \end{macrocode}
%
% \iffalse
%</newvbtm>
% \fi
%
% 
%
% \subsection{\textsf{varvbtm}}
% \label{sec:imp-var}
%
% \iffalse
%<*varvbtm>
% \fi
% 
% \subsubsection{Tab Emulation}
% \label{sec:imp-var-tab}
%
% For tab emulation, we declare the following registers.
%
% \begin{itemize}
% \item
% \begin{macro}{\c@VVBtabwidth}
% The count register |\c@VVBtabwidth| that has the number of characters
% between tab stops.  The default value 8 is set.
% \end{macro}
%
% \item
% \begin{macro}{\vvb@tabwidth}
% The dimen register |\vvb@tabwidth| that has the distance between tab
% stops.
% \end{macro}
%
% \item
% \begin{macro}{\vvb@everypar}
% The toks register |\vvb@everypar| to save the contents of |\everypar|,
% though it is usually ineffective.
% \end{macro}
%
% \item
% \begin{macro}{\vvb@tabbox}
% The box register |\vvb@tabbox| that contains stuffs between the beginning
% of line or a tab stop and the end of line or another tab stop.
% \end{macro}
% \end{itemize}
%
%    \begin{macrocode}

%% Tab Emulation

\newcounter{VVBtabwidth}\c@VVBtabwidth8
\newdimen\vvb@tabwidth
\newtoks\vvb@everypar
\newbox\vvb@tabbox

%    \end{macrocode}
%
% \begin{macro}{\VVBbegintab}
% \begin{macro}{\vvb@tabfil}
% \begin{macro}{\vvb@tabdef}
% The macro |\VVBbegintab|, which should be called from \meta{beg-def-inner} 
% part, performs a few preprocessing for tabbing some of which override the
% definition in |\@verbatim|.
%
% A line in a tabbing verbatim environment is
% enclosed in a box |\vvb@tabbox| so that we can know the horizontal
% position of a tab.  Thus, we let |\everypar| call |\vvb@tabbol| to
% open the box, and |\par| be |\vvb@tabeol| to close.  Note that
% |\obeylines| after the |\let| for |\par| is necessary to make `|^M|'
% |\let|-equal to our own |\par|.
%
% Then we set |\vvb@tabwidth| to
% $|\c@VVBtabwidth|\times\hbox{\meta{width-of-\texttt{A}}}$.  We also
% |\def|-ine |\vvb@tabfil| to produce a sequence of `\verb*! !' in the case
% of starred environment, i.e.\ the |\catcode| of space is not |\active|.
%
% Finally, we make |^I| active and |\let|-equal to |\vvb@tab| by
% |\vvb@tabdef|.
% \end{macro}\end{macro}\end{macro}
%
% \begin{macro}{\VVBendtab}
% The macro |\VVBendtab|, which should be called from \meta{end-def-inner}
% part, closes the box |\vvb@tabbox| if necessary, i.e.\ |\end|\Meta{env} is 
% not at the beginning of a line and thus not in vertical mode.
% \end{macro}
%
%    \begin{macrocode}
\def\VVBbegintab{\vvb@everypar\everypar
        \everypar{\vvb@tabbol \the\vvb@everypar}%
        \let\par\vvb@tabeol \obeylines
        \settowidth\vvb@tabwidth{A}\multiply\vvb@tabwidth\c@VVBtabwidth
        \ifnum\catcode`\ =\active \let\vvb@tabfil\relax
        \else                     \def\vvb@tabfil{\leaders\hbox{\char`\ }}\fi
        \catcode`\^^I\active \vvb@tabdef}
{\catcode`\^^I\active \gdef\vvb@tabdef{\let^^I\vvb@tab}}
\def\VVBendtab{\ifvmode\else \par \fi}

%    \end{macrocode}
%
% \begin{macro}{\vvb@tabbol}
% \begin{macro}{\vvb@tabeol}
% The macro |\vvb@tabbol| opens the box |\vvb@tabbox|, while |\vvb@tabeol|
% closes it after |\leavevmode| to ensure the box is opened and puts the
% contents of the box as the last (and maybe only one) element of a
% paragraph terminated by |\@@par|.  The flag |\if@tempswa|, which |\@verbatim|
% initiated to false, is examined in order to prevent |^M| just
% following |\begin|\Meta{env} from making an empty line.  Since the flag is 
% turned true by both |\vvb@tabbol| and |\vvb@tabeol|, a |^M| is in effect
% in other cases.
% \end{macro}\end{macro}
%
%    \begin{macrocode}
\def\vvb@tabbol{\@tempswatrue \setbox\vvb@tabbox\hbox\bgroup}
\def\vvb@tabeol{\if@tempswa
        \leavevmode \egroup \box\vvb@tabbox \@@par \penalty\interlinepenalty
        \fi \@tempswatrue}

%    \end{macrocode}
%
% \begin{macro}{\vvb@tab}
% The macro |\vvb@tab|, to which |^I| is made |\let|-equal, is the heart of
% tabbing.  It first closes |\vvb@tabbox| after |\leavevmode| to ensure its
% opening.  Then it moves to the next tab stop by putting a box of $(\lfloor
% w/t\rfloor+1)\times t$ wide, where $w$ is the width of |\vvb@tabbox| and
% $t$ is |\vvb@tabwidth|.  In the box, the contents of |\vvb@tabbox| is
% flushed left by |\vvb@tabfil#\hfil|, which makes invisible space in
% non-starred environment because |\vvb@tabfil| is relax, while produces a
% sequence of `\verb*! !' by |\leaders| in starred environment.  After the
% box is put, it opens |\vvb@tabbox| again by |\vvb@tabbol|.
% \end{macro}
%
%    \begin{macrocode}
\def\vvb@tab{\leavevmode \egroup
        \@tempdima\wd\vvb@tabbox \divide\@tempdima\vvb@tabwidth
        \multiply\@tempdima\vvb@tabwidth \advance\@tempdima\vvb@tabwidth
        \hbox to\@tempdima{\unhbox\vvb@tabbox \vvb@tabfil\hfil}\vvb@tabbol}

%    \end{macrocode}
%
% \begin{macro}{\newtabverbatim}
% \begin{macro}{\renewtabverbatim}
% \begin{macro}{\vvb@xnewtabverbatim}
% Finally, we define |\newtabverbatim| and |\renewtabverbatim| for tabbing
% verbatim environment definition.  They call the common macro
% |\nvb@newverbatim| described in \S\ref{sec:imp-new} to check the existence
% of optional arguments as |\(re)newverbatim| does, but |\nvb@Xnewverbatim|
% is made |\let|-equal to |\vvb@xnewtabverbatim| that simply calls
% |\nvb@xnewverbatim| attaching |\VVBbegintab| and |\VVBendtab| to
% \meta{beg-def-inner} and \meta{end-def-inner} respectively.
% \end{macro}\end{macro}\end{macro}
%
%    \begin{macrocode}
\def\newtabverbatim{\let\nvb@newenv\newenvironment
        \let\nvb@Xnewverbatim\vvb@xnewtabverbatim \nvb@newverbatim}
\def\renewtabverbatim{\let\nvb@newenv\renewenvironment
        \let\nvb@Xnewverbatim\vvb@xnewtabverbatim \nvb@newverbatim}
\def\vvb@xnewtabverbatim#1[#2][#3]#4#5#6{%
        \nvb@xnewverbatim{#1}[#2][#3]{#4}{#5\VVBbegintab}{\VVBendtab#6}}

%%^L
%    \end{macrocode}
%
% 
%
% \subsubsection{Form Feed Character}
% \label{sec:imp-var-ff}
%
% \begin{macro}{\VVBprintFF}
% \begin{macro}{\vvb@printFF}
% \begin{macro}{\VVBprintFFas}
% \begin{macro}{\vvb@printFFas}
% The macro |\VVBprintFF| simply makes |^L| |\let|-equal to |\vvb@printFF|
% whose body is print image of |^L| and is defined by |\VVBprintFFas|.
% Since the body of |\VVBprintFF| has |^L| that usually cannot appear in 
% the body of a macro because of its |\active|-ness and {\em outerness}, its
% |\def|-inition is enclosed in a group in which |^L| is made |\relax|
% together with that of |\VVBbreakatFF|.
%
% The macro |\VVBprintFFas|, cooperating with |\VVB@printFFas|, defines its
% argument \meta{str} verbatim as the body of |\vvb@printFF| by a well-known
% trick with grouping and \hbox{|\@sanitize|} used in, for example, |\index|.
% The default print image ``|^L|'' is also defined by |\VVBprintFFas|.
% \end{macro}\end{macro}\end{macro}\end{macro}
%
% \begin{macro}{\VVBbreakatFF}
% \begin{macro}{\vvb@FFpar}
% \begin{macro}{\vvb@breakFF}
% \begin{macro}{\vvb@parafterFF}
% The macro |\VVBbreakatFF| makes |^L| |\let|-equal to |\vvb@breakFF| and
% saves the definition of |\par| in |\vvb@FFpar| because it will be modified 
% by |\vvb@breakFF|\@.  The macro |\vvb@breakFF| breaks the current page and
% then makes |\par|, and |^M| by |\obeylines|, |\let|-equal to
% |\vvb@parafterFF|\@.  Since |\vvb@parafterFF| will do |\par| saved in
% |\vvb@FFpar| only when horizontal mode, |^M| just following |^L| will not
% produce an empty line at the beginning of the new page.  After the first
% |^M| in the page, |\par| and |^M| regain their original definitions.
% \end{macro}\end{macro}\end{macro}\end{macro}
%
% \begin{macro}{\VVBbreakatFFonly}
% \begin{macro}{\vvb@FF@par}
% \begin{macro}{\vvb@FFpenalty}
% \begin{macro}{\vvb@parnobreak}
% The macro |\VVBbreakatFFonly| does what |\VVBbreakatFF| by calling it but
% before that it makes |\par| |\let|-equal to |\vvb@parnobreak| saving its
% definition in |\vvb@FF@par|.  The macro |\vvb@parnobreak| temporarily
% makes |\penalty| |\let|-equal to |\@tempcnta| in order that
% |\penalty|\meta{num} in original |\par| saved in |\vvb@FF@par| do
% nothing.  Then it restores |\penalty| from |\vvb@FFpenalty| and inserts
% |\nobreak| to inhibit page break at |^M|.  The temporary modification of
% |\penalty| is done |\global|-ly because of the compatibility with the
% tabbing verbatim.
% \end{macro}\end{macro}\end{macro}\end{macro}
%
%    \begin{macrocode}

%% Form Feed Character

\begingroup \let^^L\relax
\gdef\VVBprintFF{\let^^L\vvb@printFF}
\gdef\VVBbreakatFF{\let^^L\vvb@breakFF \let\vvb@FFpar\par}
\endgroup

\def\VVBprintFFas{\begingroup \@sanitize \vvb@printFFas}
\def\vvb@printFFas#1{\endgroup \def\vvb@printFF{#1}}
\VVBprintFFas{^L}

\def\vvb@breakFF{\par \vfil \break \let\par\vvb@parafterFF \obeylines}
\def\vvb@parafterFF{\ifhmode \vvb@FFpar \fi \let\par\vvb@FFpar \obeylines}

\gdef\VVBbreakatFFonly{\let\vvb@FF@par\par
        \let\par\vvb@parnobreak \obeylines \VVBbreakatFF}
\let\vvb@FFpenalty\penalty
\def\vvb@parnobreak{\global\let\penalty\@tempcnta \vvb@FF@par
        \global\let\penalty\vvb@FFpenalty \nobreak}

%%^L
%    \end{macrocode}
%
% 
% 
% \subsubsection{Non-Verbatim}
% \label{sec:imp-var-nonverb}
%
% \begin{macro}{\VVBnonverb}
% \begin{macro}{\vvb@nvfont}
% \begin{macro}{\vvb@currsize}
% \begin{macro}{\vvb@beginhook}
% The macro |\VVBnonverb| saves the current font in |\vvb@nvfont|.  If
% \LaTeXe, its body will be a sequence of |\fontencoding|\meta{curr-encoding}
% and its relatives followed by |\selectfont|.  Otherwise, its body will be
% the current font size command saved in |\vvb@currsize| followed by the
% current font produced by |\the\font|.  Then |\VVBnonverb| defines
% |\nvb@beginhook| so as to call |\vvb@nonverb| with the argument
% |\|\meta{char} just before \meta{beg-def-inner} is executed.
% \end{macro}\end{macro}\end{macro}\end{macro}
%
% \begin{macro}{\VVBnonverbmath}
% \begin{macro}{\vvb@nonverbmath}
% \begin{macro}{\vvb@@bnonverb}
% \begin{macro}{\vvb@@enonverb}
% The macro |\VVBnonverbmath| examines the existence of its optional
% argument |\|\meta{char} and calls |\VVBnonverb| via |\vvb@nonverbmath|
% with it or with |\$| if omitted.  Prior to the call, it makes both
% |\vvb@@bnonverb| and |\vvb@@enonverb| |\let|-equal to `|$|' so that the
% non-verbatim part is surrounded by them.
% \end{macro}\end{macro}\end{macro}\end{macro}
%
%    \begin{macrocode}

%% Non-Verbatim

\def\VVBnonverb#1{\ifnvb@LaTeXe
        \edef\vvb@nvfont{\noexpand\fontencoding{\f@encoding}%
                \noexpand\fontfamily{\f@family}%
                \noexpand\fontseries{\f@series}%
                \noexpand\fontshape{\f@shape}%
                \noexpand\fontsize{\f@size}{\noexpand\f@baselineskip}%
                \noexpand\selectfont}%
        \else
        \let\vvb@currsize\@currsize
        \edef\vvb@nvfont{\noexpand\vvb@currsize \the\font}\fi
        \def\nvb@beginhook{\vvb@nonverb#1}}
\def\VVBnonverbmath{\@ifnextchar[%]
        {\vvb@nonverbmath}{\vvb@nonverbmath[\$]}}
\def\vvb@nonverbmath[#1]{\let\vvb@@bnonverb$\let\vvb@@enonverb$\VVBnonverb#1}

%    \end{macrocode}
% 
% \begin{macro}{\vvb@nonverb}
% \begin{macro}{\vvb@bnonverb}
% \begin{macro}{\vvb@enonverb}
% \begin{macro}{\vvb@@bnonverb}
% \begin{macro}{\vvb@@enonverb}
% \begin{macro}{\do}
% \begin{macro}{\vvb@regaincat}
% The macro |\vvb@nonverb| defines the |\active| \meta{char} to open a
% |\hbox| after |\leavevmode| and then to call |\vvb@bnonverb| to do the
% following.  First it selects the font saved in |\vvb@nvfont| and then
% restores |\catcode| of special characters by |\vvb@regaincat|.  Since the
% body of |\vvb@regaincat| is the expansion result of |\dospecials| with the
% defintion of |\do| as;
%
%\begin{iverbatim}
%\def\do#1{\catcode`\noexpand#1\number\catcode`#1\relax}
%\end{iverbatim}
%
% it should be the sequence of ``\verb*!\catcode`\ 10!'' and so on.  The
% macro |\vvb@bnoverb| also set |\catcode| of characters in
% |\verbatim@nolig@list| if exists or `|`|' otherwise to 12 (other).  Then
% the |\catcode| of \meta{char} is made |\active| because it might not be by
% the preceding |\catcode| modification.  Finaly it calls |\vvb@enonverb| to
% get non-verbatim stuff.
%
% The macro |\vvb@enonverb|, which is also defined in |\vvb@nonverb|, gets
% everything before \meta{char}, puts it in the |\hbox| surrounding it by
% |\vvb@@bnonverb| and |\vvb@@enonverb|, which are both `|$|' in the case of
% |\VVBnonverbmath| but |\relax| otherwise, and then closes the |\hbox|.
%
% Since the definitions of the \meta{char} and |\vvb@enonverb| should have
% |\active| \meta{char}, we use the trick with |\lowercase| in which the
% |\lccode| of `|~|' is the code of \meta{char}.
%
% After the definitions, the character `|\|' is made |\active| and
% |\let|-equal to |\vvb@esc| by |\vvb@escdef| so that we can find
% ``|end|\Meta{env}'', stored in |\vvb@endenvir| by |\vvb@enddef|, following 
% `|\|'.  Note that we cannot use the conventional scheme to get everything
% in the body of \meta{env} by |\nvb@xverbatim| because the |\catcode| of
% special characters are modified in non-verbatim part.  Thus we make `|\|'
% active and |\vvb@xverbatim| |\relax|.
% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
%
%    \begin{macrocode}
\def\vvb@nonverb#1{\catcode`#1\active \begingroup \lccode`\~`#1\relax
        \lowercase{\endgroup
                \def~{\leavevmode \hbox\bgroup \vvb@bnonverb#1}%
                \def\vvb@enonverb##1~{\vvb@@bnonverb
                        ##1\vvb@@enonverb \egroup}}%
        \catcode`\\\active \vvb@escdef \vvb@enddef \let\nvb@xverbatim\relax}
\def\vvb@bnonverb#1{\vvb@nvfont \vvb@regaincat
        \ifx\verbatim@nolig@list\undefined \@makeother\`\relax
        \else \let\do\@makeother \verbatim@nolig@list \fi
        \catcode`#1\active \vvb@enonverb}
\let\vvb@@bnonverb\relax
\let\vvb@@enonverb\relax
\def\do#1{\catcode`\noexpand#1\number\catcode`#1\relax}
\edef\vvb@regaincat{\dospecials}

%    \end{macrocode}
%
% \begin{macro}{\vvb@escdef}
% \begin{macro}{\vvb@enddef}
% \begin{macro}{\vvb@endenvir}
% The macro |\vvb@escdef| simply let |\active| character `|\|' act as the
% macro |\vvb@esc|, while |\vvb@enddef| defines the macro |\vvb@endenvir| as 
% ``|end|\Meta{env}'' referring the environment name saved in
% |\vvb@currenvir|.  Since these two macros has `|\|', `|{|' and `|}|' of
% ``other'' category, the well-known technique replacing them is used.
% \end{macro}\end{macro}\end{macro}
%
%    \begin{macrocode}
\begingroup \catcode`\|\z@ \catcode`\[\@ne \catcode`\]\tw@
\@makeother\{ \@makeother\} \catcode`\\|active
|gdef|vvb@escdef[|let\|vvb@esc]
|gdef|vvb@enddef[|edef|vvb@endenvir[end{|nvb@currenvir}]]
|endgroup

%    \end{macrocode}
%
% \begin{macro}{\vvb@esc}
% \begin{macro}{\vvb@checkend}
% The macro |\vvb@esc| for `|\|' in |\active| examines if it is followed by
% |end|\Meta{env} stored in |\vvb@endenvir|.  The examination is done in
% character-by-character manner by |\vvb@checkend| because we might have a
% partially matching sequence followed by non-verbatim stuff which cannot be 
% picked before the |\catcode| modification.  The comparison for the
% examination is done by |\ifx| because we might have an |\active| character.
%
% If we find the terminator, we call |\end|\Meta{env} to close the
% environment.  Otherwise, the |\char|-acter `|\|' followed by the partial
% matched (possibly empty) sequence followed by the unmatched character are 
% inserted back.
% \end{macro}\end{macro}
%
%    \begin{macrocode}
\def\vvb@esc{\let\@tempa\vvb@endenvir \let\@tempb\@empty \vvb@checkend}
\def\vvb@checkend#1{\edef\@tempc{\expandafter\@car\@tempa\@nil}%
        \def\@tempd{#1}\ifx\@tempc\@tempd
                \edef\@tempa{\expandafter\@cdr\@tempa\@nil}%
                \ifx\@tempa\@empty
                        \edef\next{\noexpand\end{\nvb@currenvir}}%
                \else
                        \edef\@tempb{\@tempb#1}\let\next\vvb@checkend \fi
        \else   \def\next{\char`\\\@tempb#1}\fi
        \next}

%%^L
%    \end{macrocode}
%
% 
%
% \subsubsection{Verbatim Input}
% \label{sec:imp-var-input}
%
% \begin{macro}{\newverbatiminput}
% \begin{macro}{\renewverbatiminput}
% \begin{macro}{\vvb@Xnewverbatim}
% The macros |\newverbatiminput| and |\renewverbatiminput| call the common
% macro |\nvb@newverbatim| described in \S\ref{sec:imp-new} to check the
% existence of optional arguments, making |\nvb@Xnewverbatim| |\let|-equal
% to their own version, |\nvb@xnewvinput|.
% \end{macro}\end{macro}\end{macro}
%
%    \begin{macrocode}

%% Verbatim Input

\def\newverbatiminput{\let\nvb@newenv\newenvironment
        \let\nvb@Xnewverbatim\vvb@xnewvinput \nvb@newverbatim}
\def\renewverbatiminput{\let\nvb@newenv\renewenvironment
        \let\nvb@Xnewverbatim\vvb@xnewvinput \nvb@newverbatim}

%    \end{macrocode}
%
% \begin{macro}{\nvb@xnewvinput}
% \begin{macro}{\nvb@xnewvinputnodef}
% \begin{macro}{\nvb@xnewvinputdefault}
% The macro |\nvb@xnewvinput| defines environments of weird names,
% \meta{command} name followed by a space and a `|*|' for starred-version.
% The \meta{command} itself is defined to call |\begin|\Meta{env} or
% |\begin{|\meta{env}|*}|, where \meta{env} is what we now define, according
% to the existence of `|*|' following the \meta{command}.
%
% Prior to defining \meta{env}, we check if the optional \meta{n-args} is
% zero, and makes it one if so for the argument \meta{file}.  We also check
% the existence of the \meta{default} argument, because if omitted
% \meta{file} is the first argument as |\vvb@xnewvinputnodef| defines, while
% the second otherwise as |\vvb@xnewvinputdefault| does.  The core of the
% definition is in the \meta{beg-def-inner} part given to
% |\nvb@xnewverbatim|.  In this part, we redefine |\nvb@xverbatim| as
% |\end|\Meta{env} and then |\input| the \meta{file} so that the environment
% is immediately closed after the \meta{file} is read verbatim.
% \end{macro}\end{macro}\end{macro}
%
%    \begin{macrocode}
\def\vvb@xnewvinput#1[#2][#3]{%
        \edef\@tempa{\expandafter\@cdr\string#1\@nil\space}
        \edef#1{\noexpand\@ifstar{\noexpand\begin{\@tempa*}}%
                                 {\noexpand\begin{\@tempa}}}%
        \ifnum#2=\z@
                \edef\@tempa{\noexpand\nvb@xnewverbatim{\@tempa}[1]}
        \else   
                \edef\@tempa{\noexpand\nvb@xnewverbatim{\@tempa}[#2]}\fi
        \def\@tempb{#3}\ifx\@tempb\@empty \let\@tempb\vvb@xnewvinputnodef
                       \else              \let\@tempb\vvb@xnewvinputdefault \fi
        \@tempb[#3]}
\def\vvb@xnewvinputnodef[#1]#2#3{%
        \@tempa[#1]{#2}{#3%
                \edef\nvb@xverbatim{\noexpand\end{\nvb@currenvir}}\input{##1}}}
\def\vvb@xnewvinputdefault[#1]#2#3{%
        \@tempa[#1]{#2}{#3%
                \edef\nvb@xverbatim{\noexpand\end{\nvb@currenvir}}\input{##2}}}
%    \end{macrocode}
% 
% \iffalse
%</varvbtm>
% \fi
%
% 
%
% \IndexPrologue{\newpage\section*{Index}
% Italicized number refers to the page where the specification and usage of
% corresponding entry is described, while underlined is for the
% implementation of the entry.}
% \Finale
% \GlossaryPrologue{\newpage\section*{Revision History}}
% \PrintChanges
\endinput