[racket] scribbling newbie questions

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Jan 31 16:14:19 EST 2013

At Thu, 31 Jan 2013 18:40:06 +0100, "Jos Koot" wrote:
> Q1
> @racket[(string-length ((fmt "I") #e1e100000))]
> is expanded to
> (string-length ((fmt "I") 1000....000))
> with 100000 zeros. How can I make scribble render #e1e100000 as #e1e100000?

You could use `code' instead of `racket':

  @code{(string-length ((fmt "I") #e1e100000))}

I think `code' is probably better than `racket' most of the time, but
they different strengths and weaknesses.

> Q3
> I try
> @tabular[#:sep @hspace[3] #:style 'top (list (list ....]
> in an attempt to have each element justified at top, but this does no show
> any effect. How can I outline like in:
>  
> item1   this is item-1
>         Not important.
>  
> item2   this is item-2
>         not important either.
>  
> item3   end
>         of this
>         question.

You need to make a style that has a `table-columns' property that has a
style with a 'top property for each column:

 (let ([top (style #f '(top))])
   (style #f (list (table-columns (list top top top)))))

Granted, that's complicated. The `tabular' form should provide simpler
support for constructing the right style.



Posted on the users mailing list.