Jan-Åke Larsson wrote:
> Jan-Åke Larsson wrote:
>> Angus Leeming wrote:
>> > I use it within LyX to calculate the 'ascent fraction' of the
>> > snippet. (A snippet whose base line was in the middle of the image
>> > would have an ascent fraction of 0.5.) The code that does this inside
>> > LyX is (stripped down):
>> > 
>> <snip>
>> > 
>> > This information is used to position the image on the LyX screen.
>> > 
>> > Since both dvipng and dvips,gs,pnmcrop use the same dvi file, it
>> > seems to make sense to use the same mechanism. However, if you have
>> > another mechanism to obtain this info within dvipng, then please do
>> > tell me.
>> 
>> I see. There are two possibilities:
>> 
>> 1) Make dvipng detect usage of the 'tightpage' option and use the
>>    image metrics within the DVI.
>> 
>> 2) Output the position of the baseline of the first character output
>>    in each image, in pixels or possibly as a fraction
> 
> Actually, it is better than that. I had a look at this last night (and
> just checked it in).

Jan-Åke, many thanks for this and apologies for the delay in replying. 
Trying it out is in my Pending tray ;-)
Angus


Reply via email to