# How to get rid of \ref's parentheses (e.g., for subfigure)

I use \ref to refer to a subfigure and it shows like this in my text:

This thing (Figure 5(b))


Double parentheses appear! I want this style:

This thing (Figure 5b)


How to make it happen?

-
What package are you using the produce your subfigures? –  Werner Jul 12 '12 at 17:41
Welcome to TeX.SE! Which package (or packages) related to the creation of subfigures do you load in your document? There's subfigure, subfig, subcaption, and probably a few others... Knowing exactly which package you use will be important for figuring out the correct method. –  Mico Jul 12 '12 at 17:42
I use subfigure package . Thanks! –  flyingbin Jul 12 '12 at 17:44

To suppress just the parentheses around the subfigure's (alpha-style) "number", all you have to do is issue the command

\renewcommand\thesubfigure{\alph{subfigure}} % default: "(\alph{subfigure})"


preferably in the document's preamble. However, if the resulting look of cross-references to these objects -- 2c, 5a, etc. -- is too sparse-looking for your taste, you may also want to add the following commands to insert a dot (period) between the figure-number and the subfigure-letter:

\makeatletter
\renewcommand{\p@subfigure}{\thefigure.} % default: "\thefigure" (without the ".")
\makeatother


to get 2.c, 5.a, etc.

-