GNU bug report logs - #58009
AUCTex and algorithm package

Previous Next

Package: auctex;

Reported by: Alejandro Garzon <agarzonleyton <at> gmail.com>

Date: Thu, 22 Sep 2022 17:17:01 UTC

Severity: normal

Tags: wontfix

Done: Arash Esbati <arash <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 58009 in the body.
You can then email your comments to 58009 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-auctex <at> gnu.org:
bug#58009; Package auctex. (Thu, 22 Sep 2022 17:17:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alejandro Garzon <agarzonleyton <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-auctex <at> gnu.org. (Thu, 22 Sep 2022 17:17:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alejandro Garzon <agarzonleyton <at> gmail.com>
To: bug-auctex <at> gnu.org
Subject: AUCTex and algorithm package
Date: Thu, 22 Sep 2022 11:05:47 -0500
[Message part 1 (text/plain, inline)]
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.
[Message part 2 (text/html, inline)]
[bug_log.txt (text/plain, attachment)]
[bug_report.tex (application/octet-stream, attachment)]

Information forwarded to bug-auctex <at> gnu.org:
bug#58009; Package auctex. (Tue, 04 Oct 2022 11:47:02 GMT) Full text and rfc822 format available.

Message #8 received at 58009 <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: Alejandro Garzon <agarzonleyton <at> gmail.com>
Cc: 58009 <at> debbugs.gnu.org
Subject: Re: bug#58009: AUCTex and algorithm package
Date: Tue, 04 Oct 2022 13:46:32 +0200
Hi Alejandro,

Alejandro Garzon <agarzonleyton <at> gmail.com> writes:

> 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.

Thanks for the report.  I remember we had reports about the float
package not being really compatible with Preview.  And I think this is
the issue since the algorithm package only loads float.sty and defines a
new environment.  Interestingly, I can run this small document through
Preview which generates some LaTeX errors but finally shows the snippets
in Emacs:

--8<---------------cut here---------------start------------->8---
\documentclass[twocolumn]{article}

\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{amsmath}
\usepackage{lipsum}

\newcommand{\tp}{\mathsf{T}}
\newcommand{\wt}[1]{\widetilde{#1}}

\begin{document}

\section{Model equations}

\lipsum[1-1]
\begin{align}\label{eq:puwtLu}
  \partial_tu&=\widetilde{L}u + F(u),
\end{align}

\lipsum[2-2]
\begin{align}
  \label{eq:nu1E}
  \mathbf{n}\cdot(\nabla u_1 - E)= 0,
\end{align}

\lipsum[3-3]
\begin{equation}
  \label{eq:nui}
  {\bf n}\cdot\nabla u_i= 0.
\end{equation}

\lipsum[4-4]
\begin{equation*}
  \int_0^T [E(t)]^2dt.
\end{equation*}

\lipsum[5-5]
\begin{algorithm}% [H]
  \algsetup{linenosize=\normalsize}
  \caption{Fast algorithm}
  \label{alg:adj}
  \begin{algorithmic}[1]
    \STATE $a \gets b$
    \STATE $b \gets c$
    \STATE $c \gets d$
  \end{algorithmic}
\end{algorithm}

\lipsum[5-5]
\begin{equation}
  \label{eq:calJi}
  \widetilde{\cal J}_i = \int_\Omega \left\|\nabla u_i\right\|_{t=T}^2\,d\Omega.
\end{equation}

\lipsum[5-5]
\begin{equation}
  \label{eq:L0}
  \widetilde{\cal L}_0=\frac{1}{2}\sum_{i=1}^n\gamma_i \widetilde{\cal J}_i
  +\frac{\alpha}{2}\int_0^T [E(t)]^2\,dt.
\end{equation}

\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
--8<---------------cut here---------------end--------------->8---

So I think the combination revtex4-2.cls and float.sty breaks with
Preview.

> 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, but I'm not sure if we will manage to fix this issue since the
principle author of Preview is inactive now.  So we will see.

Best, Arash




Information forwarded to bug-auctex <at> gnu.org:
bug#58009; Package auctex. (Fri, 08 Mar 2024 21:03:02 GMT) Full text and rfc822 format available.

Message #11 received at 58009 <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: Alejandro Garzon <agarzonleyton <at> gmail.com>
Cc: 58009 <at> debbugs.gnu.org
Subject: Re: bug#58009: AUCTex and algorithm package
Date: Fri, 08 Mar 2024 22:01:25 +0100
Arash Esbati <arash <at> gnu.org> writes:

> Hi Alejandro,
>
> Alejandro Garzon <agarzonleyton <at> gmail.com> writes:
>
>> 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.
>
> Thanks for the report.  I remember we had reports about the float
> package not being really compatible with Preview.  And I think this is
> the issue since the algorithm package only loads float.sty and defines a
> new environment.  Interestingly, I can run this small document through
> Preview which generates some LaTeX errors but finally shows the snippets
> in Emacs:
>
> \documentclass[twocolumn]{article}
>
> \usepackage{algorithm}
> \usepackage{algorithmic}
> \usepackage{amsmath}
> \usepackage{lipsum}
>
> \newcommand{\tp}{\mathsf{T}}
> \newcommand{\wt}[1]{\widetilde{#1}}
>
> \begin{document}
>
> \section{Model equations}
>
> \lipsum[1-1]
> \begin{align}\label{eq:puwtLu}
>   \partial_tu&=\widetilde{L}u + F(u),
> \end{align}
>
> \lipsum[2-2]
> \begin{align}
>   \label{eq:nu1E}
>   \mathbf{n}\cdot(\nabla u_1 - E)= 0,
> \end{align}
>
> \lipsum[3-3]
> \begin{equation}
>   \label{eq:nui}
>   {\bf n}\cdot\nabla u_i= 0.
> \end{equation}
>
> \lipsum[4-4]
> \begin{equation*}
>   \int_0^T [E(t)]^2dt.
> \end{equation*}
>
> \lipsum[5-5]
> \begin{algorithm}% [H]
>   \algsetup{linenosize=\normalsize}
>   \caption{Fast algorithm}
>   \label{alg:adj}
>   \begin{algorithmic}[1]
>     \STATE $a \gets b$
>     \STATE $b \gets c$
>     \STATE $c \gets d$
>   \end{algorithmic}
> \end{algorithm}
>
> \lipsum[5-5]
> \begin{equation}
>   \label{eq:calJi}
>   \widetilde{\cal J}_i = \int_\Omega \left\|\nabla u_i\right\|_{t=T}^2\,d\Omega.
> \end{equation}
>
> \lipsum[5-5]
> \begin{equation}
>   \label{eq:L0}
>   \widetilde{\cal L}_0=\frac{1}{2}\sum_{i=1}^n\gamma_i \widetilde{\cal J}_i
>   +\frac{\alpha}{2}\int_0^T [E(t)]^2\,dt.
> \end{equation}
>
> \end{document}
>
> %%% Local Variables:
> %%% mode: latex
> %%% TeX-master: t
> %%% End:
>
> So I think the combination revtex4-2.cls and float.sty breaks with
> Preview.
>
>> 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, but I'm not sure if we will manage to fix this issue since the
> principle author of Preview is inactive now.  So we will see.

I don't think we will be able to fix this issue since the principle
author of preview-latex is inactive.  Therefore I'm closing this report
as "wontfix".  We can reopen if things change.

Best, Arash




Added tag(s) wontfix. Request was from Arash Esbati <arash <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 08 Mar 2024 21:03:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 58009 <at> debbugs.gnu.org and Alejandro Garzon <agarzonleyton <at> gmail.com> Request was from Arash Esbati <arash <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 08 Mar 2024 21:03:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 06 Apr 2024 11:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 12 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.