One can modify this solution to a related question as follows:
Test the verbatim.
Here is some more.
\hrule on its own will produce a line of length
\textwidth, however, it only adds a minimal amount of vertical space. This is the reason for putting in the
\vskip's. You may well want to adjust the size of these spaces (or use
\smallbreak, etc.) and you may also want to add some negative
\vskip amount just after the first rule and just before the last. E.g. the following gives spacing closer to that obtained from
If you need the rules to be of different thickness you can write something like
\hrule height 2pt instead.