-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample20.tex
87 lines (65 loc) · 2.22 KB
/
example20.tex
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
\documentclass[openany]{book}
\usepackage{lipsum}
\usepackage{boxedminipage}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]%
{\markboth{\MakeUppercase{\thechapter.\ #1}}{}}
\renewcommand{\sectionmark}[1]%
{\markright{\MakeUppercase{\thesection.\ #1}}}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\newcommand{\helv}{%
\fontfamily{qhv}\fontseries{b}\fontsize{9}{11}\selectfont}
\fancyhf{}
\fancyhead[LE,RO]{\helv \thepage}
\fancyhead[LO]{\helv \rightmark}
\fancyhead[RE]{\helv \leftmark}
\def\ams/{\protect\pAmS}
\def\pAmS{{\the\textfont2
A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}
\def\amslatex/{\ams/-\LaTeX}
\begin{document}
\tableofcontents
\bigskip
\begin{boxedminipage}{\textwidth}
This is example 20 in the fancyhdr documentation.\\
It is an approximation of the style used in the book
\textit{Math into LaTeX, An Introduction to \LaTeX{} and \amslatex/}, George Gratzer, Birkhauser, Boston.
Chapter and section titles have a number and are in uppercase. The font is Helvetica 9pt bold.
On an even page, the page number is printed as the left header and
the chapter info as the right header; on an odd page, the section info
is printed as the left header and the page number as the right header. The
center headers are empty. There are no footers.
There is a decorative line in the header. It is 0.5pt wide.
Chapter pages have no headers or footers. We do this by using \verb|\thispagestyle{empty}| after the \verb|\chapter| command.
\begin{verbatim}
\renewcommand{\chaptermark}[1]%
{\markboth{\MakeUppercase{\thechapter.\ #1}}{}}
\renewcommand{\sectionmark}[1]%
{\markright{\MakeUppercase{\thesection.\ #1}}}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\newcommand{\helv}{%
\fontfamily{qhv}\fontseries{b}\fontsize{9}{11}\selectfont}
\fancyhf{}
\fancyhead[LE,RO]{\helv \thepage}
\fancyhead[LO]{\helv \rightmark}
\fancyhead[RE]{\helv \leftmark}
\end{verbatim}
\end{boxedminipage}
\chapter{Introduction}
\thispagestyle{empty}
\lipsum
\section{The Problem}
\label{sec:problem}
\lipsum[3]
\section{Evaluation}
\lipsum
Some more text.
Some more text.
Some more text.
Some more text.
\section{Another section}
\lipsum[3]
\end{document}