annotate midterm/fancyhdr.sty @ 0:c9b5432397b7

first commit
author hamase
date Thu, 08 Nov 2018 10:57:19 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
c9b5432397b7 first commit
hamase
parents:
diff changeset
1 %%
c9b5432397b7 first commit
hamase
parents:
diff changeset
2 %% This is file `fancyhdr.sty',
c9b5432397b7 first commit
hamase
parents:
diff changeset
3 %% generated with the docstrip utility.
c9b5432397b7 first commit
hamase
parents:
diff changeset
4 %%
c9b5432397b7 first commit
hamase
parents:
diff changeset
5 %% The original source files were:
c9b5432397b7 first commit
hamase
parents:
diff changeset
6 %%
c9b5432397b7 first commit
hamase
parents:
diff changeset
7 %% fancyhdr.dtx (with options: `fancyhdr')
c9b5432397b7 first commit
hamase
parents:
diff changeset
8 %%
c9b5432397b7 first commit
hamase
parents:
diff changeset
9 %% This is a generated file.
c9b5432397b7 first commit
hamase
parents:
diff changeset
10 %%
c9b5432397b7 first commit
hamase
parents:
diff changeset
11 %% This file may be distributed and/or modified under the conditions of
c9b5432397b7 first commit
hamase
parents:
diff changeset
12 %% the LaTeX Project Public License, either version 1.3 of this license
c9b5432397b7 first commit
hamase
parents:
diff changeset
13 %% or (at your option) any later version. The latest version of this
c9b5432397b7 first commit
hamase
parents:
diff changeset
14 %% license is in:
c9b5432397b7 first commit
hamase
parents:
diff changeset
15 %%
c9b5432397b7 first commit
hamase
parents:
diff changeset
16 %% http://www.latex-project.org/lppl.txt
c9b5432397b7 first commit
hamase
parents:
diff changeset
17 %%
c9b5432397b7 first commit
hamase
parents:
diff changeset
18 %% and version 1.3 or later is part of all distributions of LaTeX version
c9b5432397b7 first commit
hamase
parents:
diff changeset
19 %% 2005/12/01 or later.
c9b5432397b7 first commit
hamase
parents:
diff changeset
20 %%
c9b5432397b7 first commit
hamase
parents:
diff changeset
21 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c9b5432397b7 first commit
hamase
parents:
diff changeset
22 \NeedsTeXFormat{LaTeX2e}
c9b5432397b7 first commit
hamase
parents:
diff changeset
23 \ProvidesPackage{fancyhdr}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
24 [2017/06/30 v3.9a
c9b5432397b7 first commit
hamase
parents:
diff changeset
25 Extensive control of page headers and footers]%
c9b5432397b7 first commit
hamase
parents:
diff changeset
26 % Copyright (C) 1994-2016 by Piet van Oostrum <piet@vanoostrum.org>
c9b5432397b7 first commit
hamase
parents:
diff changeset
27 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c9b5432397b7 first commit
hamase
parents:
diff changeset
28 \def\if@nch@mpty#1{\def\temp@a{#1}\ifx\temp@a\@empty}
c9b5432397b7 first commit
hamase
parents:
diff changeset
29 \def\f@nch@def#1#2{\if@nch@mpty{#2}\f@nch@gbl\def#1{\leavevmode}\else
c9b5432397b7 first commit
hamase
parents:
diff changeset
30 \f@nch@gbl\def#1{#2\strut}\fi}
c9b5432397b7 first commit
hamase
parents:
diff changeset
31 \let\f@nch@gbl\global
c9b5432397b7 first commit
hamase
parents:
diff changeset
32 \def\f@nch@errmsg#1{%
c9b5432397b7 first commit
hamase
parents:
diff changeset
33 \ifx\PackageError\undefined \errmessage{#1}\else
c9b5432397b7 first commit
hamase
parents:
diff changeset
34 \PackageError{Fancyhdr}{#1}{}\fi}
c9b5432397b7 first commit
hamase
parents:
diff changeset
35 \def\f@nch@warning#1{%
c9b5432397b7 first commit
hamase
parents:
diff changeset
36 \ifx\PackageWarning\undefined \errmessage{#1}\else
c9b5432397b7 first commit
hamase
parents:
diff changeset
37 \PackageWarning{Fancyhdr}{#1}{}\fi}
c9b5432397b7 first commit
hamase
parents:
diff changeset
38 \def\f@nch@forc#1#2#3{\expandafter\f@rc\expandafter#1\expandafter{#2}{#3}}
c9b5432397b7 first commit
hamase
parents:
diff changeset
39 \def\f@rc#1#2#3{\def\temp@ty{#2}\ifx\@empty\temp@ty\else
c9b5432397b7 first commit
hamase
parents:
diff changeset
40 \f@nch@rc#1#2\f@nch@rc{#3}\fi}
c9b5432397b7 first commit
hamase
parents:
diff changeset
41 \def\f@nch@rc#1#2#3\f@nch@rc#4{\def#1{#2}#4\f@rc#1{#3}{#4}}
c9b5432397b7 first commit
hamase
parents:
diff changeset
42 \newcommand{\f@nch@for}[3]{\edef\@fortmp{#2}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
43 \expandafter\@forloop#2,\@nil,\@nil\@@#1{#3}}
c9b5432397b7 first commit
hamase
parents:
diff changeset
44 \newcommand\f@nch@default[3]{%
c9b5432397b7 first commit
hamase
parents:
diff changeset
45 \edef\temp@a{\lowercase{\edef\noexpand\temp@a{#3}}}\temp@a \def#1{}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
46 \f@nch@forc\tmpf@ra{#2}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
47 {\expandafter\f@nch@ifin\tmpf@ra\temp@a{\edef#1{#1\tmpf@ra}}{}}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
48 \ifx\@empty#1\def#1{#2}\fi}
c9b5432397b7 first commit
hamase
parents:
diff changeset
49 \newcommand{\f@nch@ifin}[4]{%
c9b5432397b7 first commit
hamase
parents:
diff changeset
50 \edef\temp@a{#2}\def\temp@b##1#1##2\temp@b{\def\temp@b{##1}}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
51 \expandafter\temp@b#2#1\temp@b\ifx\temp@a\temp@b #4\else #3\fi}
c9b5432397b7 first commit
hamase
parents:
diff changeset
52 \newcommand{\fancyhead}[2][]{\f@nch@fancyhf\fancyhead h[#1]{#2}}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
53 \newcommand{\fancyfoot}[2][]{\f@nch@fancyhf\fancyfoot f[#1]{#2}}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
54 \newcommand{\fancyhf}[2][]{\f@nch@fancyhf\fancyhf {}[#1]{#2}}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
55 \newcommand{\fancyheadoffset}[2][]{\f@nch@fancyhfoffs\fancyheadoffset h[#1]{#2}}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
56 \newcommand{\fancyfootoffset}[2][]{\f@nch@fancyhfoffs\fancyfootoffset f[#1]{#2}}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
57 \newcommand{\fancyhfoffset}[2][]{\f@nch@fancyhfoffs\fancyhfoffset {}[#1]{#2}}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
58 \def\f@nch@fancyhf#1#2[#3]#4{%
c9b5432397b7 first commit
hamase
parents:
diff changeset
59 \def\temp@c{}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
60 \f@nch@forc\tmpf@ra{#3}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
61 {\expandafter\f@nch@ifin\tmpf@ra{eolcrhf,EOLCRHF}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
62 {}{\edef\temp@c{\temp@c\tmpf@ra}}}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
63 \ifx\@empty\temp@c\else \f@nch@errmsg{Illegal char `\temp@c' in
c9b5432397b7 first commit
hamase
parents:
diff changeset
64 \string#1 argument: [#3]}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
65 \fi \f@nch@for\temp@c{#3}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
66 {\f@nch@default\f@nch@@eo{eo}\temp@c \if@twoside\else \if\f@nch@@eo
c9b5432397b7 first commit
hamase
parents:
diff changeset
67 e\f@nch@warning {\string#1's `E' option without twoside option is
c9b5432397b7 first commit
hamase
parents:
diff changeset
68 useless}\fi\fi \f@nch@default\f@nch@@lcr{lcr}\temp@c
c9b5432397b7 first commit
hamase
parents:
diff changeset
69 \f@nch@default\f@nch@@hf{hf}{#2\temp@c}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
70 \f@nch@forc\f@nch@eo\f@nch@@eo
c9b5432397b7 first commit
hamase
parents:
diff changeset
71 {\f@nch@forc\f@nch@lcr\f@nch@@lcr
c9b5432397b7 first commit
hamase
parents:
diff changeset
72 {\f@nch@forc\f@nch@hf\f@nch@@hf
c9b5432397b7 first commit
hamase
parents:
diff changeset
73 {\expandafter\f@nch@def\csname
c9b5432397b7 first commit
hamase
parents:
diff changeset
74 f@nch@\f@nch@eo\f@nch@lcr\f@nch@hf\endcsname {#4}}}}}}
c9b5432397b7 first commit
hamase
parents:
diff changeset
75 \def\f@nch@fancyhfoffs#1#2[#3]#4{%
c9b5432397b7 first commit
hamase
parents:
diff changeset
76 \def\temp@c{}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
77 \f@nch@forc\tmpf@ra{#3}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
78 {\expandafter\f@nch@ifin\tmpf@ra{eolrhf,EOLRHF}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
79 {}{\edef\temp@c{\temp@c\tmpf@ra}}}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
80 \ifx\@empty\temp@c\else \f@nch@errmsg{Illegal char `\temp@c' in
c9b5432397b7 first commit
hamase
parents:
diff changeset
81 \string#1 argument: [#3]}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
82 \fi \f@nch@for\temp@c{#3}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
83 {\f@nch@default\f@nch@@eo{eo}\temp@c \if@twoside\else \if\f@nch@@eo
c9b5432397b7 first commit
hamase
parents:
diff changeset
84 e\f@nch@warning {\string#1's `E' option without twoside option is
c9b5432397b7 first commit
hamase
parents:
diff changeset
85 useless}\fi\fi \f@nch@default\f@nch@@lcr{lr}\temp@c
c9b5432397b7 first commit
hamase
parents:
diff changeset
86 \f@nch@default\f@nch@@hf{hf}{#2\temp@c}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
87 \f@nch@forc\f@nch@eo\f@nch@@eo
c9b5432397b7 first commit
hamase
parents:
diff changeset
88 {\f@nch@forc\f@nch@lcr\f@nch@@lcr
c9b5432397b7 first commit
hamase
parents:
diff changeset
89 {\f@nch@forc\f@nch@hf\f@nch@@hf
c9b5432397b7 first commit
hamase
parents:
diff changeset
90 {\expandafter\setlength\csname
c9b5432397b7 first commit
hamase
parents:
diff changeset
91 f@nch@O@\f@nch@eo\f@nch@lcr\f@nch@hf\endcsname {#4}}}}}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
92 \f@nch@setoffs}
c9b5432397b7 first commit
hamase
parents:
diff changeset
93 \newcommand{\lhead}[2][\f@nch@olh]%
c9b5432397b7 first commit
hamase
parents:
diff changeset
94 {\f@nch@def\f@nch@olh{#2}\f@nch@def\f@nch@elh{#1}}
c9b5432397b7 first commit
hamase
parents:
diff changeset
95 \newcommand{\chead}[2][\f@nch@och]%
c9b5432397b7 first commit
hamase
parents:
diff changeset
96 {\f@nch@def\f@nch@och{#2}\f@nch@def\f@nch@ech{#1}}
c9b5432397b7 first commit
hamase
parents:
diff changeset
97 \newcommand{\rhead}[2][\f@nch@orh]%
c9b5432397b7 first commit
hamase
parents:
diff changeset
98 {\f@nch@def\f@nch@orh{#2}\f@nch@def\f@nch@erh{#1}}
c9b5432397b7 first commit
hamase
parents:
diff changeset
99 \newcommand{\lfoot}[2][\f@nch@olf]%
c9b5432397b7 first commit
hamase
parents:
diff changeset
100 {\f@nch@def\f@nch@olf{#2}\f@nch@def\f@nch@elf{#1}}
c9b5432397b7 first commit
hamase
parents:
diff changeset
101 \newcommand{\cfoot}[2][\f@nch@ocf]%
c9b5432397b7 first commit
hamase
parents:
diff changeset
102 {\f@nch@def\f@nch@ocf{#2}\f@nch@def\f@nch@ecf{#1}}
c9b5432397b7 first commit
hamase
parents:
diff changeset
103 \newcommand{\rfoot}[2][\f@nch@orf]%
c9b5432397b7 first commit
hamase
parents:
diff changeset
104 {\f@nch@def\f@nch@orf{#2}\f@nch@def\f@nch@erf{#1}}
c9b5432397b7 first commit
hamase
parents:
diff changeset
105 \newlength{\f@nch@headwidth} \let\headwidth\f@nch@headwidth
c9b5432397b7 first commit
hamase
parents:
diff changeset
106 \newlength{\f@nch@O@elh}
c9b5432397b7 first commit
hamase
parents:
diff changeset
107 \newlength{\f@nch@O@erh}
c9b5432397b7 first commit
hamase
parents:
diff changeset
108 \newlength{\f@nch@O@olh}
c9b5432397b7 first commit
hamase
parents:
diff changeset
109 \newlength{\f@nch@O@orh}
c9b5432397b7 first commit
hamase
parents:
diff changeset
110 \newlength{\f@nch@O@elf}
c9b5432397b7 first commit
hamase
parents:
diff changeset
111 \newlength{\f@nch@O@erf}
c9b5432397b7 first commit
hamase
parents:
diff changeset
112 \newlength{\f@nch@O@olf}
c9b5432397b7 first commit
hamase
parents:
diff changeset
113 \newlength{\f@nch@O@orf}
c9b5432397b7 first commit
hamase
parents:
diff changeset
114 \newcommand{\headrulewidth}{0.4pt}
c9b5432397b7 first commit
hamase
parents:
diff changeset
115 \newcommand{\footrulewidth}{0pt}
c9b5432397b7 first commit
hamase
parents:
diff changeset
116 \@ifundefined{footruleskip}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
117 {\newcommand{\footruleskip}{.3\normalbaselineskip}}{}
c9b5432397b7 first commit
hamase
parents:
diff changeset
118 \newcommand{\plainheadrulewidth}{0pt}
c9b5432397b7 first commit
hamase
parents:
diff changeset
119 \newcommand{\plainfootrulewidth}{0pt}
c9b5432397b7 first commit
hamase
parents:
diff changeset
120 \newif\if@fancyplain \@fancyplainfalse
c9b5432397b7 first commit
hamase
parents:
diff changeset
121 \def\fancyplain#1#2{\if@fancyplain#1\else#2\fi}
c9b5432397b7 first commit
hamase
parents:
diff changeset
122 \headwidth=-123456789sp
c9b5432397b7 first commit
hamase
parents:
diff changeset
123 \let\f@nch@raggedleft\raggedleft
c9b5432397b7 first commit
hamase
parents:
diff changeset
124 \let\f@nch@raggedright\raggedright
c9b5432397b7 first commit
hamase
parents:
diff changeset
125 \let\f@nch@centering\centering
c9b5432397b7 first commit
hamase
parents:
diff changeset
126 \let\f@nch@everypar\everypar
c9b5432397b7 first commit
hamase
parents:
diff changeset
127 \def\f@nch@reset{\f@nch@everypar{}\restorecr\endlinechar=13
c9b5432397b7 first commit
hamase
parents:
diff changeset
128 \let\\\@normalcr \let\raggedleft\f@nch@raggedleft
c9b5432397b7 first commit
hamase
parents:
diff changeset
129 \let\raggedright\f@nch@raggedright \let\centering\f@nch@centering
c9b5432397b7 first commit
hamase
parents:
diff changeset
130 \def\baselinestretch{1}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
131 \hsize=\headwidth
c9b5432397b7 first commit
hamase
parents:
diff changeset
132 \def\nouppercase##1{{\let\uppercase\relax\let\MakeUppercase\relax
c9b5432397b7 first commit
hamase
parents:
diff changeset
133 \expandafter\let\csname MakeUppercase \endcsname\relax##1}}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
134 \ifx\undefined\@newbaseline % NFSS not present; 2.09 or 2e
c9b5432397b7 first commit
hamase
parents:
diff changeset
135 \ifx\@normalsize\undefined \normalsize % for ucthesis.cls
c9b5432397b7 first commit
hamase
parents:
diff changeset
136 \else \@normalsize \fi \else % NFSS (2.09) present
c9b5432397b7 first commit
hamase
parents:
diff changeset
137 \@newbaseline%
c9b5432397b7 first commit
hamase
parents:
diff changeset
138 \fi}
c9b5432397b7 first commit
hamase
parents:
diff changeset
139 \fancyhf{}
c9b5432397b7 first commit
hamase
parents:
diff changeset
140 \if@twoside
c9b5432397b7 first commit
hamase
parents:
diff changeset
141 \fancyhead[el,or]{\fancyplain{}{\slshape\rightmark}}
c9b5432397b7 first commit
hamase
parents:
diff changeset
142 \fancyhead[er,ol]{\fancyplain{}{\slshape\leftmark}}
c9b5432397b7 first commit
hamase
parents:
diff changeset
143 \else
c9b5432397b7 first commit
hamase
parents:
diff changeset
144 \fancyhead[l]{\fancyplain{}{\slshape\rightmark}}
c9b5432397b7 first commit
hamase
parents:
diff changeset
145 \fancyhead[r]{\fancyplain{}{\slshape\leftmark}}
c9b5432397b7 first commit
hamase
parents:
diff changeset
146 \fi
c9b5432397b7 first commit
hamase
parents:
diff changeset
147 \fancyfoot[c]{\rmfamily\thepage} % page number
c9b5432397b7 first commit
hamase
parents:
diff changeset
148 \def\f@nch@vbox#1#2{\setbox0\vbox{#2}\ifdim\ht0>#1\f@nch@warning
c9b5432397b7 first commit
hamase
parents:
diff changeset
149 {\string#1 is too small (\the#1): ^^J Make it at least \the\ht0.^^J We
c9b5432397b7 first commit
hamase
parents:
diff changeset
150 now make it that large for the rest of the document.^^J This may
c9b5432397b7 first commit
hamase
parents:
diff changeset
151 cause the page layout to be inconsistent, however\@gobble}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
152 \dimen0=#1\global\setlength{#1}{\ht0}\ht0=\dimen0\fi \box0}
c9b5432397b7 first commit
hamase
parents:
diff changeset
153 \def\f@nch@head#1#2#3#4#5{#1\hbox to\headwidth{\f@nch@reset
c9b5432397b7 first commit
hamase
parents:
diff changeset
154 \f@nch@vbox\headheight{\hbox
c9b5432397b7 first commit
hamase
parents:
diff changeset
155 {\rlap{\parbox[b]{\headwidth}{\raggedright#2}}\hfill
c9b5432397b7 first commit
hamase
parents:
diff changeset
156 \parbox[b]{\headwidth}{\centering#3}\hfill
c9b5432397b7 first commit
hamase
parents:
diff changeset
157 \llap{\parbox[b]{\headwidth}{\raggedleft#4}}}\headrule}}#5}
c9b5432397b7 first commit
hamase
parents:
diff changeset
158 \def\f@nch@foot#1#2#3#4#5{#1\hbox to\headwidth{\f@nch@reset
c9b5432397b7 first commit
hamase
parents:
diff changeset
159 \f@nch@vbox\footskip{\footrule
c9b5432397b7 first commit
hamase
parents:
diff changeset
160 \hbox{\rlap{\parbox[t]{\headwidth}{\raggedright#2}}\hfill
c9b5432397b7 first commit
hamase
parents:
diff changeset
161 \parbox[t]{\headwidth}{\centering#3}\hfill
c9b5432397b7 first commit
hamase
parents:
diff changeset
162 \llap{\parbox[t]{\headwidth}{\raggedleft#4}}}}}#5}
c9b5432397b7 first commit
hamase
parents:
diff changeset
163 \def\headrule{{\if@fancyplain\let\headrulewidth\plainheadrulewidth\fi
c9b5432397b7 first commit
hamase
parents:
diff changeset
164 \hrule\@height\headrulewidth\@width\headwidth
c9b5432397b7 first commit
hamase
parents:
diff changeset
165 \vskip-\headrulewidth}}
c9b5432397b7 first commit
hamase
parents:
diff changeset
166 \def\footrule{{\if@fancyplain\let\footrulewidth\plainfootrulewidth\fi
c9b5432397b7 first commit
hamase
parents:
diff changeset
167 \vskip-\footruleskip\vskip-\footrulewidth
c9b5432397b7 first commit
hamase
parents:
diff changeset
168 \hrule\@width\headwidth\@height\footrulewidth\vskip\footruleskip}}
c9b5432397b7 first commit
hamase
parents:
diff changeset
169 \def\ps@fancy{%
c9b5432397b7 first commit
hamase
parents:
diff changeset
170 \@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}% for amsbook
c9b5432397b7 first commit
hamase
parents:
diff changeset
171 \@ifundefined{MakeUppercase}{\def\MakeUppercase{\uppercase}}{}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
172 \ifx\chapter\@undefined \def\sectionmark##1{\markboth
c9b5432397b7 first commit
hamase
parents:
diff changeset
173 {\MakeUppercase{\ifnum \c@secnumdepth>\z@ \thesection\hskip 1em\relax
c9b5432397b7 first commit
hamase
parents:
diff changeset
174 \fi ##1}}{}}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
175 \def\subsectionmark##1{\markright {\ifnum \c@secnumdepth >\@ne
c9b5432397b7 first commit
hamase
parents:
diff changeset
176 \thesubsection\hskip 1em\relax \fi ##1}}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
177 \else \def\chaptermark##1{\markboth {\MakeUppercase{\ifnum
c9b5432397b7 first commit
hamase
parents:
diff changeset
178 \c@secnumdepth>\m@ne \@chapapp\ \thechapter. \ \fi ##1}}{}}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
179 \def\sectionmark##1{\markright{\MakeUppercase{\ifnum \c@secnumdepth >\z@
c9b5432397b7 first commit
hamase
parents:
diff changeset
180 \thesection. \ \fi ##1}}}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
181 \fi
c9b5432397b7 first commit
hamase
parents:
diff changeset
182 \ps@@fancy
c9b5432397b7 first commit
hamase
parents:
diff changeset
183 \gdef\ps@fancy{\@fancyplainfalse\ps@@fancy}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
184 \ifdim\headwidth<0sp
c9b5432397b7 first commit
hamase
parents:
diff changeset
185 \global\advance\headwidth123456789sp\global\advance\headwidth\textwidth
c9b5432397b7 first commit
hamase
parents:
diff changeset
186 \fi}
c9b5432397b7 first commit
hamase
parents:
diff changeset
187 \def\ps@fancyplain{\ps@fancy \let\ps@plain\ps@plain@fancy}
c9b5432397b7 first commit
hamase
parents:
diff changeset
188 \def\ps@plain@fancy{\@fancyplaintrue\ps@@fancy}
c9b5432397b7 first commit
hamase
parents:
diff changeset
189 \let\ps@@empty\ps@empty
c9b5432397b7 first commit
hamase
parents:
diff changeset
190 \def\ps@@fancy{%
c9b5432397b7 first commit
hamase
parents:
diff changeset
191 \ps@@empty
c9b5432397b7 first commit
hamase
parents:
diff changeset
192 \def\@mkboth{\protect\markboth}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
193 \def\@oddhead{\f@nch@head\f@nch@Oolh\f@nch@olh\f@nch@och\f@nch@orh\f@nch@Oorh}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
194 \def\@oddfoot{\f@nch@foot\f@nch@Oolf\f@nch@olf\f@nch@ocf\f@nch@orf\f@nch@Oorf}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
195 \def\@evenhead{\f@nch@head\f@nch@Oelh\f@nch@elh\f@nch@ech\f@nch@erh\f@nch@Oerh}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
196 \def\@evenfoot{\f@nch@foot\f@nch@Oelf\f@nch@elf\f@nch@ecf\f@nch@erf\f@nch@Oerf}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
197 }
c9b5432397b7 first commit
hamase
parents:
diff changeset
198 \def\f@nch@Oolh{\if@reversemargin\hss\else\relax\fi}
c9b5432397b7 first commit
hamase
parents:
diff changeset
199 \def\f@nch@Oorh{\if@reversemargin\relax\else\hss\fi}
c9b5432397b7 first commit
hamase
parents:
diff changeset
200 \let\f@nch@Oelh\f@nch@Oorh
c9b5432397b7 first commit
hamase
parents:
diff changeset
201 \let\f@nch@Oerh\f@nch@Oolh
c9b5432397b7 first commit
hamase
parents:
diff changeset
202 \let\f@nch@Oolf\f@nch@Oolh
c9b5432397b7 first commit
hamase
parents:
diff changeset
203 \let\f@nch@Oorf\f@nch@Oorh
c9b5432397b7 first commit
hamase
parents:
diff changeset
204 \let\f@nch@Oelf\f@nch@Oelh
c9b5432397b7 first commit
hamase
parents:
diff changeset
205 \let\f@nch@Oerf\f@nch@Oerh
c9b5432397b7 first commit
hamase
parents:
diff changeset
206 \def\f@nch@offsolh{\headwidth=\textwidth\advance\headwidth\f@nch@O@olh
c9b5432397b7 first commit
hamase
parents:
diff changeset
207 \advance\headwidth\f@nch@O@orh\hskip-\f@nch@O@olh}
c9b5432397b7 first commit
hamase
parents:
diff changeset
208 \def\f@nch@offselh{\headwidth=\textwidth\advance\headwidth\f@nch@O@elh
c9b5432397b7 first commit
hamase
parents:
diff changeset
209 \advance\headwidth\f@nch@O@erh\hskip-\f@nch@O@elh}
c9b5432397b7 first commit
hamase
parents:
diff changeset
210 \def\f@nch@offsolf{\headwidth=\textwidth\advance\headwidth\f@nch@O@olf
c9b5432397b7 first commit
hamase
parents:
diff changeset
211 \advance\headwidth\f@nch@O@orf\hskip-\f@nch@O@olf}
c9b5432397b7 first commit
hamase
parents:
diff changeset
212 \def\f@nch@offself{\headwidth=\textwidth\advance\headwidth\f@nch@O@elf
c9b5432397b7 first commit
hamase
parents:
diff changeset
213 \advance\headwidth\f@nch@O@erf\hskip-\f@nch@O@elf}
c9b5432397b7 first commit
hamase
parents:
diff changeset
214 \def\f@nch@setoffs{%
c9b5432397b7 first commit
hamase
parents:
diff changeset
215 \f@nch@gbl\let\headwidth\f@nch@headwidth
c9b5432397b7 first commit
hamase
parents:
diff changeset
216 \f@nch@gbl\let\f@nch@Oolh\f@nch@offsolh
c9b5432397b7 first commit
hamase
parents:
diff changeset
217 \f@nch@gbl\let\f@nch@Oelh\f@nch@offselh \f@nch@gbl\let\f@nch@Oorh\hss
c9b5432397b7 first commit
hamase
parents:
diff changeset
218 \f@nch@gbl\let\f@nch@Oerh\hss \f@nch@gbl\let\f@nch@Oolf\f@nch@offsolf
c9b5432397b7 first commit
hamase
parents:
diff changeset
219 \f@nch@gbl\let\f@nch@Oelf\f@nch@offself \f@nch@gbl\let\f@nch@Oorf\hss
c9b5432397b7 first commit
hamase
parents:
diff changeset
220 \f@nch@gbl\let\f@nch@Oerf\hss
c9b5432397b7 first commit
hamase
parents:
diff changeset
221 }
c9b5432397b7 first commit
hamase
parents:
diff changeset
222 \newif\iff@nch@footnote
c9b5432397b7 first commit
hamase
parents:
diff changeset
223 \AtBeginDocument{%
c9b5432397b7 first commit
hamase
parents:
diff changeset
224 \let\latex@makecol\@makecol
c9b5432397b7 first commit
hamase
parents:
diff changeset
225 \def\@makecol{\ifvoid\footins\f@nch@footnotefalse\else\f@nch@footnotetrue\fi
c9b5432397b7 first commit
hamase
parents:
diff changeset
226 \let\topfloat\@toplist\let\botfloat\@botlist\latex@makecol}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
227 }
c9b5432397b7 first commit
hamase
parents:
diff changeset
228 \newcommand\iftopfloat[2]{\ifx\topfloat\empty #2\else #1\fi}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
229 \newcommand\ifbotfloat[2]{\ifx\botfloat\empty #2\else #1\fi}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
230 \newcommand\iffloatpage[2]{\if@fcolmade #1\else #2\fi}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
231 \newcommand\iffootnote[2]{\iff@nch@footnote #1\else #2\fi}%
c9b5432397b7 first commit
hamase
parents:
diff changeset
232 \newcommand{\fancypagestyle}[2]{%
c9b5432397b7 first commit
hamase
parents:
diff changeset
233 \@namedef{ps@#1}{\let\f@nch@gbl\relax#2\relax\ps@fancy}}
c9b5432397b7 first commit
hamase
parents:
diff changeset
234 \endinput
c9b5432397b7 first commit
hamase
parents:
diff changeset
235 %%
c9b5432397b7 first commit
hamase
parents:
diff changeset
236 %% End of file `fancyhdr.sty'.