I am unable to give the figure a name or figure number using the following latex command for, instance: $\vcenter{\hbox{\includegraphics[height=6.6em]{C:/Users/abc/Documents/g2}}}$. Thanks

  • 1
    Can you please make a complete minimal example? What's the reason for \vcenter? Are you using a figure environment? – egreg Mar 15 at 18:28
  • @egreg $\vcenter$ is used just to center the argument and g2 is my figure's file name in my computer saved in C drive. – gete Mar 15 at 18:47
  • 1
    That's clear. What's needed is to know where and how you use those commands. Please, add some context. – egreg Mar 15 at 18:49
  • @David Carlisle sorry i am not familiar in drawing figures in normal latex constructs. – gete Mar 15 at 19:10
  • @egreg I am using a software to draw figures and save into my computer and using the above latex commands, i am able to include my figures in latex file which runs successfully, but i couldn't name the figure and call it in the text to refer – gete Mar 15 at 19:15

enter image description here

  \caption{An example image\label{eximg}}

Some text, see Figure \ref{eximg}.


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.