Math & Sciencehyperref | '\autoref' for New Theorem

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
arobase
Posts: 33
Joined: Sat Apr 14, 2012 7:46 pm

hyperref | '\autoref' for New Theorem

Post by arobase »

I would like to modify the example below

Code: Select all

\documentclass{memoir}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{hyperref}
\theoremstyle{remark} 
\newtheorem{st}{Statement}

\begin{document}

\begin{equation}
\label{eq:one}
x = y
\end{equation}

According to \autoref{eq:one}, \dots %According to Equation 1, ...

\begin{st}
\label{st:one}
blabla
\end{st}

If \autoref{st:one} is true. % If 1 is true. 

\end{document}
so that \autoref{st:one} displays 'Statement 1'. Is that possible?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

hyperref | '\autoref' for New Theorem

Post by Juanjo »

Yes, just add this line to the preamble:

Code: Select all

\newcommand*{\stautorefname}{Statement}
You should read pages 15 and 16 in the manual of hyperref (pdf version)
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
Post Reply