Re: thispagestyle{fancy} non funziona!

#25854
Up
0
Down
::

`
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter\ – #1}{}}
\fancyhead[RO]{\footnotesize\leftmark}
\fancyhead[LE]{\footnotesize\rightmark}
\fancyfoot[C]{- \thepage\ -}
\renewcommand{\headrulewidth}{0.0pt}

\fancypagestyle{plain}{%
\fancyhf{} % leva l'intestazione
\renewcommand{\headrulewidth}{0pt} % e la linea
\renewcommand{\footrulewidth}{0pt} % e la linea
\fancyfoot[C]{\thepage}
}`
Ora non ho il mio sorgente LaTex sottomano ma posso aggiungere a memoria i principali pacchetti che uso: classe book, geometry, tocloft, titlesec, subfig, fancyhdr, quelli relativi alle tabelle.. basta, non mi c’è altro, mi sembra.
Il problema appunto è che lo stile rimane plain. Se commento l’istruzione stylepage{plain} viene applicatato a tutto il documento fancy, ma nel TOC avrei l’esigenza di avere lo stile plain.. Da cosa potrebbe dipendere, secondo voi? 😕
Grazie e buona serata!

Nulla ti vieta di crearti più testatine… se fai`\newcommand{\testatinauno}{\fancyhead[RO]{\footnotesize\leftmark}
\fancyhead[LE]{\footnotesize\rightmark}
\fancyfoot[C]{- \thepage\ -}
\renewcommand{\headrulewidth}{0.0pt}

\fancypagestyle{plain}{%
\fancyhf{} % leva l'intestazione
\renewcommand{\headrulewidth}{0pt} % e la linea
\renewcommand{\footrulewidth}{0pt} % e la linea
\fancyfoot[C]{\thepage}
}}`e`\newcommand{\testatinadue}{\fancyhead[RO]{\footnotesize\leftmark}
\fancyhead[LE]{\footnotesize\rightmark}
\fancyfoot[C]{- \thepage\ -}
\renewcommand{\headrulewidth}{0.0pt}

\fancypagestyle{plain}{%
\fancyhf{} % leva l'intestazione
\renewcommand{\headrulewidth}{0pt} % e la linea
\renewcommand{\footrulewidth}{0pt} % e la linea
\fancyfoot[C]{\thepage}
}}`ovviamente con diverse definizioni, ti basta mettere \testatinauno quando vuoi il primo tipo, e \testatinadue quando vuoi il secondo. Ovviamente dopo il begin document ti basta mettere una sola volta \pagestyle{fancy} e sei a posto.

Buona giornata

Go to top