\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}