alternative setting of comments
![](https://secure.gravatar.com/avatar/a5d42c1ccacf33c72fd502fe1bb5ffa9.jpg?s=120&d=mm&r=g)
I was wondering if anyone who works with the verbatim environments has tried to set comments in a different style. It would be ideal to be able to set comments in \tf text font or some variant. I'm not really interested in colors at the moment. The immediate need is for working with a Pascal-like language, but I've been a bit baffled as to how to grab and process XML comments also (though I haven't look at that recently). Thanks in advance for any hints, adam -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay atl@comp.lancs.ac.uk Computing Dept, Lancaster University +44(0)1524/594.537 Lancaster, LA1 4YR, UK Fax:+44(0)1524/593.608 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
At 09:35 AM 3/21/2003 +0000, you wrote:
I was wondering if anyone who works with the verbatim environments has tried to set comments in a different style. It would be ideal to be able to set comments in \tf text font or some variant. I'm not really interested in colors at the moment.
The immediate need is for working with a Pascal-like language, but I've been a bit baffled as to how to grab and process XML comments also (though I haven't look at that recently).
\starttext \setuptyping[option=TEX] \starttyping test test %%\ N {\sl test} \stoptyping \stoptext So, %%\ triggers some kind of mode (see verb-ini.tex for details and examples) Another way is: \setuptyping[option=slanted] \starttyping test test <<test>> test \stoptyping There is yet another way but i just found out that it has a problem (seems that i never use it) Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
![](https://secure.gravatar.com/avatar/a5d42c1ccacf33c72fd502fe1bb5ffa9.jpg?s=120&d=mm&r=g)
Hans Hagen said this at Fri, 21 Mar 2003 11:56:35 +0100:
At 09:35 AM 3/21/2003 +0000, you wrote:
I was wondering if anyone who works with the verbatim environments has tried to set comments in a different style. It would be ideal to be able to set comments in \tf text font or some variant. I'm not really interested in colors at the moment.
\starttext
\setuptyping[option=TEX]
\starttyping test test %%\ N {\sl test} \stoptyping
\stoptext
So, %%\ triggers some kind of mode (see verb-ini.tex for details and examples)
Thanks, Hans, I was starting to look at that, and I thought that the mode that it triggered meant that all I had to do was \naturaltextexttrue (but I still don't understand your \newif mechanism really.) That turned out to be wrong. All I needed to do the initial bit of what I wanted was to do this: \setuptyping[text=yes,ccommand=\rm] ...which was a lot simpler than I expected from the manual ["icommand (for identifiers), vcommand (for variables) and ccommand parameters (for the rest)."] I *think* I've learned enough from core-ver, verb-ini, verb-pl, and verb- js that I think I can fake my own mode. The above may well be enough.
Another way is:
\setuptyping[option=slanted]
\starttyping test test <<test>> test \stoptyping
I looked at that earlier, and my problem was getting it to trigger in included \typefile's. Thanks, adam -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay atl@comp.lancs.ac.uk Computing Dept, Lancaster University +44(0)1524/594.537 Lancaster, LA1 4YR, UK Fax:+44(0)1524/593.608 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
participants (2)
-
Adam Lindsay
-
Hans Hagen