Thank for you answer, but it doesn't work either.

To recapitulate:
1. I have a LyX document using the "algorithm2e" module.
2. Each time, I add new algorithm float in my document, it's label is an
increasing number (1 for the first algorithm, 2 for the second, etc.).
3. I want that this label includes first a "A": so the first algorithm
should be label "A1", the second "A2", etc.

I have try to add the following LaTeX in the document preamble:
        \renewcommand{\thealgorithm}{A\arabic{algorithm}}
        \renewcommand{\thelyxalgorithm}{A\arabic{algorithm}}.
Both time, LyX says the corresponding label is unknown ("thealgorithm"
in the first case, and "thelyxalgorithm" in the second case).

Is it possible that the "algorithm2e" package introduces a new command
for the labeling?

Thanks.

Le 21/09/18 à 09:45, Steve Hnizdur a écrit :
> 
> 
> On 20/09/18 22:12, Paul A. Rubin wrote:
>> On 09/20/2018 10:14 AM, Pascal Francq (Mailing lists) wrote:
>>> Hi,
>>> I try to change the change the numbering schema of algorithms in the
>>> form 'A1', 'A2', etc.
>>> So I add the following command in the preamble of the document:
>>>     \renewcommand{\thealgorithm}{A\arabic{algorithm}}
>>> But LyX says it "thealgorithm" is undefined.
>>> Any one an idea?
>>> Thanks in advance.
>> Can you post a minimal example showing the current version of what you
>> are trying to change, and then indicate in it somewhere "I want to
>> change this piece here to A1" or whatever?
>>
>> Paul
>>
> 
> Hi
> 
> Have a look in the "Code preview Pane" at the Preamble for a command
> that looks like
> 
> \newtheorem{thm}{\protect\theoremname}
> 
> or
> 
> \newtheorem{lyxalgorithm}{\protect\algorithmname}
> 
> (the one you have will depend on the modules you have loaded in Document
> Settings)
> 
> In the first case you need to do
> 
> \renewcommand{\thethm}{A\arabic{algorithm}}
> 
> and the in the second
> 
> \renewcommand{\thelyxalgorithm}{A\arabic{algorithm}}.
> 
> Note in the first case many other environments will be affected since
> they also use the "thm" counter eg Theorem, etc.
> 
> Hope that helps


-- 
Dr. Pascal Francq
Belgium

Reply via email to