On Thu, Jan 02, 2025 at 12:51:53AM +0100, [email protected] wrote:
> On Tue, Dec 24, 2024 at 06:38:19PM +0000, Gavin Smith wrote:
> > On Tue, Dec 24, 2024 at 07:45:02PM +0200, Eli Zaretskii wrote:
> > > > From: Gavin Smith <[email protected]>
> > > > Date: Tue, 24 Dec 2024 17:21:36 +0000
> > > > 
> > > > We could ask Emacs users or developers if there is a way to make
> > > > the images be displayed smaller in Info mode.
> > > 
> > > Emacs can scale images.  See the node "Image Descriptors" in the ELisp
> > > Reference manual.
> > 
> > Thanks, this would have to be handled in Info mode, perhaps with a variable
> > to specify the scaling of images.
> 
> I see no easy way to do that for @math/@displaymath generated images
> only without adding some new formatting in Info, either in the image
> formatting or as an index table in a Tag table or something like that.

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).

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)

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



Reply via email to