Preview sizes.

Scott Kostyshak skostysh at lyx.org
Fri Nov 29 09:26:19 UTC 2024


On Thu, Nov 28, 2024 at 10:27:47AM +1300, Andrew Parsloe wrote:
> On 28/11/2024 1:16 am, Scott Kostyshak wrote:
> > On Wed, Nov 27, 2024 at 10:38:37PM +1300, Andrew Parsloe wrote:
> > > I have preview on for displaying equations. Sometimes when a document loads
> > > the previews display at the wrong size. The attachment shows the effect --
> > > the fourth display equation is one I edited, forcing a redrawing of the
> > > preview, which then displayed at the correct size. It is as if the original
> > > painting of the previews hasn't learned of the screen font display size, but
> > > by the time of the later editing it has. (Whether this has any relevance I
> > > don't know but the document in question has a number of legacy previews
> > > which form pdf-s in the Temp directory, rather than the usual png-s.)
> > Interesting, I don't think I've seen this issue. Can you post the .lyx
> > document so I can play around to see if I can trigger it on my side?
> > 
> > Scott
> 
> I've been able to simplify the document to fairly minimal (attached) and can
> now provide a recipe:
> 
> 1. Open LyX and the LyX temporary directory (with the list of lyx_tmpbuf0,
> ...)
> 
> 2. Load test.lyx in LyX
> 
> 3. A new lyx_tmpbuf<n> is formed; open it asap.
> 
> 4. If you are quick enough you should see shrunken previews, rather than at
> normal screen font size.
> 
> Opening the temp buffer seems to force or accelerate the generation of the
> previews before they have learnt of the screen font size. The numbering of
> the equations in test.lyx (or some other delaying process) seems to be
> necessary.  I use a Default zoom (and slider) of 168% (old eyes) and preview
> size of 1.0.
> 
> Andrew

Thanks, Andrew. Your diagnosis does make sense. I do not notice anything from the user perspective, but indeed I haven't checked the temp directory. I will try to experiment more. From your description, I see two potential bugs:

1. When the problem occurs, the previews are not updated to the correct size until you edit it, right? Or is it like the bad previews show for one second and then they are correctly updated?

2. Inocrrect previews are generated before they are corrected.

In my opinion, (1) is worse and potentially easier to fix than (2).

Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20241129/dab68fbe/attachment.sig>


More information about the lyx-devel mailing list