ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* alternative setting of comments
@ 2003-03-21  9:35 Adam Lindsay
  2003-03-21 10:56 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Lindsay @ 2003-03-21  9:35 UTC (permalink / raw)


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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: alternative setting of comments
  2003-03-21  9:35 alternative setting of comments Adam Lindsay
@ 2003-03-21 10:56 ` Hans Hagen
  2003-03-21 16:42   ` Adam Lindsay
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2003-03-21 10:56 UTC (permalink / raw)


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
-------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: alternative setting of comments
  2003-03-21 10:56 ` Hans Hagen
@ 2003-03-21 16:42   ` Adam Lindsay
  0 siblings, 0 replies; 3+ messages in thread
From: Adam Lindsay @ 2003-03-21 16:42 UTC (permalink / raw)


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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-03-21 16:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-21  9:35 alternative setting of comments Adam Lindsay
2003-03-21 10:56 ` Hans Hagen
2003-03-21 16:42   ` Adam Lindsay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).