[Top][All Lists]

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

Re: patch 1

From: Tassilo Horn
Subject: Re: patch 1
Date: Thu, 11 Jun 2020 09:10:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Uwe Brauer <> writes:

>    >> +(TeX-add-style-hook
>    >> + "algorithm"
>    >> + (lambda ()
>    >> +   (TeX-run-style-hooks "article")
>    > Why is that needed?
> I thought that should be in any style which is called via usepackage
> (when I used it, I did not write down, why), ok I remove it.

AFAICS, only the exam style does that.  It should only be needed if that
latex package is some extension of the article document class, i.e.,
using it brings in the article constructs, too.

>    >> +   (LaTeX-add-environments
>    >> +    '("algorithm"  LaTeX-env-algorithm ))
>    >> +   (TeX-add-symbols
>    >> +    '("listofalgorithms" 0))
>    >> +   (add-to-list 'LaTeX-label-alist '("algorithm" . 
> LaTeX-algorithm-label) t)
>    >                                                       
> ^^^^^^^^^^^^^^^^^^^^^
>    > That's not defined in the style...
> Good point.  I do labeling and references to labels by reftex, so I
> really don't care (I once wrote a style in which I used reftex, and
> somebody, maybe you or Arash shouted at me, so for the exam style,
> with the help of Arash, I put in auctex labeling and reference) So
> here is a question: should I add auctex referring and labeling, or
> spare me the hassle and wait for users to complain? ;-)

Well, let's do it just like amsthm.el does it.  Do nothing but document
how a user would have to customized `LaTeX-label-alist' or
`reftex-label-alist' in order to give an "alg:" prefix for algorithms.
See the docstring of `LaTeX-amsthm-env-label'.


reply via email to

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