| 1 |
\documentclass[12pt]{article} |
| 2 |
\usepackage{xcolor} |
| 3 |
%\usepackage{xr-hyper} |
| 4 |
\usepackage[bookmarksopen,bookmarksnumbered]{hyperref} |
| 5 |
%\usepackage{eforms} |
| 6 |
\usepackage{xbmks} |
| 7 |
|
| 8 |
% the xr-hyper package may also be used if you have |
| 9 |
% cross document links within the body of the doc |
| 10 |
%\externaldocument[d1-]{doc1} |
| 11 |
%\externaldocument[d2-]{doc2} |
| 12 |
|
| 13 |
\title{On merging bookmarks for several documents} |
| 14 |
\author{D. P. Story} |
| 15 |
|
| 16 |
% The \xbmksetup command is placed in only |
| 17 |
% one of the collection. It is written to xbmks.cfg |
| 18 |
% in input by the other files to obtain uniformity |
| 19 |
% of option choices. |
| 20 |
\xbmksetup{% |
| 21 |
docbundle={master,doc1,doc2}, |
| 22 |
colors={int=red,ext}, |
| 23 |
styles={intbf} |
| 24 |
} |
| 25 |
|
| 26 |
\begin{document} |
| 27 |
|
| 28 |
\maketitle |
| 29 |
|
| 30 |
\tableofcontents |
| 31 |
|
| 32 |
% color and style specified. This will be how these entries are displayed across |
| 33 |
% all documents in the bundle |
| 34 |
\pdfbookmarkx[1]{http://blog.acrotex.net}[action={/S/URI/URI(http://blog.acrotex.net)},% |
| 35 |
color=magenta,style={bf}]{blog} |
| 36 |
\currentpdfbookmarkx{http://www.acrotex.net}[action={/S/URI/URI(http://www.acrotex.net)},% |
| 37 |
color=magenta,style={bf}]{home} |
| 38 |
\currentpdfbookmarkx{First page}[action={/S/Named/N/FirstPage},% |
| 39 |
color=magenta,style={bf}]{First} |
| 40 |
\currentpdfbookmarkx{Last page}[action={/S/Named/N/LastPage},% |
| 41 |
color=magenta,style={bf}]{Last} |
| 42 |
|
| 43 |
% the eforms versions of the above |
| 44 |
%\pdfbookmarkx[1]{http://blog.acrotex.net}[action={\URI{http://blog.acrotex.net}},% |
| 45 |
% color=magenta,style={bf}]{blog} |
| 46 |
%\currentpdfbookmarkx{http://www.acrotex.net}[action={\URI{http://www.acrotex.net}},% |
| 47 |
% color=magenta,style={bf}]{home} |
| 48 |
%\currentpdfbookmarkx{First page}[action={\Named{FirstPage}},% |
| 49 |
% color=magenta,style={bf}]{First} |
| 50 |
%\currentpdfbookmarkx{Last page}[action={\Named{LastPage}},% |
| 51 |
% color=magenta,style={bf}]{Last} |
| 52 |
|
| 53 |
\section{Master One} |
| 54 |
|
| 55 |
Some content goes here. |
| 56 |
|
| 57 |
% color and style not specified, this bookmark will take on the default |
| 58 |
% color and style as declared in the \xbmksetup command. |
| 59 |
\belowpdfbookmarkx{JavaScript Action}[% |
| 60 |
action={/S/JavaScript/JS(app.alert("Hello World!\\n\\nAnnounced from the document " |
| 61 |
+ this.documentFileName);)}]{jsa} |
| 62 |
|
| 63 |
% eforms version |
| 64 |
%\belowpdfbookmarkx{JavaScript Action}[ |
| 65 |
% action={\JS{app.alert("Hello World!\\n\\nAnnounced from the document " |
| 66 |
% + this.documentFileName);}]{jsa} |
| 67 |
|
| 68 |
% color and style not specified, this bookmark will take on the default |
| 69 |
% color and style as declared in the \xbmksetup command. |
| 70 |
\belowpdfbookmarkx{Go to doc1, page 2}[action={/S/GoToR/F(doc1.pdf)/D[1 /Fit]}]{gotor1} |
| 71 |
% eforms version |
| 72 |
%\belowpdfbookmarkx{Go to doc1, page 2}[action={\GoToR/F(doc1.pdf)/D[1 /Fit]}]{gotor} |
| 73 |
|
| 74 |
\hypersetup{bookmarksopen=false} |
| 75 |
% This next bookmark is a title only, the actions is to jump to an destination not defined |
| 76 |
\subpdfbookmarkx{Sub: Optional Bookmarks}[action={/S/GoTo/D(undefined)}]{optBmks} |
| 77 |
\belowpdfbookmarkx{doc1, page 3}[action={/S/GoToR/F(doc1.pdf)/D[2 /Fit]}]{gotor2} |
| 78 |
\belowpdfbookmarkx{doc2, page 2}[action={/S/GoToR/F(doc2.pdf)/D[1 /Fit]}]{gotor3} |
| 79 |
\hypersetup{bookmarksopen=true} |
| 80 |
|
| 81 |
\subsection{Master One: subSec 1} |
| 82 |
|
| 83 |
Some content goes here. |
| 84 |
|
| 85 |
|
| 86 |
\newpage |
| 87 |
|
| 88 |
|
| 89 |
\section{Master Two} |
| 90 |
|
| 91 |
Some content goes here. |
| 92 |
|
| 93 |
\subsection{Master Two: subSec 1} |
| 94 |
|
| 95 |
Some content goes here. |
| 96 |
|
| 97 |
\newpage |
| 98 |
|
| 99 |
\subsection{Master Two: subSec 2} |
| 100 |
|
| 101 |
Some content goes here. |
| 102 |
|
| 103 |
|
| 104 |
\end{document} |
| 105 |
|