TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way I can make hyperref exclude section/chapter/etc numbering from the link in toc/lof/lot?

I want it becase I highlight the link, and number is not really a part of the section/chapter/etc name.

I searched the manual -- but could not find an option. Perhaps the only way is to redefine some hyperref external command.



\usepackage{fontspec} % enagles loading of OpenType fonts
\usepackage{polyglossia} % support for languages

% fonts:
\defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text} % without this XeLaTeX won't turn "--" into dashes
\setmonofont{DejaVu Sans Mono}










(supposed to be compiled with XeLaTeX).

share|improve this question
There is probably a cleaner solution, but I think it is possible to do this using the package titletoc and the \titlecontents command. It would be easier to answer if you could provide a minimal working example (MWE). – Corentin Feb 21 '13 at 15:26
up vote 2 down vote accepted

A somewhat convoluted method, only for the table of contents:

% store the original table of contents macros
% (they are not modified by hyperref, only \contentsline is)
% then use the etoc package to feed the l@ macros with a filtered out data



% ready to go!


\section{This is a section}
\subsection{a subsection}
\subsection{another subsection}
\section{Another section}
\section{And one more section}
\subsection{an a subsection}
share|improve this answer
It works! I don't have etoc in repository, so here's a ctan link. – Adobe Feb 21 '13 at 20:36
Despite there could be some simpler solutions with e.g. titlesec -- it's nice to have this one also -- since sometimes titlesec is not an option -- for example when it conflicts with some other packages. – Adobe Feb 21 '13 at 20:39
I am not sure about titlesec/titletoc. A brief look at titletoc has not given me any reason to believe it can separate the number from the name. Both are inside what it calls the label. – jfbu Feb 22 '13 at 21:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.