# How to plot all the sectioning levels using \ref{label}?

In following MWE, the \ref command returns the actual numbering of the subsection it refers to (here "a" -- cf. red box on the picture below). How to make it to return "1.a"?

In more generic terms : how to make \ref return the number of current (sub)section, but also the ones of higher hierarchical levels?

\documentclass{scrartcl}

\renewcommand{\thesubsection}{\alph{subsection}}

\begin{document}
As we will see in §\ref{sec:interesting-subsection}, our work is amazing.
\section{Section title}
\subsection{Sub-section title}
\label{sec:interesting-subsection}
Trust me, I'm engineer.
\end{document}


(Of course, I don't want nor to change the subsection numbering style (with \renewcommand{\thesubsection}{\thesection.\alph{subsection}}), neither to add a label to the parent section and call §\ref{sec:parent-section}\ref{sec:interesting-subsection}.)

• You should have a look at scrjura. – Johannes_B Oct 22 '15 at 15:33

With a current scrartcl you can format the number independently from \thesubsection:

\documentclass{scrartcl}

\renewcommand{\thesubsection}{\thesection.\alph{subsection}}
\renewcommand\subsectionformat{\alph{subsection}\autodot\enskip}
\begin{document}
As we will see in §\ref{sec:interesting-subsection}, our work is amazing.
\section{Section title}
\subsection{Sub-section title}
\label{sec:interesting-subsection}
Trust me, I'm engineer.
\end{document}


• That is the trick I couldn't find, but was looking for. Thank you! – ebosi Oct 22 '15 at 15:45