Document Classescannot get hyperref's \autopageref command to work

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
darckhart
Posts: 34
Joined: Mon Jul 09, 2007 4:04 am

cannot get hyperref's \autopageref command to work

Post by darckhart »

I am using hyperref package v6.75r (2007/02/07) and compiling with latex.exe -> dvips, then ghostscript to make ps into pdf. This is with TexLive2007 on WinXP.

This is my code:

Code: Select all

Code, edit and compile here:
\listfiles
\documentclass[12pt]{report}
\usepackage{palatino}
\usepackage[left=1.5in, right=1in, top=1.25in, bottom=1.25in]{geometry}
\usepackage[breaklinks=true]{hyperref}
\begin{document}
\chapter{chapter the first}\label{ch:first}
\newpage
\section{section the first}\label{sec:first}
\begin{table}[b]
\caption{this is the table}
\centering
\begin{tabular}{@{} ccc}
this is the table & nothing & nothing
\end{tabular}
\label{tbl:obese}
\end{table}
it is clear from \autoref{tbl:obese} on \autopageref{tbl:obese} that not only is the situation getting worse (the percentage has nearly tripled in a mere 30 years!), substantial effort must be made to address this public health concern.
\end{document}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This is the error message I get:

Code: Select all

! Undefined control sequence.
l.18 ...r from \autoref{tbl:obese} on \autopageref
{tbl:obese} that not only ...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The documentation on the autoref command in the hyperref manual.pdf is sparse, so I am not quite sure how to proceed from here. What wasn't "\def'ed"? I did open my aux file to confirm that a newlabel and counter was generated for this table, and it was. TIA.

Recommended reading 2024:

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

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

User avatar
pumpkinegan
Posts: 91
Joined: Thu May 03, 2007 10:29 pm

cannot get hyperref's \autopageref command to work

Post by pumpkinegan »

It works correctly for me with MiKTeX 2.6 on XP64

Code: Select all

*File List*
report.cls 2005/09/16 v1.4f Standard LaTeX document class
size12.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
palatino.sty 2005/04/12 PSNFSS-v9.2a (SPQR)
geometry.sty 2002/07/08 v3.2 Page Geometry
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
geometry.cfg
hyperref.sty 2007/06/14 v6.76i Hypertext links for LaTeX
hycolor.sty 2007/04/11 v1.1 Code for color options of hyperref/bookmark (HO)
pd1enc.def 2007/06/14 v6.76i Hyperref: PDFDocEncoding definition (HO)
etexcmds.sty 2007/05/06 v1.0 Providing prefix for e-TeX command names (HO)
infwarerr.sty 2007/06/14 v1.1 Providing info/warning/message (HO)
hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
kvoptions.sty 2007/06/11 v2.7 Connects package keyval with LaTeX options (HO)
url.sty 2005/06/27 ver 3.2 Verb mode for urls, etc.
hdvips.def 2007/06/14 v6.76i Hyperref driver for dvips
pdfmark.def 2007/06/14 v6.76i Hyperref definitions for pdfmark specials
ot1ppl.fd 2001/06/04 font definitions for OT1/ppl.
nameref.sty 2007/05/29 v2.31 Cross-referencing by name of section
refcount.sty 2006/02/20 v3.0 Data extraction from references (HO)
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

cannot get hyperref's \autopageref command to work

Post by localghost »

I can't comprehend the error. Your example is working fine for me with MiKTeX 2.6 and TeXnicCenter. Could depend on the version of the hyperref package. Compare your file list with mine.

Code: Select all

*File List*
report.cls 2005/09/16 v1.4f Standard LaTeX document class
size12.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
palatino.sty 2005/04/12 PSNFSS-v9.2a (SPQR)
geometry.sty 2002/07/08 v3.2 Page Geometry
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
geometry.cfg
hyperref.sty 2007/06/14 v6.76i Hypertext links for LaTeX
hycolor.sty 2007/04/11 v1.1 Code for color options of hyperref/bookmark (HO)
pd1enc.def 2007/06/14 v6.76i Hyperref: PDFDocEncoding definition (HO)
etexcmds.sty 2007/05/06 v1.0 Providing prefix for e-TeX command names (HO)
infwarerr.sty 2007/06/14 v1.1 Providing info/warning/message (HO)
hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
kvoptions.sty 2007/06/11 v2.7 Connects package keyval with LaTeX options (HO)
url.sty 2005/06/27 ver 3.2 Verb mode for urls, etc.
hdvips.def 2007/06/14 v6.76i Hyperref driver for dvips
pdfmark.def 2007/06/14 v6.76i Hyperref definitions for pdfmark specials
ot1ppl.fd 2001/06/04 font definitions for OT1/ppl.
nameref.sty 2007/05/29 v2.31 Cross-referencing by name of section
refcount.sty 2006/02/20 v3.0 Data extraction from references (HO)
hyperref-xmpl.out
hyperref-xmpl.out
***********
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
darckhart
Posts: 34
Joined: Mon Jul 09, 2007 4:04 am

Re: cannot get hyperref's \autopageref command to work

Post by darckhart »

All right I'm just going to post a running account here of what I'm doing in case I happen to solve this and someone else runs into the same problem.

So I opened up the hyperref.sty and did a find on the string "autopageref" and what do you know? It wasn't there. So I checked CTAN to see if there was a newer version of hyperref. Turns out there is: v6.76i (2007/06/14). So I went through the process of installing it and now when I compile I get an emergency stop "hycolor.sty" not found. I google this and the closest I get is the hycolor.dtx file found as part of the oberdiek package (he's the guy that writes hyperref apparently). Anyway I'm going to install that next and see where this goes.
darckhart
Posts: 34
Joined: Mon Jul 09, 2007 4:04 am

Re: cannot get hyperref's \autopageref command to work

Post by darckhart »

yes, turns out the hyperref package on the texlive2007 distro cd is too old. i updated both the hyperref and oberdiek packages and everything works fine now. thanks.
Post Reply