At Mon, 26 Nov 2012 11:02:04 +0000, Tim Brown wrote:
> Hi all,
> 
> I'm trying to use scribble as a text preprocessor, and I need fine control
> over where my newlines are produced.
> 
> If (e.g.) I define a new constant in the document:
> 
> -------------------
> blah blah blah
> @(define f "woo")
> @f @f @f
> -------------------
> 
> I end up with a blank line (i.e. the newline from the end of the define
> line is transcribed:
> 
> -------------------
> blah blah blah
> 
> woo woo woo
> -------------------
> 
> The "m4" macro package has a command "dnl" which suppresses the newline
> at the end of a line that was written for the macro package's benefit.
> 
> Is there something similar in scribble?

When I try

 #lang scribble/text
 blah blah blah
 @(define f "woo")
 @f @f @f

I get

 blah blah blah
 woo woo woo

because space after a definition is ignored. So, I'm not sure I
understand the example.

But

 #lang scribble/text
 blah blah blah
 @(define f "woo")
 @(void)
 @f @f @f

produces

 blah blah blah
 
 woo woo woo

If I really wanted that `@(void)', in place, then I could add a `@;',
which is a line comment that consumes a newline:

 #lang scribble/text
 blah blah blah
 @(define f "woo")
 @(void)@;
 @f @f @f

which produces

 blah blah blah
 woo woo woo

____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to