bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: math as image in Info INFO_MATH_IMAGES


From: pertusus
Subject: Re: math as image in Info INFO_MATH_IMAGES
Date: Wed, 8 Jan 2025 20:46:59 +0100

On Thu, Jan 02, 2025 at 12:57:43AM +0000, Gavin Smith wrote:
> If texi2any generates the images with a given DPI (dots per inch) setting
> to dvips (-d argument) (say 200), then it seems that all Emacs would need
> is a variable to specify the DPI of the Info images.  The image size
> would then be scaled according to the size of the font used to display
> the text in the Info buffer.  Suppose this is a nominal 10pt (10/72.27 in).

I think that we should also know/transmit the actual font size, as it
depends on how we call LaTeX.  Therefore, based on your explanation
below, my feeling is that the best information we could provide is the
"Dots per line", which would be:

  DPI * Font height (inches)

For example if there are 200 DPI because of -D and we did not specify
the size in the LaTeX preamble so it is 10pt, it would be

  DPI * (10/72.27)

Otherwise said, if we give the DPI information, I think that we should
also give the 10pt (10/72.27 in) information.
   

> If image DPI is set as Info-image-dpi, then
> 
> Image height (inches) = Image file size (pixels) /  Info-image-dpi
> 
> Then
> 
> Image height (lines) = Image height (inches) / (10/72.27)
> 
> Then the size of the image in pixels is given by the formula
> 
> Image display size (pixels) = Font height (pixels) * Image height (lines)
> 
> Overall,
> 
> Image display size (pixels)
>   = Font height (pixels)
>     * (Image file size (pixels) / Info-image-dpi) / (10/72.27)

With "Dots per line" DPL, the formula becomes

Image display size (pixels)
   = Font height (pixels)
     * (Image file size (pixels) / DPL)

> Users could set Info-image-dpi (or whatever it is called) to lower or
> higher values to zoom in and out on Info images.


What to do next?  Add information on DPI/font size/DPL to the image in
Info, contact Emacs persons who could discuss the issue/do the change?
(Through Eli, maybe?).

-- 
Pat



reply via email to

[Prev in Thread] Current Thread [Next in Thread]