auctex-devel
[Top][All Lists]

## Re: [AUCTeX-devel] Manage auto insertion of labels

 From: Vladimir Lomov Subject: Re: [AUCTeX-devel] Manage auto insertion of labels Date: Tue, 12 Aug 2014 21:01:01 +0900 User-agent: Mutt/1.5.23 (2014-03-12)

```Hello,
** Mosè Giordano [2014-08-12 12:59:38 +0200]:

> 2014-08-12 12:42 GMT+02:00 Vladimir Lomov <address@hidden>:
>> Hello,
>> ** Tassilo Horn [2014-08-12 12:27:57 +0200]:

>>> Mosč Giordano <address@hidden> writes:

>>>>>   2. Wrt. 1, what if I want labels in a paragraph environment but not
>>>>>   for a \paragraph{} section?

>>>> I believe you can't define an environment with the same name of an
>>>> existing macro and vice versa, so there should never be a naming clash
>>>> :-)

>>> Oh, indeed!

>> Sectioning commands (standard ones) are expections. See attached
>> example. So, in general in LaTeX it is possible to define macros and
>> environments with the same name.

> Thanks for sharing this, I didn't know!  But this applies only to
> these sectioning commands, right?  An environment defined with
> `\newenvironment' does clash with an existing macro with the same
> name.

I'm not sure and wouldn't give definite answer right now. Some time ago
I investigated this interesting possibility (to have a macro and
environment with the same name, this is useful especial for HTML export,
because environments are like tags in HTML), but don't remember the
details. The only thing I wanted to say was the statement

> I believe you can't define an environment with the same name of an
> existing macro and vice versa, so there should never be a naming clash
> :-)

is wrong, standard LaTeX (and not only standard one) classes defines
some macros such that they have corresponding environment. See other two
attached examples.

> Anyway, I hope there won't be many people wanting to label `\section'
> but not the `section' environment ;-)

Yes, exactly. Of course there are macros (and corresponding
environments) that can have labels, but it would be nice to not restrict
youself to only macros or environments, both can have labels.

> Bye,
> Mosè

---

--
Four be the things I am wiser to know:
Idleness, sorrow, a friend, and a foe.

Four be the things I'd been better without:
Love, curiosity, freckles, and doubt.

Three be the things I shall never attain:
Envy, content, and sufficient champagne.

Three be the things I shall have till I die:
Laughter and hope and a sock in the eye.
-- Dorothy Parker, "Inventory" [or "Not so Deep as a Well"?]
```

ex2.ltx
Description: Text Data

ex3.ltx
Description: Text Data

reply via email to