Changes

Jump to navigation Jump to search
alternative link highlighting
= Link coloring =
 
By default, the link text gets a green or red [[Color|color]], depending on whether the link is to another page or to the same page. You can change the link colors with the <tt>color</tt> (links to other pages) and <tt>contrastcolor</tt> (links to the same page) properties. Link style is by default set to bold.
\stopTEXpage
</context>
 
= Alternative link highlighting =
 
There is an alternative way of highlighting interactive links, by adding a colored border to the link text, such as in:
 
<context source="yes">
\startTEXpage[offset=1dk]
\setupinteraction[state=start,color=,contrastcolor=, style=,]
\enabledirectives[references.border=darkgreen]
\goto{https://contextgarden.net/}[url(https://contextgarden.net/)] is a great source of information.
\stopTEXpage
</context>
 
This is a special PDF feature (a link annotation border), not just a frame added to the link text.
 
Depending on your PDF viewer, these link annotation borders may be displayed and/or printed.
 
According to the specification, the links generated by ConTeXt are only to be displayed, not to be printed.
 
Just in case you wonder, this feature comes handy in order to have exactly the same PDF document in print and on screen.<ref>If you have a ConTeXt version from 2024 (as the wiki doesn’t have at the time of writing), there is also a way to distinguish border colors according to link types, such as in:
 
<context source="yes">
\starttext
\definecolor[internal][x=00cc00]
\definecolor[external][x=0000cc]
\definecolor[urls][x=cc0000]
\definecolor[programs][x=000000]
\enabledirectives[references.border=internal]
\enabledirectives[references.border=inner:internal]
\enabledirectives[references.border=special operation+internal:internal]
\enabledirectives[references.border=special operation+page:internal]
\enabledirectives[references.border=outer:external]
\enabledirectives[references.border=outer with inner:external]
\enabledirectives[references.border=special outer with operation+page:external]
\enabledirectives[references.border=special operation+file:external]
\enabledirectives[references.border=special operation+program:programs]
\enabledirectives[references.border=special operation+url:urls]
 
\startTEXpage[offset=1dk]
\goto{this page}[page(1)]
\blank
\goto{page 25 from “Dealing with XML”}[xml-mkiv.pdf::25]
\blank
\goto{https://contextgarden.net/}[url(https://contextgarden.net/)]
\blank
\goto{the source of this file}[program(\jobname.tex)]
\stopTEXpage
\stoptext
</context>
 
The previous sample makes three categories: URLs, internal (parts of the same document), external (parts of other PDF documents), and programs or file (better avoid using these ones).</ref>
= Clickable table of contents =
 
To make table of contents items clickable, use the {{cmd|setupcombinedlist}} command.
* See in [[Using Graphics| using graphics]] how to use movies.
* [[Multimedia Inclusion]] describes how to add audio and video files.
 
= Footnotes =
[[Category:Interaction]]
139

edits

Navigation menu