|
From: Hans F. N. <Han...@hi...> - 2005-04-08 23:04:34
|
Finally - version 0.2 of TeXPower, released today, supports
(hyper)links to subpages without any hassle and exact label-ref
to subpages. (The only thing that might be missing is that the TOC
still points to the last subpage of each "physical" page.)
The hack below shouldn't be necessary anymore.
Best regards,
Hans
On Sun, Dec 21, 2003 at 12:19:11AM +0100, Andreas Matthias wrote:
> Hans Fredrik Nordhaug wrote:
>
> > On Fri, 12 Dec 2003, Andreas Matthias wrote:
> >
> > ----
> > \documentclass[a4paper]{article}
> > \usepackage[display]{texpower}
> > \usepackage{count1to}
> > \def\abspage{\the\count1}
> >
> > \makeatletter
> > \newcount\foobar
> > \def\WriteLabel{%
> > \protected@write\@auxout{\let\abspage\relax}
> > {\string\newlabel{foobar\the\foobar}{{}{\abspage}}}%
> > \global\advance\foobar\@ne
> > }
> > \renewcommand{\do@insert@firstanchor@TP}{\SetLabel}
> > \renewcommand{\dont@insert@firstanchor@TP}{\SetLabel}
> > \def\AddLabel{\global\let\SetLabel\WriteLabel\AtShipout{\KillLabel}}
> > \def\KillLabel{\global\let\SetLabel\relax}
> > \def\StepLabel{\ifthenelse{\boolean{firstactivation}}{\AddLabel}{}}
> > \makeatother
> >
> > \KillLabel
> >
> > \begin{document}
> > \Huge testing
> > \stepwise{%
> > \step{foo}%
> > \step{bar}%
> > \step{baz\StepLabel}%
> > }
> > Bla-bla
> > \newpage
> > foobar
> > \pause
> > foobar again \AddLabel
> > \pause
> > foobar again again
> > \end{document}
> > ----
> >
> > What do you think - slightly better?
>
> Yes, that's it. And after some stupid problems -- I then used
> \newcounter instead of \newcount and forgot about \releasecounter --
> I even got it working in my other documents and pdfpages, too.
> I am happy now!
>
> > You use \StepLabel inside steps and \AddLabel elsewhere.
>
> I added one more indirection, so that one does not have to
> distinguish between \AddLabel and \StepLabel:
>
> \def\@AddLabel{\global\let\SetLabel\WriteLabel\AtShipout{\KillLabel}}
> \def\KillLabel{\global\let\SetLabel\relax}
> \def\AddLabel{%
> \ifthenelse{\boolean{instepwise@TP}}
> {\ifthenelse{\boolean{firstactivation}}{\@AddLabel}{}}
> {\@AddLabel}}
>
> Now \AddLabel is working within and outside of \stepwise.
>
> Thank you very much for your help. I appreciate it.
>
> Ciao
> Andreas
|