PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Probleme mit "fancyheadings"



Marky Mark
31-05-2006, 15:27
Hallo.

Hab so meine Problem mit dem Package fancyheadings. Ich kann machen was ich will, ich kriegs einfach nicht hin, dass mir die gewünschten Kopfzeilen erstellt werden. Was mach ich falsch?
Wär nett, wenn mir jemand helfen könnte.

----------------------------------------------------------------
\documentclass[a4paper,11pt,english,pdftex,twopage]{book}
\usepackage{graphicx}

%% packages for using german characters
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
%%\usepackage{ngerman}

%% other package
\usepackage[english]{babel}
\usepackage{pslatex}
\usepackage{times,latexsym}
\usepackage{mathptmx}
\usepackage{multirow}

% packages for figures and graphics
%\usepackage{floatfig}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{subfigure}

\usepackage{nameref}

% package for mathematical formulas
\usepackage{amsmath}
% packages for tables
\usepackage{tabularx}
\usepackage{supertabular}
% package for multirows in tables
\usepackage{multirow}
% packge for code listings
\usepackage{listings}
% show introduction, table of figures and bibliography in toc
\usepackage{tocbibind}

%
\usepackage{boxedminipage}

% verbatime-like environment
\usepackage{alltt}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\ref}[1]{\ref{#1} (p. \pageref{#1})}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% set default header with fancyheadings
\usepackage{fancyheadings}
\pagestyle{fancyplain}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter. #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection. #1}}
\renewcommand{\subsectionmark}[1]{\markright{\thesubsection. #1}}

% header contains chapter and section or subsection headline
% pagenumber is displayed as well


\headrulewidth 0.4pt
\chead{}
\rhead[\fancyplain{}{\leftmark}]{\fancyplain{}{\thepage}}
\lhead[\fancyplain{}{\thepage}]{\fancyplain{}{\rightmark}}
\newcommand{\LHEAD}[0]{\lhead[\fancyplain{}{\footnotesize\thepage}]{\fancyplain{}{\footnotesize\rightmark}}}
\newcommand{\RHEAD}[0]{\rhead[\fancyplain{}{\footnotesize\leftmark}]{\fancyplain{}{\footnotesize\thepage}}}
\LHEAD{}
\RHEAD{}

% display pagenumber in the center of plainpages
\footrulewidth 0pt
\cfoot{\fancyplain{\thepage}{}}
\rfoot{}
\lfoot{}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% german style indention
\parindent=0cm
%\parskip=3mm

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

\pagestyle{empty}

%\input{frontpage}
%\newpage
\input{titlepage}
\newpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{ TITLE }
\author{Marky Mark}

\newpage
\maketitle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagestyle{plain}
%% number introduction in roman numbers -> you still need to set \pagenumbering{arabic} in your first included chapter
\pagenumbering{Roman}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tableofcontents
\listoffigures
\listoftables
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\include{acknowledgements}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% main part of the document
\chapter{Halli}
\section{Hallo}
Dies ist ein Testdokument
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% appendix
%\appendix


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% bibliography (using bibtex)
%\nocite{*}
%\bibliographystyle{acm}
%\bibliographystyle{ieeetr}
%\bibliographystyle{plain}
%\bibliography{test}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\include{statement}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\cleardoublepage
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Arne1980
31-05-2006, 15:50
Hallo,

ich glaube, Du musst in Deinem Dokument irgendwann auch mal die fancyheadings-Kopfzeilen aktivieren.
Du definierst am Anfang des Dokuments \pagestyle{empty} und danach \pagestyle{plain}. Wenn Du fancyheadings haben willst, musst Du ab der Seite, ab der das gelten soll \pagestyle{fancy} aktivieren. Oder eben \pagestyle{fancyplain}.
Hab leider gerade keine Zeit, das auszuprobieren, wäre aber ein erster Schritt.
Gruß

Arne

RedCloud
31-05-2006, 17:37
Hallo.

Hab so meine Problem mit dem Package fancyheadings. Ich kann machen was ich will, ich kriegs einfach nicht hin, dass mir die gewünschten Kopfzeilen erstellt werden. Was mach ich falsch?
Wär nett, wenn mir jemand helfen könnte.

----------------------------------------------------------------
\documentclass[a4paper,11pt,english,pdftex,twopage]{book}
\usepackage{graphicx}

%% packages for using german characters
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
%%\usepackage{ngerman}

%% other package
\usepackage[english]{babel}
\usepackage{pslatex}
\usepackage{times,latexsym}


sowohl pslatex als auch times sind veraltete Pakete und gemeinsam machen sie schon gar keinen Sinn ...



\usepackage{mathptmx}
\usepackage{multirow}

% packages for figures and graphics
%\usepackage{floatfig}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{subfigure}


das aktuelle Paket heißt subfig




\usepackage{nameref}

% package for mathematical formulas
\usepackage{amsmath}
% packages for tables
\usepackage{tabularx}
\usepackage{supertabular}
% package for multirows in tables
\usepackage{multirow}
% packge for code listings
\usepackage{listings}
% show introduction, table of figures and bibliography in toc
\usepackage{tocbibind}

%
\usepackage{boxedminipage}

% verbatime-like environment
\usepackage{alltt}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\ref}[1]{\ref{#1} (p. \pageref{#1})}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% set default header with fancyheadings
\usepackage{fancyheadings}


das aktuelle Paket heißt fancyhdr, fancyheading ist uralt !



\pagestyle{fancyplain}


du meinst \pagestyle{fancy}
fancyplain ist nur für Kapitelanfangsseiten -> Doku




\renewcommand{\chaptermark}[1]{\markboth{\thechapter. #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection. #1}}
\renewcommand{\subsectionmark}[1]{\markright{\thesubsection. #1}}

% header contains chapter and section or subsection headline
% pagenumber is displayed as well


\headrulewidth 0.4pt


\headrulewidth ist keine Länge, sondern ein Makro, also \renewcommand



\chead{}
\rhead[\fancyplain{}{\leftmark}]{\fancyplain{}{\thepage}}
\lhead[\fancyplain{}{\thepage}]{\fancyplain{}{\rightmark}}
\newcommand{\LHEAD}[0]{\lhead[\fancyplain{}{\footnotesize\thepage}]{\fancyplain{}{\footnotesize\rightmark}}}
\newcommand{\RHEAD}[0]{\rhead[\fancyplain{}{\footnotesize\leftmark}]{\fancyplain{}{\footnotesize\thepage}}}
\LHEAD{}
\RHEAD{}


du hast vermitlich gar nicht verstanden, was fancyplain bedeutet ...

rc