# Background

There are many typographically distinct ways to separate paragraphs from one another, the most common being starting each paragraph on a new line with either an indent or additional vertical space. (Some use both, but this is redundant and generally frowned upon in typographic circles.) ¶ Another space-economical alternative is to use a special character - typically the pilcrow \P - to separate paragraphs. (Bringhurst in The Elements of Typographic Style has a nice discussion of the merits of this and other techniques.)

# Question

What is the best way to join paragraphs with a pilcrow "¶" (\P) in LaTeX?

# Discussion

The obvious solution is to manually insert pilcrows into the text rather than using newlines, however, this precludes quickly changing between various different format. One could use a custom macro which could be then be redefined to either \P or \par, but this still does not seem the best solution as it cannot be applied to sources that have been structured in the typical manner with blank lines (e.g. confounding the ever-so-useful lipsum package). ¶ A proper solution probably involves redefining \par: something like \def\par{ \P~}. This is fine for short regions of text that is properly grouped, but I suspect has many subtle difficulties when implemented throughout a document. The following minimal example demonstrates a few of the problems:

\documentclass{article}
\usepackage{lipsum}
\def\par{ \P~}
\begin{document}
\lipsum[1-5]

\let\par\endgraf
\begin{enumerate}
\item This is a list item.
\item And another.
\end{enumerate}

\def\par{ \P~}
\lipsum[6-11]
\def\par{\endgraf}
\end{document}

One must restore the original functioning \let\par\endgraf before lists and before the \end{document}. Even doing this manually will insert spurious pillcrows after the last paragraph before the lists and at the end of the document. (Pillcrows should only occur between joined paragraphs, not after paragraphs that are followed by a newline, section header, equation, etc.) What is the correction solution?

# Further Information

Frank Mittelbach explains exactly where TeX executes the paragraph builder. There are also some discussions about how to change \par in LaTeX (where \@setpar is mentioned) and how to avoid mucking up other uses of \par in environments, lists etc. Some other relevant discussions are:

-
A plicrow at the end of a line looks bad, so you probably want to tie your pilcrows to the following text. A pilcrow at the start of the line doesn't look that bad (to me), so tieing to the previous text probably isn't needed. –  Marc van Dongen Jan 20 '12 at 10:23
I can't understand that people keep bringing up Bringhurst's book as some sort of "authority". It's an eyesore, and the example discussed here is another eyesore. –  Michael Palmer Jan 20 '12 at 17:42
@MichaelPalmer It was not brought up here as an authority: it simply has a good discussion. I am not advocating that one blindly use the pilcrow, but there are places where this technique can be useful (it saves space) and look good (with attention to font, colour, etc.). I could not find a careful discussion about how to do this in LaTeX, so I asked. –  mforbes Jan 21 '12 at 1:27
@mforbes OK I take your point. However, joining paragraphs like this is still an eyesore. Space-scrounging techniques like this may have made sense in the middle ages when parchment was precious. Today, they just make stuff hard to read. If you are up against hard page limits, try harder to use fewer words, not to stuff more words into limited space. –  Michael Palmer Jan 21 '12 at 2:14
This is in many ways similar to the problem of in-line lists. Ideally one might have expected logical list markup to easily be styled as displayed or run-in lists, but for various reasons switching that style has always been rather more delicate than one would like. Having a run of paragraphs marked with pilcrow will be fragile for similar reasons, as youve noted. It's simple to have an environment that locally switches \par but any nested environment would need to switch it back) –  David Carlisle Jan 23 '12 at 14:56

Notwithstanding, that this is not the type of paragraph formatting that one would recommend for modern typesetting, the approach you can take is what you suggested; that is to manually insert pilcrows into the text rather than using newlines.

As you seem to require the quick changing between various different formats, I would suggest you create a macro to switch on-off the effects of the Pilcrow macro:

\let\cacheP\P
\def\Poff{\def\P{\leavevmode\par}}
\def\Pon{\let\P\cacheP}

In the mark-up, you can use \Pon and \Poff, as required. Here is the MWE:

\documentclass{article}
\usepackage{lipsum}
\let\cacheP\P
\def\Poff{\def\P{\leavevmode\par}}
\def\Pon{\let\P\cacheP}
\begin{document}
This is a short paragraph. \P This is another and this is another.
\P And another.

And this is a normal one.\lipsum*[1]

This is how you negate the effect.

\Poff
This is a short paragraph.
\P This is another and this is another.
\P and another.

\Pon

This is a short paragraph.
\P This is another and this is another.
\P and another.
\end{document}
-
Thanks Yiannis. If one knew before hand that they wanted pilcrows then this would be the way to do it (as I mentioned in my question). I was hoping for a way of catching and customizing paragraph separation with documents formatted in the usual way. However, it looks like this is fraught with difficulties (esp. due to the environments) so I might ultimately have to accept your answer, but I will wait a bit to see if anyone else has a clever complete solution. –  mforbes Feb 15 '12 at 23:19
@mforbes Thanks for the comment. If you mix and match like you mentioned in your question, you will have great difficulty in finding a way without marking the paragraphs. –  Yiannis Lazarides Feb 16 '12 at 2:13