[comp.text.tex] problem with an example enviroment

russell@ccu1.aukuni.ac.nz (Russell J Fulton;ccc032u) (05/08/91)

The following piece of code is from the LaTeXinfo package. The problem is
that if the enviroment starts at the beginning of a paragraph then the first
line of the output gets indented inspite of \parindent beig set to 0.

....  some text.

\begin{example}
the quick brown
fox jumps over
the lazy dog
\end{example}

produces:

.... some text.

   the quick brown
fox jumps over
the lazy dog

Here is the definition of example from latexinfo.sty:

\newenvironment{example}{\aboveenvbreak
	\hfuzz=12truept % Don't be fussy
	\sepspaces % Make spaces be word-separators rather than space tokens.
	\singlespace % Single space lines
	% The following causes blank lines not to be ignored
	% by adding a space to the end of each line.
	\let\par=\lisppar
	\parskip=0pt \advance \rightskip by \lispnarrowing 
	\advance \leftskip by \lispnarrowing
	\parindent=0pt
	\let\exdent=\internalexdent
	\obeyspaces \obeylines \tt \rawbackslash \bgroup\samepage
	\def\next##1{}\next}{\egroup\afterenvbreak}

Can anybody suggest how to fix this? 

It looks straight forward enough but the indent must be set before the
enviroment is entered. Verbatim does not have this problem but is
implemented rather differently. Rather beyond my ken.

Thanks, Russell.

-- 
Russell Fulton, Computer Center, University of Auckland, New Zealand.
<rj_fulton@aukuni.ac.nz>