hi,
zum ersten problem.
genau das kann ich an fancyhdr nicht leiden... wenn man \pagestyle{fancy} verschiebt gibt es die section ohne nummer
zum zweiten problem. da habe ich einfach in der anleitung (erst seit 2min offen) nach \clear gesucht und kam zu abschnitt 15. da den code herauskopiert und schon geht es
Code:
\documentclass{book}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage{color}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{%
\markboth{\thechapter.\ #1}{}}
\renewcommand{\sectionmark}[1]{%
\markright{#1}}
\fancyhead{} % clear all header fields
\fancyhead[RO]{\colorbox{blue}{\parbox{1\textwidth}{\rule{0pt}{12pt}\raggedleft\textcolor{white}{\rightmark}}}}
\fancyhead[LE]{\colorbox{blue}{\parbox{1\textwidth}{\rule{0pt}{12pt}\centering\textcolor{white}{\leftmark}}}}
\fancyfoot{} % clear all footer fields
\fancyfoot[LE,RO]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancypagestyle{plain}{%
\fancyhead{} % get rid of headers
\renewcommand{\headrulewidth}{0pt} % and the line
}
\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
\hbox{}
\vspace*{\fill}
\begin{center}
\end{center}
\vspace{\fill}\thispagestyle{empty}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother
\usepackage{blindtext}
\begin{document}
\chapter{Kapitel eins}
\blindtext
\section{Section eins}
\blindtext[2]
\chapter{Chapter zwei}
\blindtext
\section{section zwei}
\blindtext[5]
\chapter{chapter drei}
\end{document}
Lesezeichen