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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Post Reply