summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/verbasef/verbasef-doc.tex
blob: 5233883f68855dca2781c23e0c141a70dad72aef (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
\documentclass[pagesize=auto]{scrartcl}

\usepackage{fixltx2e}
\usepackage{etex}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{amstext}
\usepackage{microtype}
\usepackage{hyperref}

\newcommand*{\mail}[1]{\href{mailto:#1}{\texttt{#1}}}
\newcommand*{\pkg}[1]{\textsf{#1}}
\newcommand*{\cs}[1]{\texttt{\textbackslash#1}}
\makeatletter
\newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}}
\makeatother
\newcommand*{\opt}[1]{\texttt{#1}}
\newcommand*{\meta}[1]{\textlangle\textsl{#1}\textrangle}
\newcommand*{\oarg}[1]{\texttt{[}\meta{#1}\texttt{]}}

\addtokomafont{title}{\rmfamily}

\title{The \pkg{verbasef} package\thanks{This manual corresponds to \pkg{verbasef.sty}~v1.1, dated~95/01/20.}}
\subtitle{VERBatim Automatic Splitting of External Files}
\author{Paul A. Thompson}
\date{95/01/20}


\begin{document}

\maketitle

\noindent
Requires:
%
\begin{itemize}
\item The New Font Selection Scheme (NFSS) as implemented in \LaTeXe
\item \pkg{VERBATIM.STY} by Rainer Schoepf
\item \pkg{VRBEXIN.STY} by Paul Thompson \\
  However, it is based on \pkg{vrbinput.sty}, a style by 
  Bernd Raichle which must be revised as discussed below
  in the section labeled ``\hyperref[sec:important]{Important}''
\item \pkg{HERE.STY} by David Carlisle
\end{itemize}

\pkg{verbasef} allows you to input (subsections of a) file, print them in
verbatim mode, while automatically breaking up the inputted lines into
pieces of a given length, which are output as figures.  These figures are
posted using the \verb+[H]+ specification, which forces \LaTeX\ to place the figure
at the spot of invocation, rather than floating the figures to the top of
the next page.

Options for the verbasef specification include:
%
\begin{itemize}
\item numbering of input lines
\item differential number of lines for the first page
\item specification of the font for the verbatim output
\item specification of the font for the optional line numbering
\item specification of line numbers as labels \\
   To use the labelling feature, non-standard approaches must be used.
   A line number will be inserted into the main \texttt{.aux} file with label \texttt{foo},
   if the specification 
   %
\begin{verbatim}
Vzzlabel|foo|
\end{verbatim}
   %
   is inserted \emph{after} the line which is to be indicated.  Thus, if we have 
   a file with the following
   %
\begin{verbatim}
a line
b line
Vzzlabel|fooa|
c line
Vzzlabel|foob|
d line
Vzzlabel|fooc|
e line
f line
Vzzlabel|food|
\end{verbatim}
   %
   these lines will be found in the \texttt{.aux} file.
   %
\begin{verbatim}
\newlabel{fooa}{{2}{1}}
\newlabel{foob}{{3}{1}}
\newlabel{fooc}{{4}{1}}
\newlabel{food}{{6}{1}}
\end{verbatim}
   %
   They can be used as any other label, for instance 
   %
\begin{verbatim}
Using the labeling feature, pay attention to Line \ref{food} (found
on Page \pageref{food}) to understand this radically new method.
\end{verbatim}

   Any lines with the \texttt{Vzzlabel} specification will be ignored in the 
   line counts.
\end{itemize}


\section{Using the style}

\pkg{verbasef} is an adaptation of \pkg{VRBSUBFILE}, from Norman Walsh.  
I fully acknowledge Mr./Dr.~Walsh as the imprimature of the code ensconced
herein, but have included other features as indicated above.

Comments and suggestions always welcome.
%
\begin{verse}
  Paul A. Thompson \\
  Department of Psychiatry, Data Analysis and Statistics Section \\
  Case Western Reserve University \\
  Cleveland, OH 44106
  
  AudioNet: (216) 844-8946 \\
  InterNet: \mail{pat@po.cwru.edu}
\end{verse}


\minisec{User interface:}

\begin{description}
\item[\cmd{\VautoSubF}\oarg{\#1}\meta{\#2}\meta{\#3}\meta{\#4}\meta{\#5}\meta{\#6}]
  Input lines \meta{\#2} to \meta{\#3} of file \meta{\#4}.  If present, \meta{\#1} indicates which lines
  should be numbered.  For example, if \meta{\#1} is~5, lines 5, 10, 15, etc.
  will be numbered.  By default, lines are not numbered at all.
  \meta{\#5} is figure caption, and \meta{\#6} is figure label.

\item[\cmd{VautoSfFont}\oarg{\#1}\meta{\#2}]
  Use font \meta{\#2} for verbatim input lines and, if present, use font \meta{\#1} for
  line numbers.  By default, \meta{\#2} is \cmd{\tt} and \meta{\#1} is \verb+\rm\tiny+.
  
\item[\cmd{VautoPl}\meta{\#1}]
  Placement of the figure (either \opt{H} or some other placement character)
  By default, placement is \opt{H} (immediate here, \pkg{here.sty}) 
  (This currently does not function.  All placement is done using the 
  \opt{H} specification.)

\item[\cmd{VautoLines}\oarg{\#1}{\meta{\#2}}]
  \meta{\#2} is number of lines per page.  If \meta{\#1} is included, it is the number of
  lines for the first page.  If not, $\text{\meta{\#1}} = \text{\meta{\#2}}$
\end{description}


\section{Important}
\label{sec:important}

In order to use the \pkg{verbasef.sty} file, \pkg{VRBINPUT.STY} must be \emph{modified}
and given a \emph{new name.}  Here are instructions for modification:

You must do \emph{either} \ref{item:1}--\ref{item:4} below \emph{or} \ref{item:5} below to get \pkg{verbasef} to run properly.

\begin{enumerate}
\item \label{item:1}
  Obtain \pkg{vrbinput.sty} from the standard distribution channels.  The file 
  should have the following characteristics:
  %
\begin{verbatim}
\fileversion{v1.0b}
\filedate{91/06/30}
\docdate{91/08/05}
\end{verbatim}

\item Copy \texttt{vrbinput.sty} to a file \texttt{vrbexin.sty}.  \emph{This must be done prior to
   editing any file.}

\item Edit the file \texttt{vrbexin.sty}.  Please don't edit the file \texttt{vrbinput.sty}.
  Change Line~90 from \cmd{\verbatim@startline} to \cmd{\verbatim@start}
  as shown in the fragment of code from Lines~89--92 below.
  %
\begin{verbatim}
\def\verbatim@readfile#1{%
   \verbatim@start
   \openin\verbatim@in@stream #1\relax
   \ifeof\verbatim@in@stream
\end{verbatim}

\item \label{item:4} \emph{Very important.}  \emph{Change all occurrances} of \texttt{vrbinput}, in titles, typeout
  sections and credits to \texttt{vrbexin}.  Remove all references to the original
  author, Bernd Raichle, as he is not the author of the style file \pkg{vrbexin}.
  You may substitute my name for Mr.~Raichle if you wish.

\item \label{item:5} Obtain \texttt{vrbexin.sty} directly from the same subdirectory that \pkg{verbasef} was
  found in.

\item Place this \texttt{.sty} file in a place searched by \TeX, on the \texttt{TEXINPUT} path.
\end{enumerate}
%
After I can figure out the \textsc{docstrip} utility, I will do this stuff myself.

Note: As is standard practice in the \TeX\ community, any modifications in 
\texttt{.sty} files must be given new names.  Thus, it is certainly vitally important
that the modifications in \pkg{vrbinput.sty} be done in the file named
\texttt{vrbexin.sty}, not in the original which I did not write.

\end{document}