Re: References to pages within \stepwise
Hans Fredrik Nordhaug <[email protected]> Mon, 8 Dec 2003 07:48:31 +0100 (CET)
| Newsgroups | gmane.comp.tex.texpower.user |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 6 Dec 2003, Andreas Matthias wrote:
> I would like to put a PDF anchor on *every* page of a document.
> Unfortunately, I cannot cope with pages created with \stepwise.
> Only the last page of \stepwise gets an anchor; the others are
> missed out. Here is a small example of what I tried:
>
>
> \documentclass[a4paper]{article}
> \usepackage[display]{texpower}
> \usepackage{count1to,eso-pic}
>
> \AddToShipoutPicture{%
> \pdfdest name {XXX.\the\count1} fit
> }
>
> \begin{document}
> \Huge testing
>
> \stepwise{%
> \step{step 1}
> \step{step 2}
> \step{step 3}%
> }
> \newpage
>
> foo\newpage
> bar\newpage
> baz\newpage
[cut some unused commands]
> \end{document}
>
> The names entry in the document's catalog looks like that:
> /Names [(XXX.4) 20 0 R (XXX.5) 24 0 R (XXX.6) 28 0 R (XXX.7) 32 0 R]
>
> (XXX.1), (XXX.2), and (XXX.3) are missing. Does anyone know how to
> create references to the first three pages?
There is no easy way to get this, because texpower is trying really hard
to mark each "physical" page as one page.
Page 1 - XXX.1 to XXX.4
Page 2 - XXX.5
Page 3 - XXX.6
Page 4 - XXX.7
Hence, XXX.1 to XXX.3 is thrown away by texpower. However, texpower does
add the firstpage.n anchor so you can get to the first page of each
physical page.
page.n - last incremental page of physical page n
firstpage.n - first incremental page of physical page n
If this isn't what you need, you have to change the internals of texpower.
In the preamble add:
\makeatletter
\renewcommand{\dont@insert@firstanchor@TP}{\pdfdest name {XXX.\the\count1} fit}
\renewcommand{\do@insert@firstanchor@TP}{\pdfdest name {XXX.\the\count1} fit}
\makeatother
(The creation of firstpage.n is normally done by \do@insert@firstanchor@TP.)
Best regards,
Hans
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/