design/tpl/tpl.sty: Use autoref for theorem macros

master
Mike Gerwitz 2021-05-17 13:20:11 -04:00
parent fbe76a5616
commit 4ea2574a8c
1 changed files with 4 additions and 3 deletions

View File

@ -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}