From cd18c13bf91b28244612feff88cb7718645d690b Mon Sep 17 00:00:00 2001 From: David Van Horn Date: Fri, 7 Dec 2012 01:31:16 -0500 Subject: [PATCH] Change latex render units from px (pdflatex specific) to bp (tex). The px unit is a pdflatex specific adjustable unit that is 1 bp (big point = 1/72in) by default. This commit changes the latex renderer to use bp which is a standard TeX unit equivalent to the default px value. This change allows .tex files generated by scribble to work with other latex engines such as xelatex. http://nwalsh.com/tex/texhelp/Plain.html#dimensions http://tex.stackexchange.com/questions/41370/what-are-the-possible-dimensions-sizes-units-latex-understands Here is a small test of using scribble and xelatex: $ cat try.scrbl @(require scriblib/figure redex/reduction-semantics redex/pict) @(define-language L) @(render-term L (term 1)) $ scribble --latex try.scrbl ; xelatex try original commit: 0dfcf634ed29a9d6e9d99ea7bcd02121abd24a7b --- collects/scribble/latex-render.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/scribble/latex-render.rkt b/collects/scribble/latex-render.rkt index 7873025d..03efbb2e 100644 --- a/collects/scribble/latex-render.rkt +++ b/collects/scribble/latex-render.rkt @@ -324,7 +324,7 @@ (- (ceiling height) height)))] [fn (install-file (format "pict~a" suffix) bstr)]) (if descent - (printf "\\raisebox{-~apx}{\\makebox[~apx][l]{\\includegraphics{~a}}}" + (printf "\\raisebox{-~abp}{\\makebox[~abp][l]{\\includegraphics{~a}}}" descent width fn)