> I wasn't able to get it to work.  I have dvisvgm installed.  I tried
> with the standard config, with dvipng, etc.  preview-point-buf-change is
> called, but no buffer frames appear.  When I get the chance, I'll try
> starting from a naked config and see if it works then.

Hmmm.. I am not sure what could be the reason. Just to confirm, you have to have
`preview-image-type` be 'point-dvisvgm (or 'point-dvipng) not 'dvipng.

> My interest in this as an alternative to the usual preview approach is
> that when I edit beamer documents, I sometimes want to see whole frame
> environments (rather than individual formulas) previewed as a unit.
> It'll be nice if the package is flexible enough to allow that option.

The package uses preview, so anything that can be previewed there can be shown 
in a frame.
I think making beamer frames preview-able should be doable by calling (untested)

\PreviewEnvironmentMacro[{[]}]{frame}

after the preview package is loaded or by modifying `preview-default-preamble` 
or `preview-LaTeX-command` to include this call.

However, this would cause the frame to be previewed as a while and prevent 
previewing
environments inside it.

> I haven't encountered this issue myself, but a couple people have told
> me that they experience display errors when using
> preview-leave-open-previews-visible with files in certain shared
> folders, so it might be worth thinking through if the issue you raise
> here could be related to that.

Difficult to say for me. It was very difficult to debug this code when I saw 
those errors. I think improving the handling of files (to avoid display errors 
and file orphaning) would be welcome.

On 27/08/2025, Uwe Brauer wrote:
> I see, but if I add a new formula, I have to run preview-at-point again, 
> right?
Not if you have the hook in 'after-change-functions to call 
'preview-point-buf-change
which is what this piece of configuration is doing (requires re-opening the tex 
file)

(add-hook 'LaTeX-mode-hook
          (lambda () (add-hook 'after-change-functions
                               #'preview-point-buf-change nil t)))

'preview-point-buf-change automatically calls `preview-at-point` if there's a 
preview already at point, or if (by default) the point is inside a math 
environment.

Best regards,
-- Al


Reply via email to