I've found this as an example for getting coloured text:

    #lang scribble/base

    @(require scribble/core)

    @(define (colorize #:color c . content)
        (elem #:style (style #f (list (color-property c)))
              content))

    @colorize[#:color "red"]{WARNING}


But what if you want to call colorize from Racket code.
For example, to make a function has the colour red built in,
I tried

    @(define (redtext text) (colorize #:color "red" text))

which did not work.

Presumably the (summary text) has to accept text as a bunch of 
arguments, not just one.
 and the last argument to colorize needs to be 
understood accordingly.

By analogy to the definition of colorize I probably have to start with
somethng like
    @(define (summary . text) .... 
but then how to pass text to colorize as a bunch of arguments, not 
just one?


-- hendrik


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20190730170158.cng7swt3bq45hfvy%40topoi.pooq.com.

Reply via email to