答え1
を使えばとても簡単ですtcolorbox
。
次回質問するときは、最小限の動作例 (MWE)。
\documentclass{book}
\usepackage[most]{tcolorbox}
\newtcolorbox{mybox}[1][]{%
enhanced,
opacityback=0,
frame hidden,% from https://tex.stackexchange.com/a/247509/101651
% from https://tex.stackexchange.com/a/431760/101651:
overlay unbroken and first ={%
\draw[thick] ([xshift=10pt]frame.north west) -| ([yshift=-10pt]frame.north west);
\draw[thick] ([xshift=10pt]frame.south west) -| ([yshift=10pt]frame.south west);
\draw[thick] ([xshift=-10pt]frame.north east) -| ([yshift=-10pt]frame.north east);
\draw[thick] ([xshift=-10pt]frame.south east) -| ([yshift=10pt]frame.south east);
}
}
\begin{document}
\begin{mybox}
Something:
\dotfill
\dotfill
\dotfill
\dotfill
\end{mybox}
\begin{mybox}
Something else:
\dotfill
\end{mybox}
\end{document}