how can I link figure in tex in this way, i.e.

"Fig.\,6(b)" in tex, then I click Fig.\,6(b), I will see the 6.jpg automatically

namely What should I do in




If you place a unique \label{foo} after the caption of your image, you can reference it with \ref{foo}.

A combination of a couple of packages can make it easier to get your desired format:

  • hyperref to make the cross references clickable

  • subcaption to split a figure in multiple subimages numbered with a, b etc

  • cleveref to automatically insert fig. before the figure number in the cross reference





enter image description here

| improve this answer | |
  • if I need fig.1a-1f ? Thanks ! – acsdaswe Jan 30 '19 at 22:40
  • @ABCDEMMM You can use \cref{labela,labelb,labelc,labeld,labele,labelf}, cleveref will automatically compress these into a-f if you reference all labels. – samcarter_is_at_topanswers.xyz Jan 30 '19 at 22:48
  • I got errors: tex capacity exceeded, sorry[input stack size=5000] – acsdaswe Feb 1 '19 at 0:42
  • @ABCDEMMM can you make a minimal working example (MWE) that reproduces your problem? – samcarter_is_at_topanswers.xyz Feb 1 '19 at 9:12
  • can i use subfig? if yes, then how?? – acsdaswe Mar 7 '19 at 23:27

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.