bkyk8rc3zvpnsf5inmcqq4n3k98cv6hj-my-site-hyper-literate-git.test.suzanne.soy-0.0.1

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 30733a2b8097e7df764b1a8dbb84e82753f70dc0
parent e4d9880b02e194e314baae39529e03ffdb7361bf
Author: Robby Findler <robby@racket-lang.org>
Date:   Mon, 14 Mar 2011 09:48:20 -0500

added pdf-bytes+bounds to the docs for file/convertible and then used it
to make scribble render inline picts with a nearly good looking baseline

original commit: 615bc86668f237635b9e5b10c94f63ef41d0544b

Diffstat:
Mcollects/scribble/latex-render.rkt | 19++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/collects/scribble/latex-render.rkt b/collects/scribble/latex-render.rkt @@ -250,13 +250,18 @@ [(and (convertible? e) (not (disable-images)) (let ([ftag (lambda (v suffix) (and v (list v suffix)))]) - (or (ftag (convert e 'pdf-bytes) ".pdf") - (ftag (convert e 'eps-bytes) ".ps") - (ftag (convert e 'png-bytes) ".png")))) - => (lambda (bstr+suffix) - (let ([fn (install-file (format "pict~a" (cadr bstr+suffix)) - (car bstr+suffix))]) - (printf "\\includegraphics{~a}" fn)))] + (or (ftag (convert e 'pdf-bytes+bounds) ".pdf") + (ftag (list (convert e 'pdf-bytes) #f #f #f #f) ".pdf") + (ftag (list (convert e 'eps-bytes) #f #f #f #f) ".ps") + (ftag (list (convert e 'png-bytes) #f #f #f #f) ".png")))) + => (lambda (bstr+info+suffix) + (let* ([bstr (list-ref (list-ref bstr+info+suffix 0) 0)] + [suffix (list-ref bstr+info+suffix 1)] + [descent (list-ref (list-ref bstr+info+suffix 0) 3)] + [fn (install-file (format "pict~a" suffix) bstr)]) + (if descent + (printf "\\raisebox{-~apx}{\\includegraphics{~a}}" descent fn) + (printf "\\includegraphics{~a}" fn))))] [else (parameterize ([rendering-tt (or tt? (rendering-tt))]) (super render-content e part ri))]))]