[plt-dev] scribble styles

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Apr 7 12:50:15 EDT 2009

At Fri, 3 Apr 2009 12:16:31 -0400, Sam TH wrote:
> Right now, it's possible to customize the latex environment associated
> with tables, itemizations, and blockquotes.  But it's not possible to
> put arbitrary other scribble code inside a particular latex
> environment.  For example, I'd like to write something like this:
> 
> @make-paragraph[#:style "figure"]{
>   ... stuff goes here ...
> }
> 
> But this will produce
> 
> \figure{... stuff goes here ...}
> 
> which is not the desired result.

Use `blockquote' to install environments instead of macros. In
particular, a figure can have multiple paragraphs inside it, so
`blockquote' with style "figure" is really the right mapping.

The choice of mapping paragraphs styles to Latex macros and blockquotes
to environments may be arbitrary, but it seems to work well overall.
Meanwhile, `blockquote' is really a poor name for a block that contains
other blocks, but I never worked out the transition path to a better
name (which may be as simple as providing both the new and old names).

> It's even worse if you want 'verbatim', which can't be abstracted into
> a LaTeX macro.

Maybe I misunderstand, but trying to use "verbatim" as a style surely
has many other problems, since the Scribble-to-Latex layer will encode
plain text into Latex.



Posted on the dev mailing list.