- Questo topic ha 9 risposte, 3 partecipanti ed è stato aggiornato l'ultima volta 15 anni, 2 mesi fa da .
-
Topic
-
Carissimi, ancora una volta problemi con fancyhdr! 🙁Dunque, sto lavorando su un documento con questa esatta struttura:
`% !TEX encoding = UTF-8
% !TEX program = xelatex
% !TEX spellcheck = gr_GR
\documentclass[12pt,a4paper,openright]{book}
\usepackage{geometry} %%MARGINI
\setlength{\parindent}{0.5cm}
\usepackage{setspace} %% PER MODIFICARE L'INTERLINEA
\onehalfspacing %% INTERLINEA 1,5
%\linespread{1.3} %% INTERLINA 1,5 (1.6 = DOPPIA)
%\raggedbottom %% Evita di 'stirare' il testo sulla verticare della pagina
\usepackage{longtable} %%PER TABELLE DIVISIBILI SU PIÙ PAGINE
%\setlength{\tabcolsep}{2mm}
%\addtolength{\tabcolsep}{2mm}
%\renewcommand\arraystretch{1.5}%distanzia le righe della tabella
\usepackage{tabularx}
\usepackage{tikz}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\author{Domenico Cufalo}
\title{PRAEFATIO}
\date{}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{fontspec} %% CARICA I FONTS
\usepackage{xunicode} %% provides access to latin accents and many other characters in the Unicode lower plane
\setmainfont[Ligatures=TeX,Numbers=OldStyle]{Linux Libertine O}
%\setmainfont[Ligatures=TeX,Numbers=OldStyle]{Doc}
\let\super=\textsuperscript%\usepackage{microtype}
%\usepackage[protrusion=true]{microtype}\usepackage{newunicodechar}
\newunicodechar{⌈}{{\ceilfont ⌈}}
\newunicodechar{⌉}{{\ceilfont ⌉}}
\newfontfamily{\ceilfont}{Doc}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{polyglossia}
\setmainlanguage{latin}
\setotherlanguage{italian}
\setotherlanguage[variant=polytonic]{greek}
%\setotherlanguage{english}
%\setmainlanguage[variant=polytonic]{greek}
%\setotherlanguage{latin}\XeTeXinputnormalization=1
\newXeTeXintercharclass\combiningchar
\XeTeXcharclass”0301=\combiningchar
\XeTeXinterchartoks 0 \combiningchar = {\penalty10000}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% TITLES
\usepackage{titlesec,itnumpar}
\titleformat{\chapter}
{\centering}%format
{}%label
{00pt}%sep
{\large\MakeUppercase}%before
%{\center\LARGE}{\chaptertitlename\ \thechapter}{20pt}{\Large\MakeUppercase}
\titleformat{\section}
{\itshape}
{\normalfont\thesection.}
{.5em}
{}
\titleformat{\subsection}
{\itshape}
{\thesubsection.}
{.5em}
{}
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesubsection}{\thesection.\arabic{subsection}}
%\titlespacing*{command}{left}{beforesep}{aftersep}%\titlespacing{\section}{0pt}{*2}{*2}
\titlespacing*{\section}{0pt}{50pt}{10pt}
%\setcounter{secnumdepth}{0}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% HEADERS AND FOOTERS CUSTOMIZATION
\usepackage{fancyhdr}
\fancyhf{}
\pagestyle{fancy}
\pagenumbering{roman}
\fancyfoot{}
\setlength{\headheight}{14.5pt}
\fancyhead[LE,RO]{\hspace{0.5cm}\thepage\hspace{0.5cm}}
\fancyhead[LO]{\hspace{0.5cm}\footnotesize\itshape\nouppercase{\thesection. \rightmark}}
\fancyhead[RE]{\footnotesize\itshape\nouppercase{\leftmark}\hspace{0.5cm}}\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{makeidx}
\makeindex\begin{document}
\maketitle
\clearpage{\pagestyle{empty}\cleardoublepage}
\chapter{Primo capitolo}\markboth{\itshape{Primo capitolo}}{\itshape{Primo titolo}}
\thispagestyle{empty}
XXXXX
\clearpage{\pagestyle{empty}\cleardoublepage}
\chapter{Secondo capitolo}\markboth{\itshape{Secondo capitolo}}{\itshape{Secondo capitolo}}
\thispagestyle{empty}
XXXXX
\clearpage{\pagestyle{empty}\cleardoublepage}
\chapter{Terzo capitolo}\markboth{\itshape{Terzo capitolo}}{\itshape{Terzo capitolo}}
\thispagestyle{empty}
\section{Capitolo 3 sezione 1}\markright{\itshape{Capitolo 3 sezione 1}}
\renewcommand\arraystretch{1.5}%distanzia le righe della tabella
\small\begin{longtable}{p{4cm}p{0.66\textwidth}}%\setlength{\tabcolsep}{0mm}
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
\end{longtable}
\renewcommand\arraystretch{1}%distanzia le righe della tabella\section{Capitolo 3 sezione 2}\markright{\itshape{Capitolo 3 sezione 2}}
\renewcommand\arraystretch{1.5}%distanzia le righe della tabella
\small\begin{longtable}{p{4cm}p{0.66\textwidth}}%\setlength{\tabcolsep}{0mm}
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
XXXXX & XXXXX \\
\end{longtable}
\renewcommand\arraystretch{1}%distanzia le righe della tabella
\end{document}`Ora, questo documento non dà problemi, ma il suo “gemello” (il mio file) mi sta facendo ammattire.
In pratica, il titolo nella testatina corrispondente a “Capitolo 3 sezione 2”, si presenta nella forma2.2 Capitolo 3 sezione 2
e NON in quella attesa
2. Capitolo 3 sezione 2
Ho fatto varie prove, senza successo. Tra l’altro, anche disabilitando la stampa del numero di capitolo sulla testatina, questo scompare in corrispondenza di “Capitolo 3 sezione 1”, ma continua a comparire, anche se naturalmente non “raddoppiato”, nel mio.
Ripeto: il codice che ho prodotto sopra, non genera il problema da me descritto, ma esso ricalca esattamente, tolto il contenuto, la struttura del mio documento.
Insomma, come vi spiegate questo strano fenomeno? Vi è mai capitato?
Bah!
Ciao e grazie anticipate,
DomenicoP.S.: spero che queste informazioni siano sufficienti a capire il problema.
- Devi essere connesso per rispondere a questo topic.