auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] Embedded previews in high-DPI?


From: YAMAMOTO Mitsuharu
Subject: Re: [AUCTeX] Embedded previews in high-DPI?
Date: Tue, 17 May 2016 10:40:08 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Spencer Michaels <smichaels <at> g.hmc.edu> writes:

> I'm using AucTeX 11.89.1 + Emacs 24.5 + OSX 10.11.3 on a Retina
> Macbook, which has a high DPI display. When I generate previews
> to embed in the TeX document (C-c C-p C-s then C-c C-l), the
> preview images are rendered at 1/4th the resolution of the
> surrounding text (their size relative to it is, however,
> correct). I don't think this is a bug, exactly — it's probably
> because the parameters passed to Ghostscript take the number of
> points on the screen (essentially the simulated resolution) as
> the physical resolution. The way OSX generally handles this is
> to render images at a multiple of their normal size, usually
> 2x, then scales the images down to the right physical size. If
> I specify the right DPI of 227x227 using "preview-resolution,"
> images are twice as big as they should be but have the right
> overall number of pixels — can AucTeX render images at a
> particular DPI but scale them down in size before embedding
> them in the document? This would support high DPI on the Retina
> display, I think. I've looked through some of the source but am
> very new to ELisp, so I haven't found a way so far.

Recently I posted a Retina display support patch for
preview-latex to the emacs-devel list:

  http://lists.gnu.org/archive/html/emacs-devel/2016-04/msg00890.html

You need Emacs Mac port, which is also mentioned in the above
post.

It makes Ghostscript generate PDF files instead of PNG ones, and
let the Mac port render them using the `image-io' image type via
PDFKit.  So moving an Emacs frame between Retina and non-Retina
displays works gracefully (the Mac port re-renders PDF
automatically).  As a bonus, it enables us to use LCD smoothing.
So it is actually meaningful also on non-Retina displays.

                                     YAMAMOTO Mitsuharu
                                address@hidden


reply via email to

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