Hello,
** Mosè Giordano [2014-08-12 12:59:38 +0200]:
> Hi Vladimir,
> 2014-08-12 12:42 GMT+02:00 Vladimir Lomov <[email protected]>:
>> Hello,
>> ** Tassilo Horn [2014-08-12 12:27:57 +0200]:
>>> Mosč Giordano <[email protected]> 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è
---
WBR, Vladimir Lomov
--
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"?]
\documentclass{article}
\begin{document}
\section{First numbered section}
Hello, World!
This is \textbf{extremly} interesting.
\begin{section}{Second numbered section}
And again, hello, World!
\begin{bfseries}
This whole paragraph will be typeset in bold.
\end{bfseries}
{\bfseries As well as this one.\par}
\end{section}
\end{document}
\documentclass{scrartcl}
\begin{document}
\section{First numbered section}
Hello, World!
This is \textbf{extremly} interesting.
\begin{section}{Second numbered section}
And again, hello, World!
\begin{bfseries}
This whole paragraph will be typeset in bold.
\end{bfseries}
{\bfseries As well as this one.\par}
\end{section}
\end{document}
_______________________________________________
auctex-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-devel