Subject: bug#19499: 11.88; preview-buffer with tikz and \newpage produces off by one image placement.

From: Arash Esbati <[email-masked]>
Date: Sun, 03 Mar 2024 15:50:33 +0100

Stephen Brennan <[email-masked]> writes:

> When tikz is included and preview-buffer is run, the first math preview
> after `\newpage' will have a blank preview image.  The subsequent image
> will display the preview for the previous math expression, and so on.
> For example, with this input file:
>
> --- BEGIN EXAMPLE FILE
> \documentclass{article}
> \usepackage{tikz}
> \begin{document}
> $x^1$
> \newpage
> $x^2$
> $x^3$
> \end{document}
> --- END EXAMPLE FILE
>
> The preview for $x^1$ displays properly.  The preview for $x^2$ displays
> a blank image, and the preview for $x^3$ displays an image of $x^2$.  If
> you comment out the `\usepackage{tikz}' or the `\newpage', the previews
> run correctly.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

This is what I get with a recent AUCTeX and Emacs: