I'm using titlesec
for customizing section titles. The problem is, that it prevents TOC from showing full (sub)subsection numbers. This applies to referring to section labels as well:
\documentclass{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{titlesec} % Allows customization of titles
\renewcommand\thesection{\arabic{section}} % Arabic numerals for the sections
\renewcommand\thesubsection{\arabic{subsection}} % Arabic numerals for subsections
\renewcommand\thesubsubsection{\arabic{subsubsection}} % Arabic numerals for subsubsections
\titleformat{\section}[block]{\Large\scshape\centering}{\thesection}{1em}{}
\titleformat{\subsection}[block]{\large\scshape}{\thesection.\thesubsection}{1em}{}
\titleformat{\subsubsection}[block]{\large\scshape}{\thesection.\thesubsection.\thesubsubsection}{1em}{}
\begin{document}
\tableofcontents
\vspace{1cm}
\hrule
\section{section 1}
\subsection{subsection 1.1}
\subsection{subsection 1.2}
\label{subsection 1.2}
\section{section 2}
\subsection{subsection 2.1}
\subsection{subsection 2.2}
Referring to subsection \ref{subsection 1.2}.
\subsubsection{subsubsection 2.2.1}
\end{document}
What do I have to change/specify in order to have the full number shown in TOC/references? Thanks in advance!