A 'when' expression returns the value of the last expression, in your case the 
content of the section. By lifting the when out, you get both pieces: 

#lang scribble/base

@(define some-condition #true)

@section{Section one}

Section one is for everyone.

@(when some-condition @section{Section two})
@(when some-condition
   "Section two is for some, but not all.")

This is clearly unsatisfactory but I am sure you can make this look decent with 
a bit of macrology 

-- Matthias







On Dec 16, 2014, at 9:08 PM, Daniel Prager wrote:

> Thanks Matthias
> 
> I should have been clearer: The conditional part works fine.
> 
> I am challenged to produce a valid element consisting of a section header 
> plus some other stuff. In my example, id some-condition is true, everything 
> compiles and runs, but the Section two heading doesn't appear.
> 
> Dan

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

Reply via email to