interaction-bookmarks.tex /size: 2002 b    last modification: 2023-12-21 09:43
1% language=us
2
3\environment interaction-style
4
5\startcomponent interaction-bookmarks
6
7\startchapter[title=Bookmarks]
8
9Bookmarks are a sort of table of contents displayed by the viewer and as such
10they take up extra space on the screen. You need to turn on interaction in
11order to get bookmark data embedded in the document.
12
13\starttyping
14\placebookmarks
15  [chapter,section,subsection,mylist]
16  [chapter]
17\stoptyping
18
19A bookmark list is added to the document only when interaction is enabled. The
20list in the first argument are bookmarked while the second argument specifies
21what bookmark (sub)trees are opened. if you don't get what you expect, check your
22document structure! Also, use the \type {\start}|-|\type {stop} alternatives.
23
24Bookmarks are taken from the section title, but you can overload the title
25as follows:
26
27\starttyping
28\startchapter[title=Foot,bookmark=food]
29    ...
30\stopchapter
31\stoptyping
32
33If you have a more complex typeset title you can also try:
34
35\starttyping
36\enabledirectives[references.bookmarks.preroll]
37\stoptyping
38
39From \MKII\ we inherit the option to overload the last set bookmark but the
40previously mentioned approach is better.
41
42\starttyping
43\chapter {the first chapter}
44\bookmark {the first bookmark}
45\stoptyping
46
47You can add entries to a bookmark list:
48
49\starttyping
50\bookmark[mylist]{whatever}
51\stoptyping
52
53This assumes that you have defined the list.
54
55\showsetup {bookmark}
56
57If you want to have the bookmark tab open when you start a document, you
58can say:
59
60\starttyping
61\setupinteractionscreen[option=bookmark]
62\stoptyping
63
64There are only a few options that you can use. The \type {number} parameter can
65be used to hide section numbers. The \type {sectionblock} parameter controls the
66addition of section block entries, something that can be handy when you have
67multiple section blocks with similar section titles. With \type {force} you force
68an entry to the file, bypassing mechanisms that to be clever.
69
70\showsetup{setupbookmark}
71
72\stopchapter
73
74\stopcomponent
75
76