# Creating a bracket [] macro for \ref when using hyperref


My question is, is there a way to create a macro with brackets around \ref (or a similar command that does this) instead of writing [\ref{fig:label}] everytime?

I am a relatively new user, so pardon any inconveniences.

• You should probably be a bit more explicit about what it is you are going to use this for. To me, having Theorem~\ref{key} returning Theorem~[2.3] looks very strange. – daleif Sep 12 '19 at 10:41
• What is the problem with hyperref redefining \ref? You want to remove the link? Cleveref might be useful, lots of customisation possible – Sybil Sep 12 '19 at 11:26