Is there a way to show/print the border of a paragraph to see what spacing it has before and after?
Asked
Active
Viewed 196 times
1 Answers
7
You could make use of the lua-visual-debug package maybe (which requires typesetting with LuaTeX obviously):
\documentclass{article}
\usepackage[latin]{babel}
\usepackage[skip=12pt, indent=30pt, parfill=50pt]{parskip}
\usepackage{lipsum}
\usepackage{lua-visual-debug}
\begin{document}
\lipsum[1-2]
\bigskip
\lipsum[2]
\end{document}
The tiny ticks to the left show where the box of the upper paragraph box ends and the lower starts (highlighted in red; sorry for the overly large pictures, but the ticks would not be visible otherwise).
This shows where the boxes of the first two paragraphs "meet":
This shows the \bigskip between the second and the third paragraph:
Jasper Habicht
- 48,848
-
1
-
@wolfrevo Sadly, I currently don't know about a XeTeX solution. Maybe you could do something using
tikzmarksor similar, so that you place anchors which you can later access ... – Jasper Habicht Apr 14 '23 at 08:29


\everyparone can easily detect the start of a paragraph, but not the end (unless you count the start of the next paragraph). For a specific paragraph, I would add\tikzmarks before and fter and draw a box with TikZ [remember picture, overlay]. Tikzpagenodes will give you the left and right edges. – John Kormylo Apr 13 '23 at 20:30