Thank you! That was pretty much what I was looking for! :D
The only sad thing is that my editor (TeXlipse) does not like the verbatim that is not 'really' within a verbatim environment (e.g., does not start and end with verbatim). So all following text is no longer correctly colored. But I guess I ...
Search found 4 matches
- Fri Jul 03, 2009 9:39 am
- Forum: Text Formatting
- Topic: Labeled verbatim
- Replies: 7
- Views: 5982
- Thu Jul 02, 2009 11:32 am
- Forum: Text Formatting
- Topic: Labeled verbatim
- Replies: 7
- Views: 5982
Labeled verbatim
Again, the code is this:
\newcounter{ruleverb}
\newenvironment{ruleverb}
{\refstepcounter{ruleverb}
\begin{tabular}{m{0.8\textwidth} r}}
{ &
Rule~\theruleverb %
\end{tabular}}
To be used like this:
\begin{ruleverb}
\label{rulex}
\begin{verbatim}
private string testToken;
private int ...
\newcounter{ruleverb}
\newenvironment{ruleverb}
{\refstepcounter{ruleverb}
\begin{tabular}{m{0.8\textwidth} r}}
{ &
Rule~\theruleverb %
\end{tabular}}
To be used like this:
\begin{ruleverb}
\label{rulex}
\begin{verbatim}
private string testToken;
private int ...
- Wed Jul 01, 2009 10:50 pm
- Forum: Text Formatting
- Topic: Labeled verbatim
- Replies: 7
- Views: 5982
Labeled verbatim
Thank you both for your reaction. I have had a look at that page frabjous pointed to, but it was not exactly I was looking for. I think I now have something I am pretty satisfied with. One more thing is in the example I gave, how do I let the rule number be preceded by the chapter number? The final ...
- Wed Jul 01, 2009 10:24 am
- Forum: Text Formatting
- Topic: Labeled verbatim
- Replies: 7
- Views: 5982
Labeled verbatim
Dear All,
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 ...
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 ...