(1) Using the thm-autoref package, which is part of the thmtools package, still gives me a bunch of errors.
Code: Select all
\documentclass{article}
\usepackage{amsmath, amsthm}
\usepackage{thm-autoref}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\usepackage{hyperref}
\begin{document}
\begin{theorem}[My Theorem]\label{thm:mytheorem}
This is my theorem.
\end{theorem}
\begin{lemma}[My Lemma]\label{thm:mylemma}
This is my lemma.
\end{lemma}
My Theorem is autoreferenced by \autoref{thm:mytheorem}, and My Lemma by \autoref{thm:mylemma}.
\end{document}
Code: Select all
\documentclass{article}
\usepackage{amsmath, amsthm}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\usepackage{hyperref}
\usepackage{cleveref}
\begin{document}
\begin{theorem}[My Theorem]\label{thm:mytheorem}
This is my theorem.
\end{theorem}
\begin{lemma}[My Lemma]\label{thm:mylemma}
This is my lemma.
\end{lemma}
My Theorem is autoreferenced by \cref{thm:mytheorem}, and My Lemma by \cref{thm:mylemma}.
\end{document}
Cheers.