Re: [dk-tug] Automatiserede referencer
Martin Heller <[email protected]>
| Newsgroups | gmane.comp.tex.danish |
|---|---|
| Message-ID | <[email protected]> |
Lars Madsen wrote, on 01-03-2012 14:58:
> Hvad har I af forslag?
Hvad med bare at bruge \autoref fra hyperref pakken?
\documentclass{book}
\usepackage{hyperref}
\usepackage{mathtools,amsthm}
\newtheorem{theorem}{Theorem}[section]
\begin{document}
\chapter{Foo}
\label{chap:foo}
\section{Bar}
\label{sec:bar}
\begin{theorem}[Baz]
\label{thm:baz}
bar
\end{theorem}
\noindent
Ref to chapter \autoref{chap:foo}\\
Ref to section: \autoref{sec:bar}\\
Ref to theorem: \autoref{thm:baz}.
\end{document}