Discussion:
[racket] Smaller verbatim in Scribble PDF?
Joe Gibbs Politz
2015-02-22 03:31:58 UTC
Permalink
Hi, I'm trying to do something that I think should be simple, and
can't figure out a good way to do it.

I want to get verbatim output (for code examples) in Scribbled PDF to
be _smaller_ than the default. (nested #:style 'smaller ...) has no
effect, and various other hacky things I've tried like mapping
(smaller (tt ...)) and linebreaks lead to pretty weird output that has
trouble tracking indentation, etc.

Whenever I need to do this in HTML I just create a custom pre-style,
but that won't work here, obviously.

I must be overlooking some simple way to get it done, maybe I just
need a pointer to an example?

Thanks!
____________________
Racket Users list:
http://lists.racket-lang.org/users
Matthew Flatt
2015-02-22 03:58:56 UTC
Permalink
For PDF output, you can use the string "smaller" instead of the symbol
'smaller:

(nested #:style "smaller" ...)

That works because "smaller" happens to be available as an environment
in Latex.

(If "smaller" didn't happen to be available already, you could define a
Latex environment in much the same way that you might add CSS for HTML
output.)
Post by Joe Gibbs Politz
Hi, I'm trying to do something that I think should be simple, and
can't figure out a good way to do it.
I want to get verbatim output (for code examples) in Scribbled PDF to
be _smaller_ than the default. (nested #:style 'smaller ...) has no
effect, and various other hacky things I've tried like mapping
(smaller (tt ...)) and linebreaks lead to pretty weird output that has
trouble tracking indentation, etc.
Whenever I need to do this in HTML I just create a custom pre-style,
but that won't work here, obviously.
I must be overlooking some simple way to get it done, maybe I just
need a pointer to an example?
Thanks!
____________________
http://lists.racket-lang.org/users
____________________
Racket Users list:
http://lists.racket-lang.org/users
Joe Gibbs Politz
2015-02-22 04:02:40 UTC
Permalink
Post by Matthew Flatt
For PDF output, you can use the string "smaller" instead of the symbol
(nested #:style "smaller" ...)
Cute. That seems like it'll do the trick. Thanks!
____________________
Racket Users list:
http://lists.racket-lang.org/users

Loading...