latex3 / latex3/hyperref

Suggestion for hyperref: option to disable links but keep the colors.

Open
#345 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TeX
Stars
205
Forks
41
PR merge metrics
No merged PRs in 30d

Description

This code (from https://chat.stackexchange.com/transcript/message/65785587#65785587)

\makeatletter
\def\hyper@linkstart#1#2{\begingroup\color{\csname @#1color\endcsname}}
\def\hyper@linkend{\endgroup}
\def\hyper@link#1#2#3{{\color{\csname @#1color\endcsname}#3}}
\makeatother

might be useful as an option to hyperref, in order to disable the links but keeping the colors like hidelinks but keeping the colors.

A situation where this is very useful is then working on long projects and using \includeonly. Then if you're working on Chapter 9, and that is the only thing loaded via \includeonly then one get a lot of

pdfTeX warning (dest): name{foo.bar} has been referenced but does not exist, replaced by a fixed one

which cannot be disabled. By removing the link, these go away. The hyperlinks to the other chapters does not work anyway under \includeonly.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the supplied \hyper@linkstart, \hyper@linkend, and \hyper@link definitions and hyperref's option handling; the issue names no files or tests. Done means an option disables hyperlink destinations while preserving link colors and avoids the missing-destination warnings produced with \includeonly.

Written by the indexing model from the issue text.

Assessment

Tech stack
latex
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.