Re: Problema indice

#14259
Up
0
Down
::

Questo è grosso modo il main, c’è qualcosa che non va?

Direi di si: usi comandi di fancyhdr senza richiamare il pacchetto (probabilmente l’hai fatto ed hai sbagliato a copia-incollare) e utilizzi comandi che andrebbero dati nel preambolo all’interno dell’ambiente document, tanto per dirne un paio. Mai usare `\setcounter{page}{1}`
Prova il seguente codice:`\documentclass[italian,11pt,oneside]{book}
\usepackage{babel}

% impostazioni di fancyhdr
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ ~~ #1}}

\fancyhead[LO]{\bfseries\rightmark}
\fancyhead[RE]{\bfseries\leftmark}

\pagestyle{myheadings}
\fancyhf{}
\fancyhead[LO]{\rightmark}
\fancyfoot[LE,RO]{\bfseries\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

% Spaziatura
\usepackage{setspace}
\doublespacing

\begin{document}
\begin{titlepage}

%%% Frontespizio %%%

\end{titlepage}

\frontmatter
\pagestyle{fancy}

\tableofcontents

\mainmatter
\pagestyle{myheadings}

%%% testo %%%

\backmatter

%%% backmatter %%%

\end{document}`

Ciao.

Go to top