Re: titlesec: problema con toc e richiesta per sezioni

#86161
Up
0
Down
::


No, non uso tcobibind.
Più o meno ho risolto tutto, resta solo la questione
di come scrivere “Indice”.
Posto il preambolo, magari torna utile,
è un po’ “fantasioso”

`
\documentclass[a4paper, notitlepage, 12pt, twoside, openany]{book}
\usepackage[italian]{babel}
\usepackage{graphicx}
\usepackage{makeidx}
\makeindex
\usepackage{textcomp}
\usepackage{microtype}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{indentfirst}
\usepackage{fancyhdr}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[rilegatura=5mm]{layaureo}
\usepackage{afterpage}
\usepackage{multicol}
%\setlength{\columnsep}{-5mm}
\usepackage{verse}
\usepackage{parcolumns}
\usepackage{ifthen,changepage}
\usepackage[sc,osf]{mathpazo}

\newenvironment{citazione}
{\begin{quotation}\small}
{\end{quotation}}

\newcommand{\duevolte}{{\tiny\bfseries{[2~V.]}}}
\newcommand{\spaziostrofa}{\rule{0pt}{1ex}}
\addto\captionsitalian{%
\renewcommand{\bibname}{Riferimenti}}

\pagestyle{fancy}

\usepackage{fancyhdr}

\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
\hbox{}
\vspace*{\fill}
\vspace{\fill}
\thispagestyle{empty}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother

\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\fancyhf{}
\fancyfoot[LE,RO]{{\thepage}}

\fancyhead[RO,LE]{{\fontfamily{iwona}\small\textsc\rightmark}}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0.5pt}
\addtolength{\headheight}{0.5pt}
\addtolength{\footskip}{0.5pt}
\fancypagestyle{plain}{%
\fancyhead{} %
\renewcommand{\headrulewidth}{0pt}%
}

\renewcommand{\thesection}{{\arabic{section}}}

\newcommand{\CantoAutore}[2]{\section[#1 \fontfamily{pzc}(\small{#2})]{#1\hfill{\fontfamily{pzc}\selectfont({#2})}}\marginpar{\vspace{-32pt}\ifthenelse{\isodd{\thepage}}{\LARGE\thesection}{\hfill\LARGE\thesection}}}

\newcommand{\Canto}[1]{\section{#1}{\marginpar{\vspace{-32pt}\ifthenelse{\isodd{\thepage}}{\LARGE\thesection}{\hfill\LARGE\thesection}}}}

\newlength{\rientroneg}

\newcommand{\Rit}{\settowidth{\rientroneg}{\textsc{Rit:\ }}\hspace*{-\rientroneg}\textsc{Rit:\ }}

\newcommand{\NumStrofa}[1]{\settowidth{\rientroneg}{\large{{#1}}.\ }\hspace*{-\rientroneg}{\large{#1}}.}

\newcommand{\Volte}[1]{\ {\footnotesize{($\times$#1)}}}

\usepackage{tocloft}

\setlength{\cftbeforetoctitleskip}{0ex}
\setlength{\cftsecindent}{0pt}
\setlength{\cftsecnumwidth}{4ex}

\renewcommand{\cftsecleader}{}
\renewcommand{\cftsecafterpnum}{\cftparfillskip}

\usepackage{titlesec}

\titleformat{\chapter}[display]
{\filcenter}
{\fontfamily{iwona}\Huge\MakeUppercase{\chaptertitlename~\thechapter}}
{0pt}
{\fontfamily{iwona}\Huge\MakeUppercase}

%\titleformat{ command }[ shape ]{ format }{ label }{ sep }{ before }[ after ]

\titleformat{\section}
{\vspace{.8ex}\fontfamily{iwona}\Large\scshape}
{}{0.5em}{}

\usepackage[bookmarks]{hyperref}
\hypersetup{colorlinks=false}

\addto\captionsitalian{\renewcommand{\indexname}{Indice per categoria}}
`

Grazie mille

Go to top