[plt-scheme] Re: Scribble: raw text

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sun Mar 14 09:59:02 EDT 2010

On Sun, Mar 14, 2010 at 6:20 AM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> If you create a style with with 'exact-chars property, then the content
> of an element using the style will be rendered to Latex without escapes.
> (I've added the missing documentation for this property.)
>
> Here's an example:
>
>  #lang scribble/base
>  @(require scribble/core)
>
>  @(define (math . strs)
>    (make-element (make-style "hbox" '(exact-chars))
>                  (append '("$") strs '("$"))))
>
>  @math{\lambda^2=\sum_i{5+i}}
>
> The "hbox" in that example could be any suitable Latex command. For
> 'exact-chars to work, the style's name has to be some command.

Maybe \ensuremath{} is the right choice here?

Robby


Posted on the users mailing list.