From 4ea2574a8c88a78b9f9ef39bddd11e242f23fadb Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Mon, 17 May 2021 13:20:11 -0400 Subject: [PATCH] design/tpl/tpl.sty: Use autoref for theorem macros --- design/tpl/tpl.sty | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/design/tpl/tpl.sty b/design/tpl/tpl.sty index 664c84b6..2681809c 100644 --- a/design/tpl/tpl.sty +++ b/design/tpl/tpl.sty @@ -109,9 +109,10 @@ % commands. \newcommand\newtheoremwithlabel[3]{% \newtheorem{#1}{#2}[section] - \expandafter\newcommand\csname #3label\endcsname[1]{\label{#3:##1}} - \expandafter\newcommand\csname #3ref\endcsname[1]{#2~\ref{#3:##1}} - \expandafter\newcommand\csname #3pref\endcsname[1]{#2~\pref{#3:##1}} + \expandafter\def\csname #1autorefname\endcsname{#2} + \expandafter\newcommand\csname #3label\endcsname[1]{\label{#1:##1}} + \expandafter\newcommand\csname #3ref\endcsname[1]{\autoref{#1:##1}} + \expandafter\newcommand\csname #3pref\endcsname[1]{\autopref{#1:##1}} } \theoremstyle{definition}