1

With the following code:

\documentclass[a4paper,12pt]{report}
\usepackage{fontspec}
\setmainfont{EB Garamond}
\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{italian}
\PolyglossiaSetup{italian}{indentfirst=false}
\frenchspacing

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{titlesec,titletoc}

\renewcommand{\thechapter}{\scshape\roman{chapter}}
\renewcommand{\thesection}{\arabic{chapter}.\arabic{section}}
\titleformat{\chapter}[display]
  {\normalfont\fontsize{11pt}{12pt}\selectfont}{\thechapter}{0pt}{}
\renewcommand\thesection{\arabic{section}}
\titleformat{\section}
  {\normalfont\fontsize{11pt}{12pt}\selectfont}{\thesection}{1em}{}
\titleformat{\subsection}
  {\normalfont\fontsize{11pt}{12pt}\selectfont\itshape}{}{1em}{}
\titlespacing{\chapter}{0pt}{0pt}{3cm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\chapter{Brevissima storia della retorica}
\section{Il mondo antico e medievale}
\subsection{La retorica sofistica}

\end{document}

I obtain a bad tabulation of subsection, for it prodrudes from the section title: enter image description here

How is it possible to produce a correct vertical alignement? thanx

2

You can do that with \phantom{\thesection}:

\documentclass[a4paper,12pt]{report}
\usepackage{fontspec}
\setmainfont{EB Garamond}
\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{italian}
\PolyglossiaSetup{italian}{indentfirst=false}
\frenchspacing

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{titlesec,titletoc}

\renewcommand{\thechapter}{\scshape\roman{chapter}}
\renewcommand{\thesection}{\arabic{chapter}.\arabic{section}}
\titleformat{\chapter}[display]
  {\normalfont\fontsize{11pt}{12pt}\selectfont}{\thechapter}{0pt}{}
\renewcommand\thesection{\arabic{section}}
\titleformat{\section}
  {\normalfont\fontsize{11pt}{12pt}\selectfont}{\thesection}{1em}{}
\titleformat{\subsection}
  {\normalfont\fontsize{11pt}{12pt}\selectfont\itshape}{\phantom{\thesection}}{1em}{}
\titlespacing{\chapter}{0pt}{0pt}{3cm}

\begin{document}

\chapter{Brevissima storia della retorica}
\section{Il mondo antico e medievale}
\subsection{La retorica sofistica}

\end{document} 

enter image description here

1
  • Thanx! Generally, phantomsection sets an anchor at this location. But you use '\phantom '. Which is here its function?
    – user41063
    Nov 2 '18 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.