[pdftex] How to produce outlines?

John Culleton john at wexfordpress.com
Thu Mar 5 16:41:39 CET 2009


On Wednesday 04 March 2009 08:16:50 am John Culleton wrote:
> On Wednesday 04 March 2009 06:38:57 am Heiko Oberdiek wrote:
> > On Wed, Mar 04, 2009 at 11:58:46AM +0000, Rodolfo
> > Medina
>
> wrote:
> > > Rodolfo Medina wrote:
> > > >> I'm new with pdftex and am wondering how to
> > > >> produce outlines in a left window of xpdf screen.
> >
> > See packages hyperref and bookmarks.
> >
> > Yours sincerely
> >   Heiko <oberdiek at uni-freiburg.de>
>
> If you are working in pdftex and not pdflatex the pdftex
> manual has some useful hints. And the package eplain.tex
> adds some convenience features.

Here is some more definitive info from the file samplepdf.tex, found in your 
distribution. Some of the lines may have been wrapped in this email so see 
the original for the correct code:
--------------------------------------------------------
% outlines (bookmarks):
\pdfoutline             % outline entry specification
                        %
    goto num 1          % action specification. This is the same as the  action
                        % specification of `\pdfstartlink'
                        %
    count 3             % number of direct subentries of this entry, 0 if this
                        % entry has no subentries (in this case it may be
                        % omitted). If after `count' follows an negative number
                        % then all subentries will be closed and the absolute
                        % value of this number specifies the number of
                        % direct subentries (see the following entries)
                        %
    {Outline 1}         % text contents of outline entry

    \pdfoutline goto num 1 count -2{Outline 1.1}
        \pdfoutline goto num 1 {Outline 1.1.1}
        \pdfoutline goto num 1 {Outline 1.1.2}
    \pdfoutline goto num 1 {Outline 1.2}
    \pdfoutline goto num 1 {Outline 1.3}
\pdfoutline goto page 1 {/Fit} {Outline 2}
--------------------------------------------------
It is useful to run pdftex samplepdf.tex
where it is located in your distro, and then compare the
pdf file in e.g. Acrobat Reader with the source that created it.   Note that the 
destination 
\pdfdest 1 
occurs on page 10 and the outline entry marked "Outline 2" actually takes 
you back to page 1. 



-- 
John Culleton
Able Indexers and Typesetters
http://wexfordpress.com


More information about the pdftex mailing list