I have a problem with the formatting of my document. I need a (multilined) verbatim to be labled just like an equation, so I could cross-reference it in the text. The verbatim text should be on the left and the number (like [chapternumber].[verbatimnumber]) on the right (just like an equation).
I have tried to create a new environment and creating a table with in the left column the verbatim text and in the right column the number, however I don't get this to work.
I have also looked for a different approach, like a multiline equation in verbatim style, however I couldn't find any.
edit:
I now have this
Code: Select all
\newcounter{ruleverb}\newenvironment{ruleverb}{\refstepcounter{ruleverb}\begin{tabular}{m{0.8\textwidth} r}}{ &Rule~\theruleverb %\end{tabular}}
Thank you in advance!