For some intentional form given poems it might be of certain use, if a frame could be drawn around the text and lines. This is not similar to a simple box with rectangular form, but suits the form of the shape of the lines written.
Thank you for some hints, if available.
MWE:
\documentclass{report}
\begin{document}
\centering
This is\
an example \
how it can be\
and should\
appear.
\vspace*{\baselineskip}
Without \
the lines \
around it. Can you\
imagine the\
lines?
\end{document}
The lines around the text need to be imagined. Is there a way or package to draw the lines closely to the text borders. Not a rectangular box!
A first look into tikz package gave to following code possibility for a solution, but which seem not yet satisfying. Reason: The separation between the outer line and the inner text is not sufficient. I tried inner sep=5mm but without effect (not included at the code below).
\documentclass{report}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
\centering
\tikzmark{A} \qquad \tikzmark{N}\
\tikzmark{B} This is \tikzmark{M}\
\tikzmark{C} an example \tikzmark{L} \
\tikzmark{D} how it can be \tikzmark{K}\
\tikzmark{E} and should \tikzmark{J}\
\tikzmark{F} appear. \tikzmark{I}\
\tikzmark{G} \qquad \tikzmark{H}
\tikz[remember picture] \draw[overlay,thick,rounded corners=6pt] (pic cs:A) -- (pic cs:B) -- (pic cs:C) -- (pic cs:D) -- (pic cs:E) -- (pic cs:F) -- (pic cs:G) -- (pic cs:H) -- (pic cs:I) -- (pic cs:J) -- (pic cs:K) -- (pic cs:L) -- (pic cs:M) -- (pic cs:N) -- cycle;
\vspace*{\baselineskip}
\tikzmark{a} \qquad \tikzmark{n}\
\tikzmark{b} Without \tikzmark{m}\
\tikzmark{c} the lines \tikzmark{l}\
\tikzmark{d} around it. Can you \tikzmark{k}\
\tikzmark{e} imagine the \tikzmark{j}\
\tikzmark{f} lines? \tikzmark{i}\
\tikzmark{g} \qquad \tikzmark{h}
\tikz[remember picture] \draw[overlay,thick,rounded corners=6pt] (pic cs:a) -- (pic cs:b) -- (pic cs:c) -- (pic cs:d) -- (pic cs:e) -- (pic cs:f) -- (pic cs:g) -- (pic cs:h) -- (pic cs:i) -- (pic cs:j) -- (pic cs:k) -- (pic cs:l) -- (pic cs:m) -- (pic cs:n) -- cycle;
\end{document}



\tikzmarkat the start and end of each line (or assume symmetry) and connect them with smooth lines with tikz. – John Kormylo Dec 31 '23 at 04:40\usepackage{tikz} and \tikzmarklike you proposed, I get errors that\tikzmark is undefined control sequence– Thomkrates Dec 31 '23 at 11:42\tikzmarkis defined in packagetikzmarkand documented in the manual of that package. – cabohah Dec 31 '23 at 11:46inner sep=5mmbut did not get any effect of it. How can the separation between line and text be handled? – Thomkrates Dec 31 '23 at 15:44