5
votes
1answer
150 views

Testing for a blank line (“paragraph”) immediately after \begin{document}

(With this question, I hope to resolve an edge case relevant for my quoting package.) Suppose I define a customized environment for displayed text. It resembles the standard LaTeX environment quote ...
15
votes
1answer
462 views

What exactly does \@doendpe do?

Quoting from the LaTeX2e sources: [\@endparenv, \@doendpe] To suppress the paragraph indentation in text immediately following a paragraph-making environment, \everypar is changed to remove ...
2
votes
1answer
283 views

Testing for multi-line paragraphs

I'm running into a situation where I need to insert some code (specifically, \hfill) only if my paragraph runs more than one line. This isn't a simple alignment thing, as I'm working with ...
10
votes
2answers
931 views

Test if a paragraph has a page break in it?

I'm trying to use TikZ to make fancier frames. I'm using the clever \tikzmark thing that Andrew Stacey wrote to put nodes at the top left and bottom right of the body of an environment. Then I use ...
3
votes
1answer
360 views

Count number of paragraphs in command argument

Is there a way to count the number of paragraphs in a command argument? I would like to make a command doing something like this: \newcounter{\numberofparagraphs} \newcommand{\testcmd}[1]{ ...