Post by David KastrupPost by Ralf AngeliThis 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