I am using the common approach of having indentations for new paragraphs and no indentation directly after a headline. I have an environment for 'information boxes' defined like this:
\newenvironment{sectionbox}[2][]{\begin{shaded}\refstepcounter{sectionbox}\par\medski\noindent% \textbf{Box~\thesectionbox #1: #2 \vspace{0.1cm} \hrule \vspace{0.1cm}}\rmfamily} {\medskip \end{shaded}} The problem is that I don't want indentation at the beginning of these boxes -- they have a headline and hence they shouldn't have an indentation...
I have tried with \noindent but that isn't the right way since it only works when placed directly before the text which is to not be indented and the user of the environment might start with an empty line...
Google brought me to this page but their suggestion "\@afterindentfalse" is apparantly not something I can use since I am in the wrong mode as LaTeX pointed out to me: You can't use `\spacefactor' in internal vertical mode.
So, what can I use (that fixes this)?