From 32be99330cc744e7ccd3773f66a7a086cb1f6c2f Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 27 Mar 2011 16:09:38 -0600 Subject: [PATCH] adjust inline-PDF descent to account for rounding of the PDF bounding box original commit: a20a77508fe8bba052b15574b9601ef6a204f7f7 --- collects/scribble/latex-render.rkt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/collects/scribble/latex-render.rkt b/collects/scribble/latex-render.rkt index 1ea4e37e..64c07710 100644 --- a/collects/scribble/latex-render.rkt +++ b/collects/scribble/latex-render.rkt @@ -258,7 +258,9 @@ => (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)] + [height (list-ref (list-ref bstr+info+suffix 0) 2)] + [descent (+ (list-ref (list-ref bstr+info+suffix 0) 3) + (- (ceiling height) height))] [fn (install-file (format "pict~a" suffix) bstr)]) (if descent (printf "\\raisebox{-~apx}{\\includegraphics{~a}}" descent fn)