From MacOSX-TeX@email.esm.psu.edu Fri Aug 19 20:00:31 2005
Return-path: 
Received: from mac.com (smtpin04-en2 [10.13.10.149])
 by ms83.mac.com (iPlanet Messaging Server 5.2 HotFix 2.06 (built Mar 28 2005))
 with ESMTP id <0ILH006JDUOVLW@ms83.mac.com>; Fri,
 19 Aug 2005 17:00:31 -0700 (PDT)
Received: from ENGRMAIL3.engr.psu.edu
 (engrexnode3.engr.psu.edu [130.203.201.220])
	by mac.com (Xserve/smtpin04/MantshX 4.0) with ESMTP id j7K00TWk004203; Fri,
 19 Aug 2005 17:00:29 -0700 (PDT)
Received: from engremail2.engr.psu.edu ([130.203.201.116])
 by ENGRMAIL3.engr.psu.edu with Microsoft SMTPSVC(5.0.2195.6713); Fri,
 19 Aug 2005 19:59:59 -0400
Received: from email.esm.psu.edu ([130.203.247.204]) by engremail2.engr.psu.edu
 with Microsoft SMTPSVC(5.0.2195.6713); Fri, 19 Aug 2005 19:59:51 -0400
Date: Fri, 19 Aug 2005 20:00:13 -0400
From: TeX on Mac OS X Mailing List 
Subject: MacOSX-TeX Digest #1469 - 08/19/05
Sender: MacOSX-TeX@email.esm.psu.edu
To: TeX on Mac OS X Mailing List 
Message-id: <26413.69078@email.esm.psu.edu>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: quoted-printable
Precedence: List
X-LR-SENT-TO: mail.engr.psu.edu
List-Subscribe: 
List-Digest: 
List-Unsubscribe: 
List-Software: LetterRip Pro 4.05 (0531) by LetterRip Software, LLC.
X-OriginalArrivalTime: 19 Aug 2005 23:59:51.0432 (UTC)
 FILETIME=[16736080:01C5A51A]

MacOSX-TeX Digest #1469 - Friday, August 19, 2005

  Fwd: [XeTeX] A bug in (Xe)LaTeX?
          by "Bruno Voisin" 

  Re: [OS X TeX] Two BibDesk/bibtex questions
          by "Peter Dyballa" 


----------------------------------------------------------------------

Subject: Fwd: [XeTeX] A bug in (Xe)LaTeX?
From: "Bruno Voisin" 
Date: Fri, 19 Aug 2005 12:38:06 +0200

Le 18 ao=FBt 05 =E0 23:46, Peter Dyballa a =E9crit :

> Am 18.08.2005 um 22:46 schrieb Bruno Voisin:
>
>> That probably won't help, but who knows?
>
> No! The \null in the right place makes things work! (I should =20
> remember this \null a few times before I die!!)

I have tried many things this morning, even ending up replacing as =20
many LaTeX commands as possible with their plain TeX equivalent, to =20
no avail. I don't think the \null thing is actually the solution: the =20=

problem lies in the font themselves.

If you comment out the code

> \voffset=3D-1truein \hoffset=3D-1truein
>      \ifpdf
>        \pdfpageheight=3D\latexitheight
>        \pdfpagewidth=3D\latexitwidth
>      \else
>        \special{papersize=3D\latexitheight,\latexitwidth}%
>      \fi

then set in the preamble

     \setlength{\fboxsep}{0pt}

and put the formula in an \fbox by replacing

>      \shipout\vbox{\scalebox{\latexitscalefactor}{\usebox=20
> {\latexitbox}}}

with

      \shipout\vbox{\fbox{\scalebox{\latexitscalefactor}{\usebox=20
{\latexitbox}}}}

then you'll realize that, for LaTeX, the formula box is actually =20
slightly smaller than its content:

[stripped attachment, the OS X TeX list won't accept it]

(see how the frame is superposed on the glyphs themselves).

To understand this, you have to think about how (La)TeX measures =20
boxes: by adding up dimensions specified in the metrics files for the =20=

fonts. I think the problem we see is just a manifestation of the way =20
the metrics of the Computer Modern fonts are set. For, if these fonts =20=

are replaced by the Lucida Bright/New Math fonts, then it seems the =20
problem disappears:

[stripped attachment, the OS X TeX list won't accept it]

(see how the frame lies exactly outside the glyphs).

Thus it seems there's no easy cure for the CM fonts, other than a =20
rule of thumb consisting in adding some empirically determined length =20=

to the box dimensions determined by (La)TeX. Has anybody had a look =20
at the source code for OOoLaTeXEquation, to see if the same problem =20
has been tackled, and how?

A couple more remarks on your code:

- To set the following right:

>       \immediate\write\foo{\the\latexitheight (Height)}
>       \immediate\write\foo{\the\latexitheight (TotalHeight)}

I think you should define a new length \latexittotalheight:

     \newlength{\latexittotalheight}

then replace

>     \addtolength{\latexitheight}{\latexitdepth}

with

     \setlength{\latexittotalheight}{\latexitheight}
     \addtolength{\latexittotalheight}{\latexitdepth}

and replace

>       \immediate\write\foo{\the\latexitheight (TotalHeight)}

with

     \immediate\write\foo{\the\latexittotalheight (TotalHeight)}

- In order to avoid an overfull hbox message, I think you should replace

>      \shipout\vbox{\scalebox{\latexitscalefactor}{\usebox=20
> {\latexitbox}}}

with

     \shipout\vbox{\makebox[0pt][l]{\scalebox{\latexitscalefactor}=20
{\usebox{\latexitbox}}}}

- The proposed code for dvips doesn't work:

>        \special{papersize=3D\latexitheight,\latexitwidth}%

in that (i) you must interchange width and height, (ii) you must =20
preface them with \the and (iii) it must occur inside the shipped out =20=

\vbox to be taken into account. All in all, I think you should =20
replace the code between \begin{document} and \end{document}:

>     \begin{document}
>     {\voffset=3D-1truein \hoffset=3D-1truein
>      \ifpdf
>        \pdfpageheight=3D\latexitheight
>        \pdfpagewidth=3D\latexitwidth
>      \else
>        \special{papersize=3D\latexitheight,\latexitwidth}%
>      \fi
>      \shipout\vbox{\scalebox{\latexitscalefactor}{\usebox=20
> {\latexitbox}}}%
>     }%
>     \end{document}

with

     \begin{document}
     \hoffset=3D-1in
     \voffset=3D-1in
     \ifpdf
       \pdfpageheight=3D\latexittotalheight
       \pdfpagewidth=3D\latexitwidth
       \shipout\vbox{%
         \makebox[0pt][l]{\scalebox{\latexitscalefactor}{\usebox=20
{\latexitbox}}}}
     \else
       \shipout\vbox{\special{papersize=3D\the\latexitwidth,\the=20
\latexittotalheight}%
         \makebox[0pt][l]{\scalebox{\latexitscalefactor}{\usebox=20
{\latexitbox}}}}
     \fi
     \end{document}

Hope this helps,

Bruno=

----------------------------------------------------------------------

Subject: Re: [OS X TeX] Two BibDesk/bibtex questions
From: "Peter Dyballa" 
Date: Fri, 19 Aug 2005 16:59:35 +0200


Am 18.08.2005 um 20:38 schrieb Fernando Pereira:

> To avoid breaking other things, eg. bib2html, the "~" has to be 
> escaped.

URLs can use %7E instead of ~ -- how would this 'escape code' do?

--
Greetings

   Pete

A common mistake that people make when trying to design something 
completely foolproof is to underestimate the ingenuity of complete 
fools.


----------------------------------------------------------------------
End of MacOSX-TeX Digest

--------------------- 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: