| 1 |
\documentclass{article} |
| 2 |
|
| 3 |
\usepackage{amsmath,amsthm,amsfonts} |
| 4 |
\usepackage[colorlinks=true, linkcolor=blue]{hyperref} |
| 5 |
\usepackage{linkedthm} |
| 6 |
|
| 7 |
% Define base environment |
| 8 |
\newtheorem{theorem}{Theorem} |
| 9 |
|
| 10 |
% Declare linked version |
| 11 |
\DeclareLinkedTheorem{linkedtheorem}{theorem}{Theorem} |
| 12 |
|
| 13 |
\begin{document} |
| 14 |
|
| 15 |
\section*{linkedthm Example} |
| 16 |
|
| 17 |
This is a simple test of the \texttt{linkedthm} package. |
| 18 |
|
| 19 |
\begin{linkedtheorem}{thm:positivity} |
| 20 |
For any real number \( x \), we have \( x^2 \geq 0 \). |
| 21 |
\end{linkedtheorem} |
| 22 |
|
| 23 |
\begin{linkedproof}{thm:positivity} |
| 24 |
Squaring a real number always yields a non-negative result: |
| 25 |
\[ |
| 26 |
x^2 = x \cdot x \geq 0. |
| 27 |
\] |
| 28 |
\end{linkedproof} |
| 29 |
|
| 30 |
\end{document} |