How can I put a label on \thesubsection without using \subsection?
MWE:
\documentclass{article}
\usepackage[english]{babel}
\newcommand*{\subsectioncounter}{\stepcounter{subsection}\thesubsection}
\begin{document}
\section{A section}
\subsection{An un-numbered subsection}
\subsectioncounter\label{somesubsection}\quad Some text
\subsection{Later in the document}
See \ref{somesubsection}. % I want this to print 1.1, not the section label.
\end{document}
\refstepcounterinstead of\stepcounter– Willie Wong Nov 17 '20 at 05:02