[plt-scheme] Re: Scribble: raw text

From: Laurent (laurent.orseau at gmail.com)
Date: Fri Mar 12 11:16:15 EST 2010

>
>
> How to write raw (untransformed) text on the output of scribble (#lang
> scribble/base) ?
> I *really* miss the LaTeX equations, so I'd like the $, \, ^, etc. to not
> be translated at the generation of the tex file.
> I suppose this bypass is exactly what should be avoided, but I'm greedy and
> I want the best of Scribble and LaTeX.
>
> The `literal' and `verbatim' functions don't solve the problem.
>

Found!

In scribble/latex-render.ss, line 257, I added the following line (DrScheme
4.2.4):
[(raw) (core-render e 'exact)]

Now in my scribble file (with #lang scribble/base), I defined:
@(define (math . text)
   (make-element
    'raw
    @list{$@|text|$}))

And now I can use:
@math{\lambda^2=\sum_i{5+i}}

(warning: math is already defined in scribble/manual, so in case of
requiring the latter, except-in must be used)
Now thanks to Scribble writing LaTeX reports will be a piece of cake.
Hopefully.

If anyone knows a way that does not involve modifying "core" files, please
let me know.

Laurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100312/89b40ba4/attachment.html>

Posted on the users mailing list.