Sometimes as I write a manuscript in LaTeX for speaking, I want to format parts
of it as \obeylines and \obeyspaces permit, so that a single coherent thought
is expressed compactly on each line, and relationships between lines can be
expressed with leading indentation, like this:
One thought introduced with a coherent phrase,
followed by a subordinate phrase,
and a coordinate subordinate phrase.
Then a second thought introduced ...
The problem I run into is including the extra vertical spacing between groups
of contiguous lines ("paragraphs"), as before the last line above. The best
ad-hoc measure I have come up with so far is to define the pipe symbol, which
can be added to the end of each group, like this: ... coordinate subordinate
phrase.|
The redefinition code looks like this, which I have placed into an external package.
\catcode`|=\active
\def|{\smallskip}
This works more or less as desired, but the pipe characters throughout my source text are irritating, and obviously a work-around.
So I have been trying to define an environment that accomplishes what I want, without requiring the pipe character for the extra spacing. This is what I have so far...
\newenvironment{linewise}{%
\let\@oldpar=\par \let\par=\newpar \obeylines \let\par=\@oldpar}
{}
If I proceed in this direction, how should \newpar be defined? I have tried
using \\, but TeX balks when this is inserted automatically at the end of an
empty line (where \par is normally inserted), and it does not end the previous
paragraph (because the character is \active, I presume), which is what I'm trying to do.
As far as I can tell, the problem is that the division between paragraphs at two or more return characters takes place in TeX's mouth, where I can't make any adjustments that would distinguish between the vertical space I want to insert where there are two or more return characters, and the line break (or new paragraph) I want to insert when there is only one.
Or is there a better way to accomplish this?

\begin{verbatim}above the block and\end{verbatim}just after the block won't suffice? that does exactly what you describe, obeying both spaces and line endings, including those for blank lines. – barbara beeton Apr 05 '13 at 19:20