[Tex/LaTex] How to join paragraphs with a pilcrow \P

line-breakingparagraphssymbolstypography

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:

Best Answer

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}
Related Question