summaryrefslogtreecommitdiff
path: root/info/german/fancyhdr/bsp4.tex
blob: 180f93341c3c30dac98c07b2c2e3f42599855946 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
\documentclass[10pt,a5paper,twoside,titlepage]{article}
\usepackage{german}
\usepackage[DIV12]{typearea}
\usepackage{fancyhdr}
\usepackage{pslatex}


\pagestyle{fancy}% muss vor \renewcommand{\sectionmark} stehen
\fancyhf{}
\fancyhead[EL]{\thepage}% gerade Seiten, links
\fancyhead[ER]{\leftmark}% gerade Seiten, rechts
\fancyhead[OL]{\rightmark}% ungerade Seiten, links
\fancyhead[OR]{\thepage}% ungerade Seiten, rechts

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

\title{Beispiele zu \texttt{fancyhdr}}
\author{Hans Friedrich Steffani}

\begin{document}
\maketitle
\section{Beispiel 4}
\begin{verbatim}
\pagestyle{fancy}% muss vor \renewcommand{\sectionmark} stehen
\fancyhf{}
\fancyhead[EL]{\thepage}% gerade Seiten, links
\fancyhead[ER]{\leftmark}% gerade Seiten, rechts
\fancyhead[OL]{\rightmark}% ungerade Seiten, links
\fancyhead[OR]{\thepage}% ungerade Seiten, rechts

\renewcommand{\sectionmark}[1]{
  \markboth{\thesection{} #1}{}
}
\renewcommand{\subsectionmark}[1]{
  \markright{\thesubsection{} #1}
}
\end{verbatim}
\input{beispiel}
\end{document}