Hi all,

I'm attaching a documentation patch concerning interaction between
preview and the LaTeX 'autonum' package.

I found that with 'autonum', display math written using \[...\] can
confuse preview's delimiter handling, leading to preview overlays that
extend too far.  The practical workaround is to use explicit display
math environments, such as 'equation' or 'equation*'.

The patch records this in the preview-latex known problems section.

Any thoughts?

Thanks, best,

Paul

>From cf54cb5de8cc2e56a3569ad45321eb9406419241 Mon Sep 17 00:00:00 2001
From: Paul Nelson <[email protected]>
Date: Sat, 6 Jun 2026 13:47:16 +0200
Subject: [PATCH] Record workaround for autonum previews

* doc/preview-problems.texi (autonum and display math shortcuts):
New section.
---
 doc/preview-problems.texi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/doc/preview-problems.texi b/doc/preview-problems.texi
index ab3fe799..a5143f15 100644
--- a/doc/preview-problems.texi
+++ b/doc/preview-problems.texi
@@ -10,6 +10,7 @@ newer versions of the problematic software or by simple patches.
 @menu
 * Font problems with Dvips::    
 * Too small bounding boxes::    
+* autonum and display math shortcuts::
 * x-symbol interoperation::     
 * Middle-clicks paste instead of toggling::  
 * No images are displayed with gs 9.27 and earlier::
@@ -79,6 +80,20 @@ which will tag the corners of the included @TeX{} box.  This will mostly
 be convenient for @emph{pure} PostScript stuff like that created by
 PSTricks, which Dvips would otherwise reserve no space for.
 
+@node autonum and display math shortcuts
+@section @code{autonum} and display math shortcuts
+@cindex @code{autonum} package
+@cindex display math shortcuts
+
+The @code{autonum} package redefines the @code{\[@dots{}\]} display math
+shortcut as a delimited macro.  This prevents @previewlatex{} from seeing
+the closing @code{\]} command.  As a result, the preview can extend past
+the displayed formula, sometimes to the end of the document.
+
+In documents using @code{autonum}, use an explicit
+@code{\begin@{equation@}} @dots{} @code{\end@{equation@}} environment
+instead of @code{\[@dots{}\]} for displayed formulas.
+
 @c FIXME: It seems that x-symbol is much outdated.
 @node x-symbol interoperation
 @section x-symbol interoperation
-- 
2.50.1 (Apple Git-155)

_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex

Reply via email to