0

I am trying to refer to some tables that I have labeled, but with some of them this warning appears 'Warning: Suppressing empty link'. My document class is an 'article' and I am using unnumbered sections and subsections. I have this problem with just some tables (not with all of them) and not with figures, do not really know why. I am using the \hyperref package, eliminating it everything seems fine but obviously the references does not work. I am also using many other packages, here it is the list:

\documentclass[a4paper,10pt,titlepage,fleqn]{article}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{makeidx}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{multirow}
\usepackage[table]{xcolor}
\usepackage{float}
\usepackage{booktabs}
\usepackage{subfigure}
\usepackage{hyperref}
\author{Marco Tilocca}
\title{-----}
\makeindex
\graphicspath{{./immagini/}}
\everymath{\displaystyle}

Do someone know how to fix this problem? Edit: I am using TexMaker

2
  • Welcome to TeX.SX! Please prepare a minimal working example (MWE) that allows others to reproduce the output you get and add it to your question.
    – leandriis
    Commented Nov 22, 2020 at 18:05
  • May not be directly relevant, but when I switched from one (conference) template to another, sections became unnumbered, leading to that “suppressing empty link” warning for each \ref{} to a section label. Using \refname{} seemed a reasonable solution. The text which had been “...see Section 5” now reads “...see Section Future Work”. Commented Mar 8, 2023 at 18:31

1 Answer 1

2

I guess, the problematic tables are inside of an unnumbered \section and you placed the \label before the \caption command.

Please compare the output of the two different sections in the following example. The first table is correct and get referenced correctly, the second table contains \caption and \label in the wrong order, thus resulting in the warning "Suppressing empty link" that you also observe.

\documentclass{article}
\usepackage{hyperref}

\begin{document}
\section*{unnumbered section header}

\begin{table}[htbp]
\caption{a table caption}
\label{tab:example-key} % label is placed after the caption command --> correct
\end{table}

\section*{another unnumbered section header}

\begin{table}[htbp]
\label{tab:incorrect-example-key} % label is placed before the aption command --> wrong
\caption{a table caption}
\end{table}

Correct reference to the table: \ref{tab:example-key}

Wrong reference to the table: \ref{tab:incorrect-example-key}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .