Today ,I use the package hyperref to create hyperlink .However ,some links can jump to the right place while some hyperlinks cannot jump to the destination .

my mini code

  \usepackage {hyperref}
  \usepackage {graphicx}
  Hi,welcome to latex  \hyperref[fig1 ]{fig1 }
  Hi,welcome to latex
   \hyperref[fig2 ]{fig2}
  Hi,welcome to latex

  come to latex
  Hi,welcome to latex
  Hi,welcome to latex
  Hi,welcome to latex

  \end{document }

so I wonder how to.solve .

  • 2
    You need a "counter stepping mechanism" in order to fix a position where the hyperlink will go. If this is not used, then you need to place a manual \phantomsection to mark the hyper target. So, place a \phantomsection before each \label where you want that \hyperref to jump to. – Werner Jan 15 '14 at 15:27
  • @Werner,which package contains the command \plantomsection – xyz Jan 16 '14 at 2:26
  • 1
    hyperref provides \phantomsection. See the hyperref documentation and search for \phantomsection. It'll give some information on where it's used/how to use it. – Werner Jan 16 '14 at 2:47
  • @Werner,dear friend,thanks sincerely,It goes well. – xyz Jan 16 '14 at 11:16

\label is used for cross-referencing in LaTeX, which also generates a hyperlink to the corresponding unit, in this case the section (if you use \label inside an equation it would be the equation, etcetera). What you appear to need is \hypertarget+\hyperlink.

Edit in response to the comment:


\usepackage {hyperref}





\hyperlink{fig1}{fig1 }




\hypertarget{fig2}{figure 2}


\hypertarget{fig3}{figure 3!}


\hypertarget{fig1}{figure 1!}


|improve this answer|||||
  • Providing an MWE that demonstrates your solution would be helpful. – Adam Liter Jan 15 '14 at 15:31
  • sorry ,your method makes the chinese characters become the garbage english word. – xyz Jan 16 '14 at 2:24
  • 1
    Just change the article class back to what you had before. – JPi Jan 16 '14 at 2:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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