Ecco il codice:
`\documentclass[a4paper,12pt,titlepage]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage[titles]{tocloft}
\renewcommand{\cftchappresnum}{Capitolo }
%\ NO renewcommand{\cftchapaftersnumb}{\\}
\renewcommand{\cftchapaftersnum}{.}
\newlength{\mylen} % a “scratch” length
\settowidth{\mylen}{\bfseries\cftchappresnum\cftchapaftersnum} % extra space
\addtolength{\cftchapnumwidth}{\mylen} % add the extra space
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\Large\bfseries}
{\chaptertitlename\ \thechapter}{20pt}{\Large}
\titleformat{\section}[hang]
{\large\bfseries}{\thesection}{1em}{}
\makeatletter
\renewcommand\thechapter {\@Roman\c@chapter}
\renewcommand\thesection {\@arabic\c@chapter.\c@section}
\renewcommand\thesubsection {\thesection.\@arabic\c@subsection}
\renewcommand\thesubsubsection {\thesubsection.\@arabic\c@subsubsection}
\renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph}
\renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph}
\makeatother
\renewcommand{\thechapter}{\Roman{chapter}}
\begin{document}
\chapter{Titolo capitolo 1}
\section{Titolo sezione 1}
\section{Titolo sezione 2}
\end{document}`
e l’errore prodotto è:
`Capitolo I.
! Missing number, treated as zero.
\relax
l.37 \section{Titolo sezione 1}
? `
Invece `\renewcommand\thesection {thechapter.\@arabic\c@section}`
non dà alcun errore, ma il numero del capitolo nel titolo della sezione
continua a risutare in numeri romani…
mauro