Discussion:
{Spam?} CVS-1.239; Misalignment of footnote markers
Ralf Angeli
2005-03-14 16:11:07 UTC
Permalink
Using

\documentclass{article}
\begin{document}
Foo\footnote{Bar}
\end{document}

as an example file, the footnote markers are set flush bottom after
typing `C-c C-p C-d', as shown in the following screenshot:
David Kastrup
2005-03-14 16:31:49 UTC
Permalink
Post by Ralf Angeli
Using
\documentclass{article}
\begin{document}
Foo\footnote{Bar}
\end{document}
as an example file, the footnote markers are set flush bottom after
This only happens with `preview-image-type' set to 'dvipng. If set to
'png, the marker is raised correctly.
$ dvipng --version
This is dvipng 1.5 Copyright 2002-2005 Jan-Åke Larsson
Confirmed also with dvipng 1.1. After thinking about it and staring
at the image, I have come to the conclusion that dvipng, delivering a
graphic with a seemingly tight bounding box, can't be at fault here.
Must be within preview-latex. I'll try finding the culprit.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
David Kastrup
2005-03-14 16:55:50 UTC
Permalink
Post by David Kastrup
Post by Ralf Angeli
This only happens with `preview-image-type' set to 'dvipng. If set to
'png, the marker is raised correctly.
Confirmed also with dvipng 1.1. After thinking about it and staring
at the image, I have come to the conclusion that dvipng, delivering
a graphic with a seemingly tight bounding box, can't be at fault
here. Must be within preview-latex. I'll try finding the culprit.
Actually...

It is an incompatibility between the tightpage mode and dvipng. The
images are created in tightpage mode with the following in mind:

`:ascent ASCENT'
The `:ascent' property specifies the amount of the image's height
to use for its ascent--that is, the part above the baseline. The
value, ASCENT, must be a number in the range 0 to 100, or the
symbol `center'.

If ASCENT is a number, that percentage of the image's height is
used for its ascent.

If ASCENT is `center', the image is vertically centered around a
centerline which would be the vertical centerline of text drawn at
the position of the image, in the manner specified by the text
properties and overlays that apply to the image.

If this property is omitted, it defaults to 50.

Now the ascent of the superscript would be more than 100 if we really
had a tight bounding box. For this reason, the PostScript code
adjusts the bounding box to always include the baseline, and the same
calculation is done within preview.el.

But not in dvipng.

I propose to fix this in the following way: I'll change the code in
preview.sty to always include the baseline, but not within PostScript,
but rather within TeX. That means that dvipng would get a modified
tightpage \special that always includes the baseline. That way
previous versions of dvipng would work fine, but the cost would be
that the tightpage option would no longer produce a tight page around
things like superscripts. Since it never did so previously except
when using dvipng, I don't think people will tend to complain. And I
don't think that anybody except dvipng and preview-latex relies on
parsing the PostScript tightpage special itself.

Everybody ok with that?
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Jan-Ake Larsson
2005-03-15 07:43:57 UTC
Permalink
Post by David Kastrup
Now the ascent of the superscript would be more than 100 if we really
had a tight bounding box. For this reason, the PostScript code
adjusts the bounding box to always include the baseline, and the same
calculation is done within preview.el.
But not in dvipng.
Umm, sorry, but this I simply didn't know.
Post by David Kastrup
I propose to fix this in the following way: I'll change the code in
preview.sty to always include the baseline, but not within PostScript,
but rather within TeX. That means that dvipng would get a modified
tightpage \special that always includes the baseline. That way
previous versions of dvipng would work fine, but the cost would be
that the tightpage option would no longer produce a tight page around
things like superscripts. Since it never did so previously except
when using dvipng, I don't think people will tend to complain. And I
don't think that anybody except dvipng and preview-latex relies on
parsing the PostScript tightpage special itself.
Everybody ok with that?
Yep.
/JÅ
Jan-Ake Larsson
2005-03-15 08:00:14 UTC
Permalink
Post by David Kastrup
That means that dvipng would get a modified
tightpage \special that always includes the baseline.
Everybody ok with that?
Yep.
This of course means that to get things at the correct ascent (when the
baseline is outside the ink region), preview-latex needs the tightpage
option to be ON. I have tended to have it off.

But it is still OK to do it this way.
/JÅ

Loading...