Subject: bug#58009: AUCTex and algorithm package

From: Alejandro Garzon <[email-masked]>
Date: Thu, 22 Sep 2022 11:05:47 -0500

Hello,

I'm having a problem while generating equations (and float) previews for
the attached minimal working example, bug_report.tex. The problem seems to
be related to the package "algorithm". When the file is opened into a
buffer in Emacs, the AUCTeX menu becomes available. I try to generate the
previews from the menu, selecting Preview -> Generate previews - for
buffer. However, the generation of the previews stops at line 130 , where
the \begin{algorithm}[H] command is. A file with the error output,
bug_log.txt,  is attached. The generation of the previews completes
successfully when the lines 130 to 140, the full instance of use of the
algorithm environment, are commented out.

When the .tex file is "compiled" with PdfLatex no errors are issued. I'm
using A*UCTeX 13.1.4 and *TeXLive [pdfTeX 3.141592653-2.6-1.40.24 (TeX Live
2022)] on Windows 10.

A workaround for this problem, which I will try, is to use an alternative
to the package algorithm, like algorithm2e. However, I thought it would be
of interest for you to know about this problem and to warn the community of
AUCTeX users about it.

Thanks,
Alejandro Garzon.