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
This commit is contained in:
parent
e4d9880b02
commit
30733a2b80
|
@ -250,13 +250,18 @@
|
||||||
[(and (convertible? e)
|
[(and (convertible? e)
|
||||||
(not (disable-images))
|
(not (disable-images))
|
||||||
(let ([ftag (lambda (v suffix) (and v (list v suffix)))])
|
(let ([ftag (lambda (v suffix) (and v (list v suffix)))])
|
||||||
(or (ftag (convert e 'pdf-bytes) ".pdf")
|
(or (ftag (convert e 'pdf-bytes+bounds) ".pdf")
|
||||||
(ftag (convert e 'eps-bytes) ".ps")
|
(ftag (list (convert e 'pdf-bytes) #f #f #f #f) ".pdf")
|
||||||
(ftag (convert e 'png-bytes) ".png"))))
|
(ftag (list (convert e 'eps-bytes) #f #f #f #f) ".ps")
|
||||||
=> (lambda (bstr+suffix)
|
(ftag (list (convert e 'png-bytes) #f #f #f #f) ".png"))))
|
||||||
(let ([fn (install-file (format "pict~a" (cadr bstr+suffix))
|
=> (lambda (bstr+info+suffix)
|
||||||
(car bstr+suffix))])
|
(let* ([bstr (list-ref (list-ref bstr+info+suffix 0) 0)]
|
||||||
(printf "\\includegraphics{~a}" fn)))]
|
[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
|
[else
|
||||||
(parameterize ([rendering-tt (or tt? (rendering-tt))])
|
(parameterize ([rendering-tt (or tt? (rendering-tt))])
|
||||||
(super render-content e part ri))]))]
|
(super render-content e part ri))]))]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user