Article View: comp.text.tex
Article #1373Help me with \def and verbatim (in LaTeX)
From: Ajay Shah
Date: Fri, 17 Apr 1992 08:53
Date: Fri, 17 Apr 1992 08:53
47 lines
1509 bytes
1509 bytes
I get this message from latex:
Runaway argument?
double *dvector(int low, int high) \end {verbatim} \normalsize ^^M^^M\ETC.
File ended while scanning use of \@xverbatim.
<inserted text>
\par
I'm trying to \def something which uses \begin{verbatim} and \end{verbatim}.
How should it be done?
Here is the input file.
---------------------------------------------------------------------------
\documentstyle{article}
\begin{document}
\def\fndef#1#2{
\item \index{Library Function {\tt #1}}
\small \begin{verbatim}
#2
\end{verbatim} \normalsize
}
\begin{enumerate}
\fndef{dvector}{double *dvector(int low, int high)}
This allocates vectors.
\fndef{dmatrix}{double **dmatrix(int rl, int rh, int cl, int ch)}
This allocates matrices.
\end{enumerate}
\end{document}
---------------------------------------------------------------------------
How would I deal with function prototypes which run over many lines?
Is \newenvironment any good? I couldn't make it work well in this problem.
-ans.
--
Ajay Shah, (213)749-8133, ajayshah@usc.edu
Technical Details
Message-ID:
<kut4fnINN385@alhena.usc.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!newsShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!news From: ajayshah@alhena.usc.edu (Ajay Shah) Newsgroups: comp.text.tex Subject: Help me with \def and verbatim (in LaTeX) Date: 17 Apr 1992 01:53:11 -0700 Organization: University of Southern California, Los Angeles, CA Lines: 47 Sender: ajayshah@alhena.usc.edu (Ajay Shah) Message-ID: <kut4fnINN385@alhena.usc.edu> NNTP-Posting-Host: alhena.usc.edu