[texhax] pdfpages, geometry, hyperref - no page anchors

Hideo Umeki latexgeometry at gmail.com
Sun Jul 11 16:27:09 CEST 2010

Thank you for good suggestion.
I've updated the geometry package to improve the overloading
of \shipout using the atbegshi package.
The new geometry v5.4 is now available in CTAN mirrors.
It'd work well for that sample I suppose.

Hideo Umeki

>> If I remove \usepackage{pdfpages} or \usepackage{geometry} or even
>> just the [showframe] option then everything is fine.
> The bug is in geometry, if option showframe or showcrop are used.
> Then geometry redefines shipout in \AtBeginDocument, but saves
> the \shipout at package loading time. Thus each redefining of
> \shipout is lost in between.
> Workaround:
> \documentclass{book}
> \usepackage{pdfpages}
> \makeatletter
> \AtBeginDocument{\let\Gm at shipout\shipout}% right before geometry
> \makeatother
> \usepackage[showframe]{geometry}
> \usepackage{hyperref}
> \begin{document}
> p1\newpage p2\newpage p3\newpage
> \hyperlink{page.1}{1}/\hyperlink{page.2}{2}/\hyperlink{page.3}{3}/
> \end{document}
> Package geometry should at least move and copy the line
>  \let\Gm at hipout\shipout
> right before each
>  \renewcommand*{\shipout}{...}%
> Also the way geometry redefines \shipout can be improved,
> see package atbegshi "2 Method of \shipout overloading".
> Yours sincerely
>  Heiko Oberdiek

More information about the texhax mailing list