I happens to me that you may be endeavoring to variety URLs. In that case, the url package takes care of every little thing for yourself: ref fig:mesh1 : This code will probably be substituted through the number akin to the referenced figure. label fig:mesh1 : To reference this picture http://latexonline.vefblog.net