I have been playing with the FLOAT package and I have made a float called "Example". The caption is good, the list of examples is good, but the thing the bugs me is that I cannot use \autoref with my new float. I would like it to say Example 1.1 and not just 1.1. I am aware that my custom float is not in the standard repertoire of LaTeX or HYPERREF, so I will have to somehow tell HYPERREF about my new float. Question is how? I found some \def commands in the HYPERREF manual, but they just seem to modify the language depending on the babel option you specify. I found no way to make a "new" entry.
Any help is much appreciated!!
Bjorn
Code: Select all
\documentclass[a4paper,12pt]{report}
\usepackage[a4paper,margin=2.5cm]{geometry}
\usepackage{float}
\usepackage[format=hang,labelfont={bf,sf},font=small]{caption,subfig}
\setlength{\captionmargin}{20pt}
\usepackage[pdftex,bookmarks,colorlinks,linkcolor=black,urlcolor=black]{hyperref}
\newfloat{example}{H}{flt}[chapter]
\floatname{example}{Example}
\begin{document}
\listof{example}{List of examples}
\chapter{one}
\begin{example}
\caption{tekst tekst tekst}
tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst tekst
\label{ex1}
\end{example}
This is a ref to \autoref{ex1}. (here I want to see ... a ref to Example 1.1)
\end{document}