Is there a way to combine the \ref and \nameref commands into a single command? I want to show the section number before the title. Right now I am doing it like this:
\ref{sec:optimizations} \nameref{sec:optimizations}
The problem is I am duplicating references. I would rather have it as one command. For example:
\myref{sec:optimizations}
\newcommand\myref[1]{\ref{#1} \nameref{#1}}? – jon Jul 08 '13 at 04:18