I am trying to create a new environment in my LaTeX document, where to fall back in the next paragraph after Wednesday.
I was told (the source of TeXbook and LaTeX) that by setting \everypar to {\setbox0\lastbox} , the TeX typesetter would do this at the beginning of the next paragraph and thus remove the indent:
\everypar{\setbox0\lastbox}
So this is what I am doing but not working (the following paragraph is still lagging):
\newenvironment{example} {\begin{list} {} {\setlength\leftmargin{2em}}} {\end{list}\everypar{\setbox0\lastbox}}
I studied the insides of LaTeX and was also able to handle it. It seems that the routine \end says at some point \endgroup and \par , which may be the reason that LaTeX is ignoring my \everypar parameter. \global doesn't help either. I know about \noindent , but I want to do this automatically.
An example of a document fragment:
This is paragraph text. This is paragraph text, too. \begin{example} \item This is the first item in the list. \item This is the second item in the list. \end{example} This is more paragraph text. I don't want this indented, please.
The internal routines and switch elements seem to \@endpetrue , \@endparenv and others. Thank you for your help.
source share