I want to add subsubsections with alternative numbering (A1..A3, B1..B3, etc.) to my document. These subsubsections should be added to the ToC, but the native numbering should be suppressed, the alternative numbering should come onto the numberline.
I managed to do this with the titlesec package, but the breaks the \nameref{} command. A fix was suggested in this answer, but that makes the starred section also show up in the ToC, with original section-numbering.
How can I use the \nameref{} command for starred sections using the titlesec-package?
MWE:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage{titlesec}
\titleformat{\subsubsection}[hang]{\normalfont\bfseries}{}{0pt}{\tempSectNumber\quad}
\newcommand{\mySubSubSection}[1]{\def\tempSectNumber{\thesubsubsection}\subsubsection{#1}\label{s:#1}}
\newcommand{\myStarredSubSubSection}[1]{\def\tempSectNumber{X1}\subsubsection*{#1}\label{s:#1}\addcontentsline{toc}{subsubsection}{\protect{\numberline{X1}}#1}}
\begin{document}
\tableofcontents
\setlength{\parindent}{0pt}
\mySubSubSection{Normal}
\myStarredSubSubSection{Special}
Reference to Normal: \autoref{s:Normal}/\nameref{s:Normal}\par
Reference to Special: \autoref{s:Special}/\nameref{s:Special}\par
\end{document}
Desired outcome:
Contents
0.0.1 Normal . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
X1 Special . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
0.0.1 Normal
X1 Special
Reference to Normal: subsubsection 0.0.1/Normal
Reference to Special: subsubsection 0.0.1/Special

\myStarredSubSubSectionto a two variable command, giving in the section number manually and set that as label. That prevents doom when using special characters in the title.
– Gauwain Dec 28 '15 at 13:47\makeatletter \newcommand{\myStarredSubSubSection}[2]{% \def\tempSectNumber{#2}% \subsubsection*{#1}% \addtocounter{subsubsection}{-1}% \def\@currentlabelname{#1}% \def\@currentlabel{\thesubsubsection}% \label{#2} \addcontentsline{toc}{subsubsection}{\protect{\numberline{#2}}#1}% } \makeatother