# Customizing referencing

Suppose, I want to add a \bullet just before every reference(like ). How can I do that?

EDIT: Say, I use a \ref{key}, when the \label{key} points to a section, it is shown only as a number:

\documentclass{article}

\begin{document}
abc \ref{key}

\section{something \label{key}}
xyz
\end{document}


Now, assume I want to put a \bullet before the number. What should I do?

I had some random tests with \renewcommand, but none of them succeeded.

-
Do you mean citation or a reference of an equation? Please provide a complete minimal working example. – Marco Daniel Feb 2 '14 at 14:25

If you want this result every time you use \ref you can do the following:

\let\oldref\ref
\renewcommand{\ref}{\textbullet\oldref}


MWE (note that the \label goes outside the \section)

\documentclass{article}

\let\oldref\ref
\renewcommand{\ref}{\textbullet\oldref}

\begin{document}
abc \ref{key}

\section{something}\label{key}
xyz
\end{document}


Output:

If you are loading hyperref, this package redefines the command \ref at the beginning of the document, so if you want to work in this case you have to substitute the above lines with:

\AtBeginDocument{%
\let\oldref\ref%
\renewcommand{\ref}{\textbullet\oldref}%
}

-
Well, that worked for the MWE, but not for my original document. – pushpen.paul Feb 2 '14 at 15:39
@pushpen.paul Then add something in your MWE that can interfere with it. – karlkoeller Feb 2 '14 at 15:41
\usepackage{hyperref} \AtBeginDocument{\let\oldref\ref\renewcommand{\ref}{\textbullet\oldref}} – Marco Daniel Feb 2 '14 at 15:57
Using Marco Daniel's update, it works. – pushpen.paul Feb 2 '14 at 16:08
@MarcoDaniel Thanks for the comment, I was outdoor and I'm seen it now. – karlkoeller Feb 2 '14 at 18:39