@Roman
siehe hierfancyhdr.pdfCODE
In fact the standard LATEX classes have the command \maketitle defined in such a way that a
\thispagestyle{plain} is automatically issued. So if you do want the fancy layout on a page
containing \maketitle you must issue a \thispagestyle{fancy} after the \maketitle.
das gleiche Konzept gilt auch für Inhaltsverzeichnis und Kapitelanfangsseiten.
Noch ein Tipp für alle Latex Neulinge:
Ein Projekt möglichst auf mehrere Dateien bzw. Ordner aufsplitten.
Bsp:
Ornderstruktur:
diplom/appendix/ --- Anhang
diplom/bibtex/ ------ Literaturverzeichnis
diplom/chapter/ ---- Die einzelnen Kapitel mit den Texten
diplom/code/ ------ Quellcodedateien (für informatiker)
diplom/header/ ---- headerdateien (zum Beispiel alle eingebundenen pakete, konfigurationen und eigene definitionen)
diplom/image/ ----- alle bilder
diplom/temp/ ------ temporäre Dateienund in diplom/main.tex beispielsweise
CODE
%& -aux-directory=ORNDER/diplom/temp %----- add to change output dir ----- -output-directory=ORDNER
\input{header/header}
\begin{document}
\tableofcontents
\include{chapter/einleitung}
\include{chapter/grundlagen}
\include{chapter/anwendung}
\input{appendix/appendix}
\include{bibtex/bibliography}
\end{document}
Beispiel /diplom/header/header.tex (enthält alle Pakete die eingebunden werden sollen):
CODE
% !TEX TS-program = pdflatex
% !TEX encoding = UTF-8 Unicode
% ----------------------------------- document class --------------------------------------------------
\documentclass[12pt,a4paper]{scrreprt} % use larger type; default would be 10pt
% ----------------------------------- package import --------------------------------------------------
\usepackage[utf8]{inputenc} % set input encoding (not needed with XeLaTeX)
\usepackage{geometry} % to change the page dimensions
\usepackage{graphicx} % support the \includegraphics command and options
\usepackage[ngerman]{babel} % german language support
\usepackage[babel,german=quotes]{csquotes} % german quotation mark support
\usepackage{setspace} % set the space between lines
\usepackage{booktabs} % for much better looking tables
%\usepackage{tabularx} % for better arrays (eg matrices) in maths
\usepackage{array} % for better arrays (eg matrices) in maths
\usepackage{color}
\usepackage{longtable} % for colors
%\usepackage{ltxtable}
\usepackage{paralist} % very flexible & customisable lists (eg. enumerate/itemize, etc.)
% \usepackage{verbatim} % adds environment for commenting out blocks of text & for better verbatim
\usepackage{listings}
\usepackage{subfig} % make it possible to include more than one captioned figure/table in a single float
\usepackage{xspace} % xspace inserts a whitespace if necessary
\usepackage{csquotes} % quotation mark support
\usepackage{url} % support urls
\usepackage{fancyhdr} % This should be set AFTER setting up the page geometry
% \usepackage{sectsty} % section title apperance
% \usepackage[nottoc,notlof,notlot]{tocbibind} % Put the bibliography in the ToC
% \usepackage[titles,subfigure]{tocloft} % Alter the style of the Table of Contents
% --------------------------------------------------------------------------------------------------------
\input{header/setting}
\input{header/definition}
Am Ende vom Header sind noch setting.tex(enthält die eigenen Konfigurationen der eingebundenen Pakete) und definition.tex eingebunden.
Die Konfiguration der eingebundenen Pakete ist wahrscheinlich das schwierigste an Latex, da man teilweise für jedes einzelne Paket selbst in der Dokumentation des jeweiligen Paketes nachgucken muss. Beispiel für /diplom/header/setting.tex :
CODE
% ----------------------------------- page,document and package settings --------------------------------------------------
\geometry{a4paper}
\geometry{left=3cm,right=3cm,top=2cm,bottom=3cm}
% -------------------------------------- default path to your image files
\graphicspath{{./image/}}
% -------------------------------------- space between lines
\onehalfspacing
% -------------------------------------- color definitions
%\definecolor{lightergray}{gray}{0.75}
%\definecolor{darkblue}{rgb}{0,0,0.5}
%\definecolor{lightblue}{rgb}{0.8,0.85,1}
%\definecolor{darkred}{rgb}{0.5,0,0}
\definecolor{XcodeComments}{RGB}{00,74,00}
\definecolor{XcodeKeywords}{RGB}{169,13,145,109}
\definecolor{XcodeStringstyle}{RGB}{196,26,21,81}
\definecolor{BackgroundColor}{RGB}{206,206,206,206}
% -------------------------------------- fancy header and footer settings
\pagestyle{plain}% options: empty , plain , fancy
\lhead{}\chead{}\rhead{}
\lfoot{}\cfoot{\thepage}\rfoot{}
\renewcommand{\headrulewidth}{0.4pt} %obere Trennlinie
% \fancyfoot[C]{\thepage} %Seitennummer
\renewcommand{\footrulewidth}{0.4pt} %untere Trennlinie
% \fancyfootoffset{5mm}
% -------------------------------------- section title apperance
% \allsectionsfont{\sffamily\mdseries\upshape} % (See the fntguide.pdf for font help)
% (This matches ConTeXt defaults)
% -------------------------------------- edit table of contents style
% \renewcommand{\cftsecfont}{\rmfamily\mdseries\upshape}
% \renewcommand{\cftsecpagefont}{\rmfamily\mdseries\upshape} % No bold!
% -------------------------------------- change the apperance of urls (url package)
\makeatletter
\def\url@leostyle{%
\@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\small\ttfamily}}}
\makeatother
%% Now actually use the newly defined style.
\urlstyle{leo}
% -------------------------------------- settings of listings
\lstset{language=[Objective]C}
\lstset{
basicstyle =\ttfamily \color{black}\scriptsize,
%keywordstyle =\bfseries\color{blue},
%commentstyle =\color{red},
%stringstyle =\color{green},
keywordstyle=\color{XcodeKeywords},
% identifierstyle=\color{green},
commentstyle=\color{XcodeComments},
stringstyle=\color{XcodeStringstyle},
% backgroundcolor=\color{BackgroundColor},
%basicstyle=\ttfamily\scriptsize\mdseries,
numbers=left,
breaklines=true,
stepnumber=1,
numberstyle=\scriptsize,
numbersep=10pt,
frame=single
}
% ------------------------------ title, author, date for the titlepage
\title{THEMA}
\author{AUTHOR}
% \date{} % Activate to display a given date or no date (if empty), otherwise the current date is printed
% ------------------------------ Anhang settings
\renewcommand\appendix{\par
\setcounter{section}{0}%
\setcounter{subsection}{0}%
\setcounter{figure}{0}%
\renewcommand\thesection{\Alph{section}} %
\renewcommand\thefigure{\Alph{section}.\ arabic{figure}}}
\setlength{\parindent}{0em}
zuletzt noch die /diplom/header/setting.tex (enhtält eigene Befehle und zum Beispiel Substitutionen von langen Wörtern)) [hier am Beispiel meiner Praxisarbeit übers iPhoneOs]:
CODE
% -------------------------- your own definitions, variables, and makros
% ----- dynamic (with parameter) before static is important---
\newcommand{\emqu}[1]{\emph{\enquote{#1}}}
\newcommand{\frametitle}[2]{\textbf{#1} (\emqu{#2})\textbf{:}}
\newcommand{\frametitlel}[1]{\textbf{#1:}}
\newcommand{\image}[1]{\includegraphics[width=\textwidth]{#1}}
% ----- static ---------------------------------------------------------
\newcommand{\iphoneos}{\emqu{iPhone OS}\xspace}
\newcommand{\ib}{\emqu{Interface Builder}\xspace}
\newcommand{\macos}{\emqu{Mac OS X}\xspace}
\newcommand{\objc}{\emqu{Objective-C}\xspace}
\newcommand{\iphonesdk}{\emqu{iPhone SDK}\xspace}
\newcommand{\simulator}{\emqu{iPhone Simulator}\xspace}
\newcommand{\api}{\emqu{Application Programming Interface}\xspace}
Das sind so die wichtigsten Sachen, die man eigentlich für jedes Projekt übernehmen und anpassen kann. Dann braucht man nur noch loszuschreiben. Was ja wohl das schwierigste ist
.