Sujet : Re: Link in LaTeX
De : ud.usenetcorrespondence (at) *nospam* web.de (Ulrich D i e z)
Groupes : comp.text.texDate : 31. Mar 2024, 14:33:52
Autres entêtes
Message-ID : <uubong$22pbs$1@solani.org>
References : 1 2 3 4 5
User-Agent : Mozilla/5.0 (X11; Linux i686 on x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0
db wrote:
[...]
This works, the link is blue.> But the document also has a table of contents, and> it is rendered all red. I can't find anything in that> manual, nor in hycolor.pdf, on the contents' colour.> How do I suppress that, so that it comes out black?
The manual of the most recent release of the package hyperref can be
found at:
http://mirrors.ctan.org/macros/latex/contrib/hyperref/doc/hyperref-doc.pdfDepending on the TeX distribution in use by you you can probably use the
texdoc-utility for finding the manual belonging to the hyprref-release
installed on your computer.
On my system I can type the command
texdoc hyperref
on the shell and my pdf-viewer is launched and shows the manual of the
hyperref manual.
Section "5.6 Extension options" says:
| colorlinks boolean false Colors the text of links and anchors.
| The colors chosen depend on the type of
| link. At present the only types of link
| distinguished are citations, page
| references, URLs, local file references,
| and other links. Unlike colored boxes,
| the colored text remains when printing.
| linkcolor color red Color for normal internal links.
| anchorcolor color black Color for anchor text. Ignored by most
| drivers.
| citecolor color green Color for bibliographical citations in
| text.
| filecolor color cyan Color for URLs which open local files.
| menucolor color red Color for Acrobat menu items.
| runcolor color filecolor Color for run links (launch
| annotations).
| urlcolor color magenta Color for linked URLs.
| allcolors color Set all color options (without border
| and field option.)
| frenchlinks boolean false Use small caps instead of color for
| links.
| hidelinks Hide links (removing color and border).
Links in the table of contents are internal links, so you can change
the color of links of the table of contents to black via
\hypersetup{colorlinks,linkcolor=black}
For having all links, not just internal links, without color/border
you can use the option hidelinks:
\hypersetup{hidelinks}
You can switch color of all internal links only with links belonging to
the table of contents to black by adding \hypersetup-commands to the
.toc-file (which holds the data of the table of contents) via
\AtBeginDocument{\addtocontents{toc}{\begingroup\protect\hypersetup{linkcolor=black}}}
\AtEndDocument{\addtocontents{toc}{\endgroup}}
You can turn off both coloring of links and adding borders to links
only with all links belonging to the table of contents by adding
\hypersetup-commands to the .toc-file (which holds the data of the
table of contents) via
\AtBeginDocument{\addtocontents{toc}{\begingroup\protect\hypersetup{hidelinks}}}
\AtEndDocument{\addtocontents{toc}{\endgroup}}
Sincerely
Ulrich