I have made a environment
that formats some example text in a box that sets it apart from the main text of the book. It becomes a sort of a figure that the other text refers to. There is plenty of white space around it. Because of the white space, there is no need for the paragraph that follows it to be indented. Is there a command that I can place inside this environment definition that suppresses the indent on the following paragraph, and only the following paragraph.
Here is the definition of the environment:
\newenvironment{urlstyle}
{\begin{center}
\begin{tabular}{|p{0.9\textwidth}|}
\hline\\
\ttfamily
}
{
\\\\\hline
\end{tabular}
\end{center}
}
And the body of the document might use this like this:
Sample text of a paragraph before the URL is mentioned in the code.
\begin{urlstyle}
/api/t=\{tenant\}/a=\{app\}/
\end{urlstyle}
Here is a description of what this URL does. Because of the
space around the URL in a box, I do not want this paragraph
to be indented.
But this later paragraph should be indented because it follows directly
after the preceding one, without a blank line and that needs
an indent.
I can, of course, put \noindent
into the paragraph that follows, but I would prefer to have this be built into the environment command so that I can guarantee that it is consistent throughout the book without requiring tedious checking of every time I use the URL environment. I tried putting \noindent
at the end of the environment defintion, but that does not work, because it can not effect the following paragraph. You have to put \noindent
inside the paragraph you want to effect.
Headings and subheadings work great this way. Somehow, they suppress the indent on the following paragraph (the first paragraph in the section). Is there any command that says: I want the paragraph that follows this one to be treated like the first paragraph in a block of paragraphs?
center
go to some lengths to preserve the meaning of teh blank line, if there is a blank line before or after center teh following paragraph is indented, if there is no blank line it is treated as a continuation and not indented, matching the behaviour of display math. It would be best to preserve this behaviour. But if not use the internal command\@afterheading
which is what section headings use