Subject: bug#22525: 11.89.1; Preview appears at the wrong position in the document

From: Arash Esbati <[email-masked]>
Date: Mon, 04 Mar 2024 11:37:13 +0100

[email-masked] writes:

> With a document like the following, that contains a custom enumeration,
> the preview generated by preview-latex for the math that is within the
> [...] of the items, appears at the wrong position: After hitting C-c C-p
> C-b, the document looks as follows
>
>   \pcase[$\langtext{inc}$] h<begin embedded image>inc<end embedded
>   image>ello
>
> whereas of course I would expect
>
>   \pcase[<begin embedded image>inc<end embedded image>] hello

(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:

My additions were these 2 lines:

\usepackage[textmath,displaymath,footnotes,sections,floats]{preview}
\PreviewMacro*[?[{@{[]}}{}]{\pcase}

where \PreviewMacro* tell preview how to deal your \pcase macro.  I
think the result is what you have expected, therefore I'm closing this
report.

Best, Arash