TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

I have use the \ref function to make an internal reference to another section with \label and \ref{} but my reference is invisible but click able.

Someone has the same problem?

EDIT BY LOCKSTEP: Strange indeed. Here's a MWE (and yes, there's a click able link):





\section{Master thesis}\label{sec:th}

\cventry{year--year}{Job title}{Employer}{City}{}{See section \ref{sec:th}}

share|improve this question

migrated from crypto.stackexchange.com Oct 21 '11 at 8:26

This question came from our site for software developers, mathematicians and others interested in cryptography.

Welcome to TeX.sx! Your question was migrated here from crypto.stackexchange.com. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. Also, please add a minimal working example (MWE) that illustrates your problem. – N.N. Oct 21 '11 at 8:28
Actually, it was first posted on Stack Overflow, and wrongly migrated to Cryptography because of me flagging it wrong (mis-click). Sorry. – Paŭlo Ebermann Oct 21 '11 at 13:40
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. – Martin Scharrer Oct 21 '11 at 15:40
As per link formatting colors underlines in cv I can get the box to show up with hypersetup{pdfborder = 0 0 1} after \begin{document}, but this is not very useful to symbolize a link. – Peter Grill Oct 21 '11 at 20:54
But, what should the now invisible link contain to make it visible? Sections in moderncv don't produce numbering, so there's no string to be picked up to generate a reference; they just contain \phantomsection to create an anchor. – Gonzalo Medina Oct 21 '11 at 21:01

The moderncv document class defines a section without a counter. Here's the \section command extracted from moderncv.cls:

% usage: \section{<title>}
  \phantomsection{}% reset the anchor for hyperrefs
  \par\nobreak\vskip 1ex\@afterheading}% to avoid a pagebreak after the heading

Correct referencing is obtained via hyperref's \phantomsection. Hence, \ref returns nothing other than a correct internal hyperlink. This is also evident from the fact that the sections in moderncv is not typeset with a numbered counter.

As such, if you want to have a description associated with the link, you need to use \hyperref[<lab>]{<text>} where <lab> is your label, and <text> is what you want to be clickable. For example, using the posted MWE, you could use

\cventry{year--year}{Job title}{Employer}{City}{}{See section \hyperref[sec:th]{Master thesis}}

enter image description here

share|improve this answer

Your Answer


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