Directly reference `definition`, `theorem`, and `lemma` when using `latex` blockquote styles.
# Enhance Theorem/Definition/Lemma Referencing
## Current Situation
Blockquote styles for `definition`, `theorem`, and `lemma`:
```
<blockquote class="[definition/theorem/lemma]">
...content
</blockquote>
```
<img width="1055" alt="image" src="https://github.com/user-attachments/assets/57d3f341-72b6-4660-8714-72b214269917">
To reference, users add `id`:
```
<blockquote class="[definition/theorem/lemma]" id="[unique_id]">
...content
</blockquote>
```
Reference using `$\ref{[unique_id]}$` or `$\eqref{[unique_id]}$`, which only shows the number.
## Goal
Mimic LaTeX's [Theorems and proofs](https://www.overleaf.com/learn/latex/Theorems_and_proofs) referencing style.
## Desired Outcome
LaTeX-like syntax:
```
\begin{theorem}[Pythagorean theorem]
\label{pythagorean}
This is a theorem about right triangles and can be summarised as:
\[ x^2 + y^2 = z^2 \]
\end{theorem}
```
Referencing:
```
And a consequence of theorem \ref{pythagorean} is the statement in the next corollary.
```
Result:
<img width="1066" alt="image" src="https://github.com/user-attachments/assets/256b665a-8f66-4f28-b51b-2917ad71c0f2">
0 条评论