interaction-importing.tex /size: 2848 b    last modification: 2023-12-21 09:43
1% language=us
2
3\environment interaction-style
4
5\startcomponent interaction-importing
6
7\startchapter[title=Importing]
8
9This is a very short chapter that deals with external figures. Normally an image
10is a graphic with possible some text. There are however workflows where one
11includes pages from other documents. Such documents can contain cross references,
12bookmarks, comments and|/|or fields. Normally annotations of any kind are ignored
13and for good reason: they assume the whole document to be the, not just one or a
14few pages. Merging references for instance is a source for clashes, not only for
15named ones but also for page references.
16
17But when you {\em know} what you're doing, as for instance Taco (who requested
18this feature) does, there is a way to merge annotations. This is controlled by
19the interaction keys in \type {externalfigure}:
20
21\starttyping
22\externalfigure[somedoc][page=1,interaction=yes]
23\externalfigure[somedoc][page=2,interaction={reference,bookmark}]
24\stoptyping
25
26However, only references and bookmarks are officially supported! The other
27annotations are possible but the code is experimental and will be finished
28when we find a good reason for it.
29
30\starttabulate[|B|p|]
31\FL
32\NC \type {reference} \NC named and page references and urls \NC \NR
33\NC \type {comment}   \NC comments if possible with relevant icon \NC \NR
34\NC \type {bookmark}  \NC text bookmarks that refer to pages \NC \NR
35\NC \type {field}     \NC widgets but only within reason \NC \NR
36\NC \type {layer}     \NC viewer layers \NC \NR
37\ML
38\NC \type {yes}       \NC named and page references, urls and bookmarks \NC \NR
39\NC \type {all}       \NC all annotations \NC \NR
40\LL
41\stoptabulate
42
43If things don't work out well, imagine for a while what is involved in supporting
44this: analyzing a page from a document, remapping the annotations onto some
45\CONTEXT\ mechanism, making sure that we don't get clashes, keeping overhead
46acceptable.
47
48Because this is a somewhat tricky feature, tracing can help you to identify
49problems: \typ {figures.merging}, \typ {figures.links}, \typ {figures.comments},
50\typ {figures.fields} and \typ {figures.outlines}.
51
52Another complication when including pages can be the presence of so called marked
53content in the page stream. There is experimental support for removing those but
54right now (2018) you need to explicitly enable this explicitly:
55
56\starttyping
57\enabledirectives[graphics.pdf.uselua]
58\enabledirectives[graphics.pdf.stripmarked]
59%enabledirectives[graphics.pdf.recompress]
60\stoptyping
61
62This will delegate inclusion from the backend to \LUA. This might become the
63default as it is just as efficient as using the backend. That way we can filter
64the content stream. \footnote {We might add a callback to \LUATEX\ for filtering
65the content stream (no hard todo but post version 1.10).}
66
67\stopchapter
68
69\stopcomponent
70
71
72
73
74