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.

Full log


View this message in rfc822 format

From: Arash Esbati <arash <at> gnu.org>
To: Alejandro Garzon <agarzonleyton <at> gmail.com>
Cc: 58009 <at> debbugs.gnu.org
Subject: 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




This bug report was last modified 1 year and 132 days ago.

Previous Next


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