[OS X TeX] LaTeXiT 1.4.0 released
Pierre Chatelier
pierre.chatelier at club-internet.fr
Mon Aug 15 06:22:51 EDT 2005
Hello,
> I think there is a bug in your code! (maybe more)
>
>
There may be bugs, but the code you point out is correct :-)
The awk script I use to compute the BBox works well. Not better than
yours, but it works.
Xelatex is the culprit for the bounding box problem.
Let's forget LaTeXiT and consider the following document: it
generates a tight pdf when processed with pdflatex. If you process it
with xelatex, you'll get a full page PDF document : no tight bbox.
> \documentclass[10pt]{article}
> \usepackage{color}\color[rgb]{0.000,0.000,0.000} %pour la couleur
> \usepackage{amssymb} %maths
> \usepackage{amsmath} %maths
> \usepackage[utf8]{inputenc} %utile pour taper directement les
> caractères accentués
>
> \pagestyle{empty}
> \usepackage{geometry}
> \usepackage{graphicx}
> \newsavebox{\latexitbox}
> \newcommand{\latexitscalefactor}{3.600000}
> \newlength{\latexitwidth}
> \newlength{\latexitheight}
> \newlength{\latexitdepth}
> \setlength{\topskip}{0pt}
> \setlength{\parindent}{0pt}
> \setlength{\abovedisplayskip}{0pt}
> \setlength{\belowdisplayskip}{0pt}
> \normalfont
> \begin{lrbox}{\latexitbox}
> $\displaystyle toto$
> \end{lrbox}
> \settowidth{\latexitwidth}{\scalebox{\latexitscalefactor}{\usebox
> {\latexitbox}}}
> \settoheight{\latexitheight}{\scalebox{\latexitscalefactor}{\usebox
> {\latexitbox}}}
> \settodepth{\latexitdepth}{\scalebox{\latexitscalefactor}{\usebox
> {\latexitbox}}}
> \newwrite\foo \immediate\openout\foo=\jobname.sizes \immediate\write
> \foo{\the\latexitdepth (Depth)}
> \immediate\write\foo{\the\latexitheight (Height)}
> \addtolength{\latexitheight}{\latexitdepth}
> \addtolength{\latexitheight}{0.720000 pt}
> \addtolength{\latexitheight}{0.000000 pt}
> \addtolength{\latexitwidth}{0.000000 pt}
> \immediate\write\foo{\the\latexitheight (TotalHeight)} \immediate
> \write\foo{\the\latexitwidth (Width)}
> \closeout\foo \geometry{paperwidth=\latexitwidth,paperheight=
> \latexitheight,margin=0pt,left=0.000000 pt,top=0.000000 pt}
> \begin{document}\scalebox{\latexitscalefactor}{\usebox{\latexitbox}}
> \end{document}
>
However, if I try to compute the BBox of this document with gs, it
seems that gs is smart enough to compute a good one. So, it seems
that there is a dysfunctionality in xelatex regarding the bbox that
it indicates when writing the pdf file.
Regards,
Pierre
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
More information about the MacOSX-TeX
mailing list