Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!agate!jmn From: jmn@power.berkeley.edu (J. Mark Noworolski) Newsgroups: comp.text.tex Subject: using redefined \verbatim in verbatimfiles Message-ID: Date: 6 Jun 91 07:50:10 GMT Article-I.D.: power.jmn.676194610 Sender: usenet@agate.berkeley.edu (USENET Administrator) Organization: University of California, Berkeley Lines: 46 I need some help getting \verbatimfiles to use a redefined verbatim environment. More specifically, someone recently sent me some LaTeX code to make the verbatim environment automatically add a continuation character to long lines and indent their continuation on the next line. This works fine on its own via: \begin{verbatim} --------------very long line here gets automatically wrapped----------------- \end{verbatim But the line wrapping doesn't happen when called via: \verbatimfiles{filename} I have tried modifying verbatimfiles.sty in quasi-random ways, to no avail. Can anyone offer advice? Here's the file which modifies the verbatim environment: %newverbatim.sty {\catcode`\^^M=13 % Redefine verbatim environment: \gdef\verbatim{\@verbatim \frenchspacing\@vobeyspaces \let\par=^^M\let^^M=\DoLongLines\count@=0 % New stuff \@xverbatim} } \def\CharsPerLine{60} \def\ContinuationChar{{\rm ---}} \def\DoLongLines{\afterassignment\DoOneChar\let\next= } \def\DoOneChar{% \ifx\next\end \else\ifx\next\DoLongLines\count@=0 \par \else \advance\count@ by 1 \ifnum\count@=\CharsPerLine \ContinuationChar \par\noindent{\ \ \ \ \ \ \ \ }\count@=9 \fi \next \let\next\DoLongLines \fi\fi \next} -- "There's a really fine line between clever and stupid" Nigel- Lead Guitar (Spinal Tap) jmn@united.berkeley.edu, or jmn@power.berkeley.edu