- Questo topic ha 0 risposte, 1 partecipante ed è stato aggiornato l'ultima volta 7 anni, 10 mesi fa da .
-
Topic
-
Con questo codice
`\documentclass[a4paper,twoside,11pt]{report}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{italian}
\PolyglossiaSetup{italian}{indentfirst=false}\usepackage{titlesec}
\usepackage{etoc}\renewcommand{\thechapter}{\scshape\roman{chapter}}
\renewcommand\thesection{\arabic{section}}\titleformat{\chapter}[display]
{\normalfont\fontsize{11}{12}\selectfont}
{\scshape\thechapter}
{0pt}
{}
\titleformat{\section}
{\normalfont\fontsize{11}{12}\selectfont}
{\thesection}
{1em}
{}
\titleformat{\subsection}
{\normalfont\fontsize{11}{12}\selectfont\itshape}
{}
{1em}
{}\titlespacing{\chapter}
{0pt}{0pt}{3cm}\etocsetstyle{chapter}
{}
{\addvspace{2ex}\leavevmode\leftskip 0cm\relax}
{\ifShowPage % conditional deciding the display or not of the page number
\llap{\makebox[1.5cm][r]{\mdseries\etocpage}\hspace{.5cm}}%
\fi
\normalsize\makebox[1cm][r]{\etocnumber\phantom{.}}\hspace{10pt}%
\parbox[t]{\dimexpr\linewidth-1cm-27pt\relax}{\etocname\par}\hfill\par
}
{}\etocsetstyle{section}
{}
{\leavevmode\leftskip 0cm\relax}
{\llap{\makebox[1.5cm][r]{\mdseries\etocpage}\hspace{.5cm}}%
\normalsize\makebox[1cm][r]{\etocnumber.}\hspace{10pt}%
\parbox[t]{\dimexpr\linewidth-1cm-27pt\relax}{\etocname\par}\hfill\par
}
{}\newif\ifShowPage
\begin{document}
\tableofcontents
\chapter{Chapter One}
\section{Section One}
\section{Section Two}
\section{Section Three}
\section{Section Four}\chapter{Chapter Two}
\section{Section One}
\section{Section Two}
\section{Section Three}
\section{Section Four}\chapter{Chapter Three}
\section{Section One}
\section{Section Two}
\section{Section Three}
\section{Section Four}\end{document}`
noterete che il primo titolo di capitolo sporge rispetto agli altri.
Se elimino babelshorthands=true ritorma a posto,
ma ovviamente mi fa tutti i rientri del testo del primo paragrafo.
Stesso codice con pdlatex , mutatis mutandis, dà l’indice perfetto.
Come posso eliminare il difetto e cioè eliminando la sporgenza anomala?
mantenendo babelshorthands=true ?[attachment=2131]index.png[/attachment]
grazie
m
- Devi essere connesso per rispondere a questo topic.