Hi,
I have seen this a few times:
\begin{theorem\label{mylabel}}
$2+2=4$.
\end{theorem}
and it does work.
Is it OK to do this? I mean, is this behavior official/will be always supported? Looks kinda weird to me to put a label inside of \begin{something}.
General ⇒ \label placement
NEW: TikZ book now 40% off at Amazon.com for a short time.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
\label placement
This is not a reliable method of placing labels. For some structures it works, but in the most cases not. In this case you better place the label right behind the beginning of the environment.
Best regards
Thorsten
Code: Select all
\begin{theorem}\label{thm:label}
% theorem contents
\end{theorem}
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10