[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#58009: AUCTex and algorithm package

From: Arash Esbati
Subject: bug#58009: AUCTex and algorithm package
Date: Tue, 04 Oct 2022 13:46:32 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50

Hi Alejandro,

Alejandro Garzon <agarzonleyton@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---




\section{Model equations}

  \partial_tu&=\widetilde{L}u + F(u),

  \mathbf{n}\cdot(\nabla u_1 - E)= 0,

  {\bf n}\cdot\nabla u_i= 0.

  \int_0^T [E(t)]^2dt.

\begin{algorithm}% [H]
  \caption{Fast algorithm}
    \STATE $a \gets b$
    \STATE $b \gets c$
    \STATE $c \gets d$

  \widetilde{\cal J}_i = \int_\Omega \left\|\nabla u_i\right\|_{t=T}^2\,d\Omega.

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


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

> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]