[Tex/LaTex] Using non-numeric ((sub)sub)sections changes the way of how \ref is displayed

cross-referencingnumberingsectioning

I have some issue with LaTeX and I haven’t found a solution yet. So hopefully some of you can help me.

I'm writing a big article with four levels of sectioning (so I'm using paragraph for the lowest level). Furthermore in my faculty it is common to have the sections in Alph, subsections in Roman, subsubsections in arabic and paragraphs in alph. This didn't seem to be a problem by redefining \thesection, etc.

But now I'm struggling with a problem, when referencing. In the subsequent example I have a reference and if I don't redefine \the..., then the last sentence in the PDF will be You find some information about it in 1.1.1.. So I expected to have the same structure after redefining: You find some information about it in A.I.1., but instead I get You find some information about it in 1. How can I achieve my desired output?

I faced the same problem with fancy, but I could fix it by redefining \sectionmark, \subsectionmark and \subsubsectionmark. Maybe there is some similar solution for my \ref problem?
I'm using the hyperref package, if this is of any importance.

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[ngermanb]{babel}

\renewcommand \thesection {\Alph{section}}
\renewcommand \thesubsection {\Roman{subsection}}
\renewcommand \thesubsubsection {\arabic{subsubsection}}

\begin{document}
\section{My first Section}\label{sec:s1}
\subsection{My first Subsection}\label{sec:s1-ss1}
\subsubsection{My first Subsubsection}\label{sec:s1-ss1-sss1}
This is some text, pretty similar to \emph{lorem ipsum}.

\section{My first Section}\label{sec:s2}
Have you ever heard about \emph{lorem ipsum}? You find some information about it
in \ref{sec:s1-ss1-sss1}.
\end{document}

Best Answer

The following redefinition will work. It is also the way the standard \the... defined.

\renewcommand \thesection {\Alph{section}}
\renewcommand \thesubsection {\thesection.\Roman{subsection}}
\renewcommand \thesubsubsection {\thesubsection.\arabic{subsubsection}}
Related Question