GeneralJumping to a specific location?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
montgomery burns
Posts: 2
Joined: Sat Mar 28, 2009 8:05 am

Jumping to a specific location?

Post by montgomery burns »

Hi!

I am using MacTeX with TextMate and Skim. Can somebody tell me why the example below does not work? Normally it should be possible to jump with \HERE to a specific location in the pdf file.

Code: Select all

\documentclass{book}

\usepackage{zref-abspage}
\makeatletter
\newcommand*{\HERE}{%
\zref@label{HERE}%
}
\makeatletter
\AtBeginDocument{%
\hypersetup{%
pdfstartpage=\zref@extractdefault{HERE}{abspage}{1}%
}%
}
\makeatother
\usepackage{hyperref}

\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\chapter{Introduction}
\chapter{Documentation}
\section{Hello World}
\HERE
\backmatter
\chapter{Appendix}
\end{document}

Recommended reading 2024:

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

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

Post Reply