📚 The CoCalc Library - books, templates and other resources
License: OTHER
% fancyhdr.sty version 3.21% Fancy headers and footers for LaTeX.2% Piet van Oostrum,3% Dept of Computer and Information Sciences, University of Utrecht,4% Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands5% Telephone: +31 30 2532180. Email: [email protected]6% ========================================================================7% LICENCE:8% This file may be distributed under the terms of the LaTeX Project Public9% License, as described in lppl.txt in the base LaTeX distribution.10% Either version 1 or, at your option, any later version.11% ========================================================================12% MODIFICATION HISTORY:13% Sep 16, 199414% version 1.4: Correction for use with \reversemargin15% Sep 29, 1994:16% version 1.5: Added the \iftopfloat, \ifbotfloat and \iffloatpage commands17% Oct 4, 1994:18% version 1.6: Reset single spacing in headers/footers for use with19% setspace.sty or doublespace.sty20% Oct 4, 1994:21% version 1.7: changed \let\@mkboth\markboth to22% \def\@mkboth{\protect\markboth} to make it more robust23% Dec 5, 1994:24% version 1.8: corrections for amsbook/amsart: define \@chapapp and (more25% importantly) use the \chapter/sectionmark definitions from ps@headings if26% they exist (which should be true for all standard classes).27% May 31, 1995:28% version 1.9: The proposed \renewcommand{\headrulewidth}{\iffloatpage...29% construction in the doc did not work properly with the fancyplain style.30% June 1, 1995:31% version 1.91: The definition of \@mkboth wasn't restored on subsequent32% \pagestyle{fancy}'s.33% June 1, 1995:34% version 1.92: The sequence \pagestyle{fancyplain} \pagestyle{plain}35% \pagestyle{fancy} would erroneously select the plain version.36% June 1, 1995:37% version 1.93: \fancypagestyle command added.38% Dec 11, 1995:39% version 1.94: suggested by Conrad Hughes <[email protected]>40% CJCH, Dec 11, 1995: added \footruleskip to allow control over footrule41% position (old hardcoded value of .3\normalbaselineskip is far too high42% when used with very small footer fonts).43% Jan 31, 1996:44% version 1.95: call \@normalsize in the reset code if that is defined,45% otherwise \normalsize.46% this is to solve a problem with ucthesis.cls, as this doesn't47% define \@currsize. Unfortunately for latex209 calling \normalsize doesn't48% work as this is optimized to do very little, so there \@normalsize should49% be called. Hopefully this code works for all versions of LaTeX known to50% mankind.51% April 25, 1996:52% version 1.96: initialize \headwidth to a magic (negative) value to catch53% most common cases that people change it before calling \pagestyle{fancy}.54% Note it can't be initialized when reading in this file, because55% \textwidth could be changed afterwards. This is quite probable.56% We also switch to \MakeUppercase rather than \uppercase and introduce a57% \nouppercase command for use in headers. and footers.58% May 3, 1996:59% version 1.97: Two changes:60% 1. Undo the change in version 1.8 (using the pagestyle{headings} defaults61% for the chapter and section marks. The current version of amsbook and62% amsart classes don't seem to need them anymore. Moreover the standard63% latex classes don't use \markboth if twoside isn't selected, and this is64% confusing as \leftmark doesn't work as expected.65% 2. include a call to \ps@empty in ps@@fancy. This is to solve a problem66% in the amsbook and amsart classes, that make global changes to \topskip,67% which are reset in \ps@empty. Hopefully this doesn't break other things.68% May 7, 1996:69% version 1.98:70% Added % after the line \def\nouppercase71% May 7, 1996:72% version 1.99: This is the alpha version of fancyhdr 2.073% Introduced the new commands \fancyhead, \fancyfoot, and \fancyhf.74% Changed \headrulewidth, \footrulewidth, \footruleskip to75% macros rather than length parameters, In this way they can be76% conditionalized and they don't consume length registers. There is no need77% to have them as length registers unless you want to do calculations with78% them, which is unlikely. Note that this may make some uses of them79% incompatible (i.e. if you have a file that uses \setlength or \xxxx=)80% May 10, 1996:81% version 1.99a:82% Added a few more % signs83% May 10, 1996:84% version 1.99b:85% Changed the syntax of \f@nfor to be resistent to catcode changes of :=86% Removed the [1] from the defs of \lhead etc. because the parameter is87% consumed by the \@[xy]lhead etc. macros.88% June 24, 1997:89% version 1.99c:90% corrected \nouppercase to also include the protected form of \MakeUppercase91% \global added to manipulation of \headwidth.92% \iffootnote command added.93% Some comments added about \@fancyhead and \@fancyfoot.94% Aug 24, 199895% version 1.99d96% Changed the default \ps@empty to \ps@@empty in order to allow97% \fancypagestyle{empty} redefinition.98% Oct 11, 200099% version 2.0100% Added LPPL license clause.101%102% A check for \headheight is added. An errormessage is given (once) if the103% header is too large. Empty headers don't generate the error even if104% \headheight is very small or even 0pt.105% Warning added for the use of 'E' option when twoside option is not used.106% In this case the 'E' fields will never be used.107%108% Mar 10, 2002109% version 2.1beta110% New command: \fancyhfoffset[place]{length}111% defines offsets to be applied to the header/footer to let it stick into112% the margins (if length > 0).113% place is like in fancyhead, except that only E,O,L,R can be used.114% This replaces the old calculation based on \headwidth and the marginpar115% area.116% \headwidth will be dynamically calculated in the headers/footers when117% this is used.118%119% Mar 26, 2002120% version 2.1beta2121% \fancyhfoffset now also takes h,f as possible letters in the argument to122% allow the header and footer widths to be different.123% New commands \fancyheadoffset and \fancyfootoffset added comparable to124% \fancyhead and \fancyfoot.125% Errormessages and warnings have been made more informative.126%127% Dec 9, 2002128% version 2.1129% The defaults for \footrulewidth, \plainheadrulewidth and130% \plainfootrulewidth are changed from \z@skip to 0pt. In this way when131% someone inadvertantly uses \setlength to change any of these, the value132% of \z@skip will not be changed, rather an errormessage will be given.133134% March 3, 2004135% Release of version 3.0136137% Oct 7, 2004138% version 3.1139% Added '\endlinechar=13' to \fancy@reset to prevent problems with140% includegraphics in header when verbatiminput is active.141142% March 22, 2005143% version 3.2144% reset \everypar (the real one) in \fancy@reset because spanish.ldf does145% strange things with \everypar between << and >>.146147\def\ifancy@mpty#1{\def\temp@a{#1}\ifx\temp@a\@empty}148149\def\fancy@def#1#2{\ifancy@mpty{#2}\fancy@gbl\def#1{\leavevmode}\else150\fancy@gbl\def#1{#2\strut}\fi}151152\let\fancy@gbl\global153154\def\@fancyerrmsg#1{%155\ifx\PackageError\undefined156\errmessage{#1}\else157\PackageError{Fancyhdr}{#1}{}\fi}158\def\@fancywarning#1{%159\ifx\PackageWarning\undefined160\errmessage{#1}\else161\PackageWarning{Fancyhdr}{#1}{}\fi}162163% Usage: \@forc \var{charstring}{command to be executed for each char}164% This is similar to LaTeX's \@tfor, but expands the charstring.165166\def\@forc#1#2#3{\expandafter\f@rc\expandafter#1\expandafter{#2}{#3}}167\def\f@rc#1#2#3{\def\temp@ty{#2}\ifx\@empty\temp@ty\else168\f@@rc#1#2\f@@rc{#3}\fi}169\def\f@@rc#1#2#3\f@@rc#4{\def#1{#2}#4\f@rc#1{#3}{#4}}170171% Usage: \f@nfor\name:=list\do{body}172% Like LaTeX's \@for but an empty list is treated as a list with an empty173% element174175\newcommand{\f@nfor}[3]{\edef\@fortmp{#2}%176\expandafter\@forloop#2,\@nil,\@nil\@@#1{#3}}177178% Usage: \def@ult \cs{defaults}{argument}179% sets \cs to the characters from defaults appearing in argument180% or defaults if it would be empty. All characters are lowercased.181182\newcommand\def@ult[3]{%183\edef\temp@a{\lowercase{\edef\noexpand\temp@a{#3}}}\temp@a184\def#1{}%185\@forc\tmpf@ra{#2}%186{\expandafter\if@in\tmpf@ra\temp@a{\edef#1{#1\tmpf@ra}}{}}%187\ifx\@empty#1\def#1{#2}\fi}188%189% \if@in <char><set><truecase><falsecase>190%191\newcommand{\if@in}[4]{%192\edef\temp@a{#2}\def\temp@b##1#1##2\temp@b{\def\temp@b{##1}}%193\expandafter\temp@b#2#1\temp@b\ifx\temp@a\temp@b #4\else #3\fi}194195\newcommand{\fancyhead}{\@ifnextchar[{\f@ncyhf\fancyhead h}%196{\f@ncyhf\fancyhead h[]}}197\newcommand{\fancyfoot}{\@ifnextchar[{\f@ncyhf\fancyfoot f}%198{\f@ncyhf\fancyfoot f[]}}199\newcommand{\fancyhf}{\@ifnextchar[{\f@ncyhf\fancyhf{}}%200{\f@ncyhf\fancyhf{}[]}}201202% New commands for offsets added203204\newcommand{\fancyheadoffset}{\@ifnextchar[{\f@ncyhfoffs\fancyheadoffset h}%205{\f@ncyhfoffs\fancyheadoffset h[]}}206\newcommand{\fancyfootoffset}{\@ifnextchar[{\f@ncyhfoffs\fancyfootoffset f}%207{\f@ncyhfoffs\fancyfootoffset f[]}}208\newcommand{\fancyhfoffset}{\@ifnextchar[{\f@ncyhfoffs\fancyhfoffset{}}%209{\f@ncyhfoffs\fancyhfoffset{}[]}}210211% The header and footer fields are stored in command sequences with212% names of the form: \f@ncy<x><y><z> with <x> for [eo], <y> from [lcr]213% and <z> from [hf].214215\def\f@ncyhf#1#2[#3]#4{%216\def\temp@c{}%217\@forc\tmpf@ra{#3}%218{\expandafter\if@in\tmpf@ra{eolcrhf,EOLCRHF}%219{}{\edef\temp@c{\temp@c\tmpf@ra}}}%220\ifx\@empty\temp@c\else221\@fancyerrmsg{Illegal char `\temp@c' in \string#1 argument:222[#3]}%223\fi224\f@nfor\temp@c{#3}%225{\def@ult\f@@@eo{eo}\temp@c226\if@twoside\else227\if\f@@@eo e\@fancywarning228{\string#1's `E' option without twoside option is useless}\fi\fi229\def@ult\f@@@lcr{lcr}\temp@c230\def@ult\f@@@hf{hf}{#2\temp@c}%231\@forc\f@@eo\f@@@eo232{\@forc\f@@lcr\f@@@lcr233{\@forc\f@@hf\f@@@hf234{\expandafter\fancy@def\csname235f@ncy\f@@eo\f@@lcr\f@@hf\endcsname236{#4}}}}}}237238\def\f@ncyhfoffs#1#2[#3]#4{%239\def\temp@c{}%240\@forc\tmpf@ra{#3}%241{\expandafter\if@in\tmpf@ra{eolrhf,EOLRHF}%242{}{\edef\temp@c{\temp@c\tmpf@ra}}}%243\ifx\@empty\temp@c\else244\@fancyerrmsg{Illegal char `\temp@c' in \string#1 argument:245[#3]}%246\fi247\f@nfor\temp@c{#3}%248{\def@ult\f@@@eo{eo}\temp@c249\if@twoside\else250\if\f@@@eo e\@fancywarning251{\string#1's `E' option without twoside option is useless}\fi\fi252\def@ult\f@@@lcr{lr}\temp@c253\def@ult\f@@@hf{hf}{#2\temp@c}%254\@forc\f@@eo\f@@@eo255{\@forc\f@@lcr\f@@@lcr256{\@forc\f@@hf\f@@@hf257{\expandafter\setlength\csname258f@ncyO@\f@@eo\f@@lcr\f@@hf\endcsname259{#4}}}}}%260\fancy@setoffs}261262% Fancyheadings version 1 commands. These are more or less deprecated,263% but they continue to work.264265\newcommand{\lhead}{\@ifnextchar[{\@xlhead}{\@ylhead}}266\def\@xlhead[#1]#2{\fancy@def\f@ncyelh{#1}\fancy@def\f@ncyolh{#2}}267\def\@ylhead#1{\fancy@def\f@ncyelh{#1}\fancy@def\f@ncyolh{#1}}268269\newcommand{\chead}{\@ifnextchar[{\@xchead}{\@ychead}}270\def\@xchead[#1]#2{\fancy@def\f@ncyech{#1}\fancy@def\f@ncyoch{#2}}271\def\@ychead#1{\fancy@def\f@ncyech{#1}\fancy@def\f@ncyoch{#1}}272273\newcommand{\rhead}{\@ifnextchar[{\@xrhead}{\@yrhead}}274\def\@xrhead[#1]#2{\fancy@def\f@ncyerh{#1}\fancy@def\f@ncyorh{#2}}275\def\@yrhead#1{\fancy@def\f@ncyerh{#1}\fancy@def\f@ncyorh{#1}}276277\newcommand{\lfoot}{\@ifnextchar[{\@xlfoot}{\@ylfoot}}278\def\@xlfoot[#1]#2{\fancy@def\f@ncyelf{#1}\fancy@def\f@ncyolf{#2}}279\def\@ylfoot#1{\fancy@def\f@ncyelf{#1}\fancy@def\f@ncyolf{#1}}280281\newcommand{\cfoot}{\@ifnextchar[{\@xcfoot}{\@ycfoot}}282\def\@xcfoot[#1]#2{\fancy@def\f@ncyecf{#1}\fancy@def\f@ncyocf{#2}}283\def\@ycfoot#1{\fancy@def\f@ncyecf{#1}\fancy@def\f@ncyocf{#1}}284285\newcommand{\rfoot}{\@ifnextchar[{\@xrfoot}{\@yrfoot}}286\def\@xrfoot[#1]#2{\fancy@def\f@ncyerf{#1}\fancy@def\f@ncyorf{#2}}287\def\@yrfoot#1{\fancy@def\f@ncyerf{#1}\fancy@def\f@ncyorf{#1}}288289\newlength{\fancy@headwidth}290\let\headwidth\fancy@headwidth291\newlength{\f@ncyO@elh}292\newlength{\f@ncyO@erh}293\newlength{\f@ncyO@olh}294\newlength{\f@ncyO@orh}295\newlength{\f@ncyO@elf}296\newlength{\f@ncyO@erf}297\newlength{\f@ncyO@olf}298\newlength{\f@ncyO@orf}299\newcommand{\headrulewidth}{0.4pt}300\newcommand{\footrulewidth}{0pt}301\newcommand{\footruleskip}{.3\normalbaselineskip}302303% Fancyplain stuff shouldn't be used anymore (rather304% \fancypagestyle{plain} should be used), but it must be present for305% compatibility reasons.306307\newcommand{\plainheadrulewidth}{0pt}308\newcommand{\plainfootrulewidth}{0pt}309\newif\if@fancyplain \@fancyplainfalse310\def\fancyplain#1#2{\if@fancyplain#1\else#2\fi}311312\headwidth=-123456789sp %magic constant313314% Command to reset various things in the headers:315% a.o. single spacing (taken from setspace.sty)316% and the catcode of ^^M (so that epsf files in the header work if a317% verbatim crosses a page boundary)318% It also defines a \nouppercase command that disables \uppercase and319% \Makeuppercase. It can only be used in the headers and footers.320\let\fnch@everypar\everypar% save real \everypar because of spanish.ldf321\def\fancy@reset{\fnch@everypar{}\restorecr\endlinechar=13322\def\baselinestretch{1}%323\def\nouppercase##1{{\let\uppercase\relax\let\MakeUppercase\relax324\expandafter\let\csname MakeUppercase \endcsname\relax##1}}%325\ifx\undefined\@newbaseline% NFSS not present; 2.09 or 2e326\ifx\@normalsize\undefined \normalsize % for ucthesis.cls327\else \@normalsize \fi328\else% NFSS (2.09) present329\@newbaseline%330\fi}331332% Initialization of the head and foot text.333334% The default values still contain \fancyplain for compatibility.335\fancyhf{} % clear all336% lefthead empty on ``plain'' pages, \rightmark on even, \leftmark on odd pages337% evenhead empty on ``plain'' pages, \leftmark on even, \rightmark on odd pages338\if@twoside339\fancyhead[el,or]{\fancyplain{}{\sl\rightmark}}340\fancyhead[er,ol]{\fancyplain{}{\sl\leftmark}}341\else342\fancyhead[l]{\fancyplain{}{\sl\rightmark}}343\fancyhead[r]{\fancyplain{}{\sl\leftmark}}344\fi345\fancyfoot[c]{\rm\thepage} % page number346347% Use box 0 as a temp box and dimen 0 as temp dimen.348% This can be done, because this code will always349% be used inside another box, and therefore the changes are local.350351\def\@fancyvbox#1#2{\setbox0\vbox{#2}\ifdim\ht0>#1\@fancywarning352{\string#1 is too small (\the#1): ^^J Make it at least \the\ht0.^^J353We now make it that large for the rest of the document.^^J354This may cause the page layout to be inconsistent, however\@gobble}%355\dimen0=#1\global\setlength{#1}{\ht0}\ht0=\dimen0\fi356\box0}357358% Put together a header or footer given the left, center and359% right text, fillers at left and right and a rule.360% The \lap commands put the text into an hbox of zero size,361% so overlapping text does not generate an errormessage.362% These macros have 5 parameters:363% 1. LEFTSIDE BEARING % This determines at which side the header will stick364% out. When \fancyhfoffset is used this calculates \headwidth, otherwise365% it is \hss or \relax (after expansion).366% 2. \f@ncyolh, \f@ncyelh, \f@ncyolf or \f@ncyelf. This is the left component.367% 3. \f@ncyoch, \f@ncyech, \f@ncyocf or \f@ncyecf. This is the middle comp.368% 4. \f@ncyorh, \f@ncyerh, \f@ncyorf or \f@ncyerf. This is the right component.369% 5. RIGHTSIDE BEARING. This is always \relax or \hss (after expansion).370371\def\@fancyhead#1#2#3#4#5{#1\hbox to\headwidth{\fancy@reset372\@fancyvbox\headheight{\hbox373{\rlap{\parbox[b]{\headwidth}{\raggedright#2}}\hfill374\parbox[b]{\headwidth}{\centering#3}\hfill375\llap{\parbox[b]{\headwidth}{\raggedleft#4}}}\headrule}}#5}376377\def\@fancyfoot#1#2#3#4#5{#1\hbox to\headwidth{\fancy@reset378\@fancyvbox\footskip{\footrule379\hbox{\rlap{\parbox[t]{\headwidth}{\raggedright#2}}\hfill380\parbox[t]{\headwidth}{\centering#3}\hfill381\llap{\parbox[t]{\headwidth}{\raggedleft#4}}}}}#5}382383\def\headrule{{\if@fancyplain\let\headrulewidth\plainheadrulewidth\fi384\hrule\@height\headrulewidth\@width\headwidth \vskip-\headrulewidth}}385386\def\footrule{{\if@fancyplain\let\footrulewidth\plainfootrulewidth\fi387\vskip-\footruleskip\vskip-\footrulewidth388\hrule\@width\headwidth\@height\footrulewidth\vskip\footruleskip}}389390\def\ps@fancy{%391\@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}%for amsbook392%393% Define \MakeUppercase for old LaTeXen.394% Note: we used \def rather than \let, so that \let\uppercase\relax (from395% the version 1 documentation) will still work.396%397\@ifundefined{MakeUppercase}{\def\MakeUppercase{\uppercase}}{}%398\@ifundefined{chapter}{\def\sectionmark##1{\markboth399{\MakeUppercase{\ifnum \c@secnumdepth>\z@400\thesection\hskip 1em\relax \fi ##1}}{}}%401\def\subsectionmark##1{\markright {\ifnum \c@secnumdepth >\@ne402\thesubsection\hskip 1em\relax \fi ##1}}}%403{\def\chaptermark##1{\markboth {\MakeUppercase{\ifnum \c@secnumdepth>\m@ne404\@chapapp\ \thechapter. \ \fi ##1}}{}}%405\def\sectionmark##1{\markright{\MakeUppercase{\ifnum \c@secnumdepth >\z@406\thesection. \ \fi ##1}}}}%407%\csname ps@headings\endcsname % use \ps@headings defaults if they exist408\ps@@fancy409\gdef\ps@fancy{\@fancyplainfalse\ps@@fancy}%410% Initialize \headwidth if the user didn't411%412\ifdim\headwidth<0sp413%414% This catches the case that \headwidth hasn't been initialized and the415% case that the user added something to \headwidth in the expectation that416% it was initialized to \textwidth. We compensate this now. This loses if417% the user intended to multiply it by a factor. But that case is more418% likely done by saying something like \headwidth=1.2\textwidth.419% The doc says you have to change \headwidth after the first call to420% \pagestyle{fancy}. This code is just to catch the most common cases were421% that requirement is violated.422%423\global\advance\headwidth123456789sp\global\advance\headwidth\textwidth424\fi}425\def\ps@fancyplain{\ps@fancy \let\ps@plain\ps@plain@fancy}426\def\ps@plain@fancy{\@fancyplaintrue\ps@@fancy}427\let\ps@@empty\ps@empty428\def\ps@@fancy{%429\ps@@empty % This is for amsbook/amsart, which do strange things with \topskip430\def\@mkboth{\protect\markboth}%431\def\@oddhead{\@fancyhead\fancy@Oolh\f@ncyolh\f@ncyoch\f@ncyorh\fancy@Oorh}%432\def\@oddfoot{\@fancyfoot\fancy@Oolf\f@ncyolf\f@ncyocf\f@ncyorf\fancy@Oorf}%433\def\@evenhead{\@fancyhead\fancy@Oelh\f@ncyelh\f@ncyech\f@ncyerh\fancy@Oerh}%434\def\@evenfoot{\@fancyfoot\fancy@Oelf\f@ncyelf\f@ncyecf\f@ncyerf\fancy@Oerf}%435}436% Default definitions for compatibility mode:437% These cause the header/footer to take the defined \headwidth as width438% And to shift in the direction of the marginpar area439440\def\fancy@Oolh{\if@reversemargin\hss\else\relax\fi}441\def\fancy@Oorh{\if@reversemargin\relax\else\hss\fi}442\let\fancy@Oelh\fancy@Oorh443\let\fancy@Oerh\fancy@Oolh444445\let\fancy@Oolf\fancy@Oolh446\let\fancy@Oorf\fancy@Oorh447\let\fancy@Oelf\fancy@Oelh448\let\fancy@Oerf\fancy@Oerh449450% New definitions for the use of \fancyhfoffset451% These calculate the \headwidth from \textwidth and the specified offsets.452453\def\fancy@offsolh{\headwidth=\textwidth\advance\headwidth\f@ncyO@olh454\advance\headwidth\f@ncyO@orh\hskip-\f@ncyO@olh}455\def\fancy@offselh{\headwidth=\textwidth\advance\headwidth\f@ncyO@elh456\advance\headwidth\f@ncyO@erh\hskip-\f@ncyO@elh}457458\def\fancy@offsolf{\headwidth=\textwidth\advance\headwidth\f@ncyO@olf459\advance\headwidth\f@ncyO@orf\hskip-\f@ncyO@olf}460\def\fancy@offself{\headwidth=\textwidth\advance\headwidth\f@ncyO@elf461\advance\headwidth\f@ncyO@erf\hskip-\f@ncyO@elf}462463\def\fancy@setoffs{%464% Just in case \let\headwidth\textwidth was used465\fancy@gbl\let\headwidth\fancy@headwidth466\fancy@gbl\let\fancy@Oolh\fancy@offsolh467\fancy@gbl\let\fancy@Oelh\fancy@offselh468\fancy@gbl\let\fancy@Oorh\hss469\fancy@gbl\let\fancy@Oerh\hss470\fancy@gbl\let\fancy@Oolf\fancy@offsolf471\fancy@gbl\let\fancy@Oelf\fancy@offself472\fancy@gbl\let\fancy@Oorf\hss473\fancy@gbl\let\fancy@Oerf\hss}474475\newif\iffootnote476\let\latex@makecol\@makecol477\def\@makecol{\ifvoid\footins\footnotetrue\else\footnotefalse\fi478\let\topfloat\@toplist\let\botfloat\@botlist\latex@makecol}479\def\iftopfloat#1#2{\ifx\topfloat\empty #2\else #1\fi}480\def\ifbotfloat#1#2{\ifx\botfloat\empty #2\else #1\fi}481\def\iffloatpage#1#2{\if@fcolmade #1\else #2\fi}482483\newcommand{\fancypagestyle}[2]{%484\@namedef{ps@#1}{\let\fancy@gbl\relax#2\relax\ps@fancy}}485486487