Questions tagged [hyperref]
{hyperref} is a package capable of producing hypertext links in documents. If your question is about cross-referencing in general, choose {cross-referencing}. If it's specifically about PDF features, consider to choose {pdf}.
5,171 questions
0
votes
1
answer
22
views
Missing Hyperlink for ToC, LoF, and LoT entries with custom toc entries using titletoc
I have the following code for my dissertation thesis. I have posted the entire preamble as it may point to a possible solution. I have heavily customized the ToC, LoF, and LoT entries using the ...
6
votes
2
answers
145
views
Section title with \star
I am trying to get the following:
But when I insert it in this way:
\documentclass[a4paper,12pt]{amsart}
\usepackage{hyperref}
\begin{document}
\tableofcontents
\section{Introduction}
\subsection{$...
1
vote
1
answer
36
views
LaTeX not properly tagging links that appear in headers
I am producing a tagged pdf, and I'm trying to put a hyperlink in the header using fancyhdr.
\DocumentMetadata{pdfstandard = ua-2, pdfversion = 2.0, tagging = on}
\tagpdfsetup{table-header-rows=1}
\...
0
votes
0
answers
53
views
TeX Live 2025 shows \ac / \cref warnings but TeX Live 2024 doesn't
Combining the acronym package with tableofcontents and other lists can cause unexpected behaviour if acronyms are used in headings (and captions etc). The compiler sees the list as the first time the ...
1
vote
1
answer
35
views
Error based on interaction of thmtools and an implemantation of a refable delayed proof environment
I added the solution by @egreg to the question Reference to proof prints section instead to my document and it did not work throwing the error:
Undefined control sequence. \@hyper@@anchor ...r@spot {#...
0
votes
0
answers
43
views
How can I define custom footnote links that respect duplicates, and store the pages they appear on?
I would like to implement commands for referencing requirements in a technical report. The goal is to streamline referencing requirements in the text as they are discussed, and automatically keep ...
0
votes
0
answers
26
views
Fomatting titles in PDF Index / Outline [duplicate]
I am looking for some guidence on styling the pdf "index" that hyperref generates. I am talking about the sidebar that lists sections in a document:
Evince calls it an outline rather than ...
9
votes
2
answers
450
views
Link with many %
Generally, I don't include many links in my PDFs. Until now I’ve never had problems with \href from the hyperref package: when the URL contains % characters, I escape them using \% and everything ...
5
votes
1
answer
194
views
Newest pdfmanagement conflicts with tocloft package also for pdflatex
I have been using DocumentMetadata with tocloft in pdflatex without setbacks for more than two years. However, something changed with the most recent updates.
Currently the code gives warning tocloft....
5
votes
3
answers
325
views
Text running into right margin
When having the MWE:
\documentclass{book}
\usepackage[a4paper,left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm]{geometry}
\usepackage{hyperref}
\newcommand{\+}{\discretionary{\mbox{\scriptsize$\...
4
votes
1
answer
110
views
Set OriginalDocumentID (and other XMP metadata) from PDF management
For XMP metadata, there is a field called OriginalDocumentID. How can I set this from lualatex (or pdflatex) using the PDF management machinery? This field is briefly mentioned in the l3pdfmeta ...
3
votes
1
answer
42
views
How to make Textfield font match page font?
so for work I wanted to create a pdf logbook template with fillable fields, so i can quickly create a new logbook entry. For that I wanted to use the hyperref package with textfields etc.
During ...
1
vote
0
answers
54
views
\ref to figure shows “??” (Hebrew/RTL, KOMA-Script, XeLaTeX) even after placing \caption before \label [closed]
When I use \ref to reference a figure, I keep getting question marks — even after several compilations.
The log shows:
LaTeX Warning: Reference `fig:caption2' on page 2 undefined on input line 236.
...
1
vote
1
answer
55
views
References in two directions
I am trying to get references in both directions to work; so from the main text to notes at the very back - and from that section in the back, back to the main text. With a special 1:1 note counter ...
1
vote
1
answer
48
views
\hyperref does not give a correct jump in proof with customized head
I have a tex file (taken from this):
\documentclass[11pt]{amsart}
\usepackage{lipsum,zref-clever,mathtools,fullpage}
\zcsetup{cap=true,comp=false,sort=false}
\usepackage[hypertexnames=false]{hyperref}
...
5
votes
1
answer
166
views
\ref theorem hyperlink jumps to the wrong theorem
Hyperlinks created by \ref referencing thmtools theorems will print out correctly, but will jump to the first reference with the correct sub-number, without taking account the section number.
Here's a ...
1
vote
0
answers
18
views
How to show endnotes grouped by chapter with custom titles (not “Notes for chapter X”) in TeX Live 2024?
I am adapting a book in Basque and I use endnotes grouped by chapter.
Everything works perfectly: endnotes appear, reset by chapter, and hyperlinks work both ways.
✅ Goal:
At the end of the book (in ...
1
vote
2
answers
101
views
\hyperref does not give a correct jump
I have a tex file
\documentclass[11pt]{amsart}
\usepackage{lipsum,zref-clever,mathtools,fullpage}
\zcsetup{cap=true,comp=false,sort=false}
\usepackage[hypertexnames=false]{hyperref}
\hypersetup{
...
0
votes
0
answers
27
views
How to display per-chapter endnotes with correct bidirectional hyperlinks and custom section titles in TeX Live 2024–2025 (enotez + hyperref)
I’m trying to organize endnotes per chapter with clickable hyperlinks in both directions (text → note and note → text) in a book project compiled with pdfLaTeX / TeX Live 2025.
I use the enotez ...
0
votes
0
answers
12
views
Default behavior of thmtools and hyperlinks anchors [duplicate]
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{thmtools} %if not loaded the anchors use subsection correctly
%\usepackage{hyperref}
%\usepackage{cleveref}
\theoremstyle{...
5
votes
1
answer
128
views
Suppress table and table caption, but remove resulting blank lines
For various (uninteresting) reasons, I need to suppress the appearance of a number of tables, while keeping their \label{...} for easy cross-referencing in the text using \ref{...}. To achieve this ...
3
votes
1
answer
279
views
What is \IfDocumentMetadataT?
I just used tlmgr install beamer so I can learn how to make slide presentations and when I run sample code from Overleaf on TeXstudio (On Debian 13) I get an error:
"hyperref.sty: error: 4109: ...
3
votes
1
answer
88
views
Jump by \hyperlink is one line below \hypertarget
I have a tex file
\documentclass{amsart}
\usepackage{hyperref,lipsum}
\hypersetup{
colorlinks=true,
linkcolor=blue,
}
\begin{document}
We have a property \hypertarget{pro-P}{$(\mathbf{P})$}. \...
0
votes
2
answers
39
views
hyperref: change color of a particular \eqref{...} [duplicate]
I have a tex file (from this answer)
\documentclass[reqno]{amsart}
%https://tex.stackexchange.com/questions/752134/empheq-flush-group-numbering-to-the-left
\usepackage{mathtools,hyperref}
\hypersetup{
...
2
votes
1
answer
41
views
Create a new environment based on `algorithm2e` with an independent counter and correct `hyperref` links
I'm trying to create a new LaTeX environment, let's call it algprocedure, for typesetting procedures. I want it to look and feel exactly like the algorithm environment from the algorithm2e package, ...
1
vote
1
answer
77
views
How use \MakeLinkTarget for links to labeled items in description list?
In https://tex.stackexchange.com/a/365336/13492, this example shows use of \phantomsection to enable links to labeled items in description lists.
\documentclass[12pt]{article}
\usepackage[colorlinks=...
0
votes
0
answers
48
views
How to create a questionary with ChoiceMenu and automatic verification of given answers
I give some simple tests for my students using ChoiceMenu from hyperref's Form's . I created myChoiceMenu to insert, as first argument, the answer as its unique name and the list of options as the ...
3
votes
1
answer
64
views
How to create an enumerate environment with automated checkboxes from hyperref's form
I learned how to create checkboxes from hyperref's form. I could create my own \AutoCheckBox with a counter to name them uniquely.
However, I'd to create a new environment so that I only need to use ...
5
votes
2
answers
116
views
How to use \zcref to get black text Equation?
I am learning how to use \zcref and saw the following discussion: https://tex.stackexchange.com/a/751585/307309. However, I want to further implement a similar style for equations. That is, the ...
1
vote
0
answers
68
views
hyperref: wrapper around \href is fails to compile when placed in the argument of another command
Adapting from https://tex.stackexchange.com/a/448977/383565, I constructed my own version of \blink. But, it doesn’t work in captions, unlike the base \href:
\documentclass[a4paper, 11pt]{book}
\...
1
vote
1
answer
65
views
hyperref: ref type in black and numbering in blue
I have a tex file
\documentclass{article}
\usepackage{amsthm,mathtools}
\usepackage[hypertexnames=false]{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=blue
}
\usepackage{zref-clever}
\zcsetup{...
8
votes
2
answers
266
views
How to double chapter numbers and let hyperref do its work correctly
I have the following MWE with the goal to double some chapter numbers (don't ask me why, please). The problem is obviously that the links in the toc do not work anymore (hyperref). How to make these ...
0
votes
1
answer
82
views
hyperref `colorlinks` incompatible with `transparent` beamer option [closed]
(Note: I searched around tex SE and found many questions about option clash, e.g. this, but none seem to be related to my question. Feel free to flag as duplicate if it really is the case.)
I am ...
6
votes
2
answers
216
views
Avoid hyperref to affect line spacing
I have this document structure:
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[margin=1in]{geometry}
\usepackage{tabularx}
\usepackage{booktabs}
...
2
votes
0
answers
64
views
Creating a form to automatically calculate a mark
I want to create a template with check boxes in order to quickly calculate a mark for students. I have tried to do this with a \begin{Form} ... \end{Form} and some \ChoiceMenu. However, when I click ...
1
vote
1
answer
179
views
How do you get just the year field to be the hyperlink to the bibliography when using biblatex's chicago-notes style?
I'm trying to follow Chicago Notes style: https://www.chicagomanualofstyle.org/tools_citationguide/citation-guide-1.html.
Here is a MWE:
\documentclass{article}
\usepackage[a4paper,top=2cm,bottom=2cm,...
3
votes
1
answer
102
views
How to disable hyperlinks in math mode?
I was told that it is not recommended to use hyperlinks for acronyms in math mode, thus I should disable them locally by using \acs*{}. As I use \acs{} very often throughout my document and do not ...
0
votes
0
answers
36
views
Combining footnotes and nested glossary entries, breaks hyperlinks (i.e. A glossary link in a glossary description, itself, located in a footnote ! )
I'm attempting to combine glossaries-extras and footnotes, where the description of a given glossary entry should be put as a footnote upon first appearence.
I've almost made it to work, however my ...
2
votes
2
answers
103
views
Creating two references of a section (amsart): the section number and a custom reference
Edit: The code in the current answer shows an error on Latex Overleaf. Alternative answers would be great.
Consider the following example:
\documentclass[reqno]{amsart}
\usepackage{geometry}
\...
1
vote
1
answer
37
views
While using natbib in Beamer environment along with hyperref, I get black paranthesis at the end instead of pre-defined color. How do I change it? [duplicate]
This is the preamble I am using and the output I am getting.
\documentclass[11pt,xcolor=dvipsnames]{beamer}
\usepackage[round]{natbib}
\usepackage{xcolor}
\usepackage{hyperref}
\hypersetup{
...
1
vote
0
answers
68
views
Print links in black, but make layers inaccessible
Currently, I am using ocgx2 to make hyperlinks print in black:
\documentclass{article}
\usepackage[allcolors=red,colorlinks]{hyperref}
\usepackage[ocgcolorlinks,showingui=false]{ocgx2}
\begin{...
2
votes
0
answers
46
views
Glossaries extra, ignore hypperref link format
Hey so my intent is to use gls but leave formatting to usage so that when I use for example \emph{\gls{entry}} its displayed using \emph format instead of hyperref or \glstextformat. Also obviously I ...
0
votes
0
answers
40
views
Error with \usepackage{subfig}: Undefined control sequence [duplicate]
With this code
\documentclass[12pt,a4paper]{amsart}
\usepackage{subcaption}
\captionsetup[subfigure]{labelfont=rm}
%\usepackage{subfig} %%%%%%%%%%%%%%%%%%%%%%%%%%%% <----It gives a error
\...
0
votes
0
answers
73
views
"pdfTeX warning (ext4): destination with the same identifier" when using secnumdepth and \@addtoreset after LaTeX update
In actuarial documents we always use hyperref (and compile via pdflatex).
In some very long documents (> 500 pages) we use structures going done from chapter to subparagraph.
In those cases, it is ...
1
vote
0
answers
44
views
ocgx2 links have rugged edges or disappear entirely
I am using ocgx2 to have the hyperref links printed in black on paper. If the package is included with the ocgcolorlinks options, the text of all links becomes rugged/fringy/frayed. See this example:
\...
0
votes
1
answer
87
views
How to add hypertarget entries in the table of contents
Can the text of the table of contents be edited ? I would like to add hyperref's \hypertarget entries -- that is: text and label references -- to it.
Consider a common table of contents like
Chapter 1 ...
1
vote
0
answers
46
views
List of abbreviations with nonumberlist but hyperlink to first use
In my thesis, I would like to create a list of abbreviations in LaTeX using glossaries or glossaries-extra where the entries do not include page numbers (nonumberlist). However, the hyperlink that ...
1
vote
1
answer
121
views
Strange behavior of internal references
In a long document (memoir format) I am writting I have some trouble with some internal hyperref references (e.g. Theorem 1.4 etc). When trying to extract from my .tex file a minimal (not) working ...
2
votes
1
answer
94
views
Remove hanging paragraphs in thebibliography environment
I'm trying to format my references list using the hyperref package. By default, I get hanging paragraphs
\documentclass[twocolumn]{article}
\usepackage[a4paper,margin=1in]{geometry}
\usepackage{...
3
votes
2
answers
166
views
Why does one of my bookmarks link to the wrong page?
Some of the bookmarks in my PDF appear appear to be linked to the wrong pages. The following test document has 3 pages, and I expect the first bookmark on page 1 and the second on page 3; however, ...