3

Is there a way to show/print the border of a paragraph to see what spacing it has before and after?

wolfrevo
  • 513
  • You could wrap each paragraphs into \fbox{ } - es ... But a safer way is to pick a LaTeX reference (e.g.: https://en.wikibooks.org/wiki/LaTeX/Lengths) and print the interesting lengths, like \the\baslineskip, \the\parskip etc. You may also want to use package geometry, which can show you the page-geometry (see manula for options). – MS-SPO Apr 13 '23 at 12:53
  • Related: https://tex.stackexchange.com/q/2083/47927 – Jasper Habicht Apr 13 '23 at 13:48
  • Using \everypar one 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

1 Answers1

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":

enter image description here

This shows the \bigskip between the second and the third paragraph:

enter image description here