- Questo topic ha 7 risposte, 4 partecipanti ed è stato aggiornato l'ultima volta 6 anni, 5 mesi fa da .
-
Topic
-
Ciao a tutti.
Avrei il desiderio di inserire un secondo indice che contenga tutte le voci del primo ed anche altre ad esso riservate.
Purtroppo ho dovuto abbandonare shorttoc per la necessità di avere contenuti distinti in due distinti indici.Posto l’abbozzo di codice che uso.
`\documentclass[13pt,a4paper,pdftex,twoside,cleardoublepage=plain,unicode=true]{scrbook}
\usepackage[italian]{babel}
\usepackage{scrhack}
\usepackage[parts, pdfspacing, linedheaders, listsseparated]{classicthesis}
\usepackage{amsmath, amssymb, amsthm}
\usepackage{bm, bbm, bigints}
\usepackage{cancel, colortbl}
\usepackage{etoolbox}
\usepackage[T1]{fontenc}
\usepackage{fancybox, fancyvrb, float}
\usepackage[bottom]{footmisc}
\usepackage{gensymb}
\usepackage{ifthen, isomath}
\usepackage[utf8]{inputenc}
\usepackage{longtable, linearA}
\usepackage{marvosym, mathtools}
\usepackage{paralist, placeins}
\usepackage{skak}
\usepackage{textcomp, titletoc}
\usepackage{tikz, pgfplots}
\usepackage{verbatim}
\usepackage{wasysym, wrapfig}
\usepackage{xlop}
\usepackage{bookmark}
\usepackage{fullpage}
\usepackage{emptypage}
\usepackage[onehalfspacing]{setspace}\protect\renewcommand{\cftchapleader}{\footnotesize\cftdotfill{3\cftdot}}
\renewcommand{\cftchapafterpnum}{}
\protect\renewcommand{\cftsecleader}{\footnotesize\cftdotfill{3\cftdot}}
\renewcommand{\cftsecafterpnum}{}
\protect\renewcommand{\cftsubsecleader}{\footnotesize\cftdotfill{3\cftdot}}
\renewcommand{\cftsubsecafterpnum}{}\titleformat{\section}{\normalfont\bfseries}{\thesection}{10pt}{}
\titleformat{\subsection}{\normalfont\bfseries}{\thesubsection}{10pt}{}
\titleformat{\subsubsection}{\normalfont\bfseries}{\thesubsubsection}{10pt}{}\titlecontents{part} %
[26pt]
{\vspace{4pt}\normalfont\scshape\large} % above – formattazione generale
{\contentslabel[\normalfont\Large\thecontentslabel]{26pt}} %
{\normalfont\Large} %
{\normalfont\cftchapleader\normalsize\contentspage}\titlecontents{chapter} %
[26pt] %dx
{\vspace{4pt}\normalfont\normalsize} %su \bf
{\contentslabel[\normalfont\large\thecontentslabel]{26pt}} %sx \bf
{\normalfont\large\hspace{-26pt}} %hidden chapter
{\normalfont\cftchapleader\normalsize\contentspage} % \bf\titlecontents{section} % 26(chapter) + 30 = 56
[60pt] % dx
{\vspace{4pt}\normalfont\small} %
{\contentslabel[\normalfont\small\thecontentslabel]{34pt}} % sx
{\normalfont\small}%
{\normalfont\cftsecleader\small\contentspage}\titlecontents{subsection} % 60(section) + 30 = 90
[90pt] % dx
{\vspace{2pt}\normalfont\footnotesize} %
{\contentslabel[\normalfont\scriptsize\thecontentslabel]{30pt}} % sx
{\normalfont\scriptsize} %
{\normalfont\cftsubsecleader\scriptsize\contentspage}%IMPOSTAZIONI PDF
\hypersetup
{
pdfpagemode = UseOutlines,
colorlinks = true,
citecolor = black,
linkcolor = black,
urlcolor = black
}\begin{document}
\pagestyle{scrplain}
\ifoot[]{}
\cfoot[\pagemark]{\pagemark}
\ofoot[]{}\pdfbookmark[1]{Indice}{Indice}
\setcounter{tocdepth}{1}
\tableofcontents\cleardoublepage
\pdfbookmark[1]{Indice dettagliato}{Indice dettagliato}
\newlistof{Index}{toc2}{Indice dettagliato}
\listofIndex\makeatletter
\apptocmd{\@chapter} {\protect\addcontentsline{toc2}{chapter} {\thechapter}} {} {}
\apptocmd{\@section} {\protect\addcontentsline{toc2}{section} {\thesection}} {} {}
\apptocmd{\@subsection} {\protect\addcontentsline{toc2}{subsection}{\thesubsection}} {} {}
\makeatother\chapter{A}
\section{B}
\section{C}\addcontentsline{toc2}{chapter} {XXXXXXX}
\chapter{D}
\section{E}
\section{F}\end{document}
`Avrei necessità di un’istruzione del tipo
` \apptocmd{\@chapter} {\protect\addcontentsline{toc2}{chapter} {\thechapter}} {} {}. `
Questa ovviamente nel secondo indice non inserisce correttamente numero ed etichetta.Come al solito, mille grazie a tutti. Ciao
- Devi essere connesso per rispondere a questo topic.