ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: "Semi-verbatim" - preserve whitespace - don't escape character
@ 2007-12-08 14:28 dexterclarke
  2007-12-09 11:27 ` Wolfgang Schuster
  0 siblings, 1 reply; 2+ messages in thread
From: dexterclarke @ 2007-12-08 14:28 UTC (permalink / raw)
  To: ntg-context

> Wolfgang Schuster wrote:
>
> \startlines
> verbatin text
> \stoplines

Thanks! That's almost perfect.

I've noticed that space is still inserted after punctuation characters
such as '.', ':' and '!'. Is it possible to disable this as well? I've
read a little about category codes but I'm not entirely sure if that's
what I should be using (perhaps ConTeXt provides a higher level macro
for it?).

__
dc
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: "Semi-verbatim" - preserve whitespace - don't escape character
  2007-12-08 14:28 "Semi-verbatim" - preserve whitespace - don't escape character dexterclarke
@ 2007-12-09 11:27 ` Wolfgang Schuster
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2007-12-09 11:27 UTC (permalink / raw)
  To: ntg-context

On Sat, 8 Dec 2007 09:28:02 -0500
dexterclarke@Safe-mail.net wrote:

> > Wolfgang Schuster wrote:
> >
> > \startlines
> > verbatin text
> > \stoplines
> 
> Thanks! That's almost perfect.
> 
> I've noticed that space is still inserted after punctuation characters
> such as '.', ':' and '!'. Is it possible to disable this as well? I've
> read a little about category codes but I'm not entirely sure if that's
> what I should be using (perhaps ConTeXt provides a higher level macro
> for it?).

This is possible and I give you a very simple and dirty version below
but can you explain why do you want this, I thought you want verbatim
output and spaces after punctuation marks are part of verbatim code.

\starttext

\startlines
\catcode`!=13
\catcode`:=13
\catcode`.=13
\def.{\char`.\ignorespaces}
\def:{\char`:\ignorespaces}
\def!{\char`!\ignorespaces}
text text, text. text: text! text text
text text, text! text. text: text text
text text, text: text! text. text text
text text, text. text: text! text text
\stoplines

\stoptext

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2007-12-09 11:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-08 14:28 "Semi-verbatim" - preserve whitespace - don't escape character dexterclarke
2007-12-09 11:27 ` Wolfgang Schuster

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