texlive[44479] Master/texmf-dist: fancyhdr (31may17)
commits+karl at tug.org
commits+karl at tug.org
Tue Jun 6 01:14:33 CEST 2017
Revision: 44479
http://tug.org/svn/texlive?view=revision&revision=44479
Author: karl
Date: 2017-06-06 01:14:32 +0200 (Tue, 06 Jun 2017)
Log Message:
-----------
fancyhdr (31may17)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/fancyhdr/README
trunk/Master/texmf-dist/doc/latex/fancyhdr/fancyhdr.pdf
trunk/Master/texmf-dist/doc/latex/fancyhdr/fancyhdr.tex
trunk/Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty
trunk/Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty
trunk/Master/texmf-dist/tex/latex/fancyhdr/fancyheadings.sty
Modified: trunk/Master/texmf-dist/doc/latex/fancyhdr/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fancyhdr/README 2017-06-05 23:14:20 UTC (rev 44478)
+++ trunk/Master/texmf-dist/doc/latex/fancyhdr/README 2017-06-05 23:14:32 UTC (rev 44479)
@@ -35,6 +35,6 @@
--
Piet van Oostrum.
<piet at vanoostrum.org>
-http://www.pietvanoostrum.com/
+http://www.piet.vanoostrum.org/
Modified: trunk/Master/texmf-dist/doc/latex/fancyhdr/fancyhdr.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/fancyhdr/fancyhdr.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fancyhdr/fancyhdr.tex 2017-06-05 23:14:20 UTC (rev 44478)
+++ trunk/Master/texmf-dist/doc/latex/fancyhdr/fancyhdr.tex 2017-06-05 23:14:32 UTC (rev 44479)
@@ -1670,7 +1670,7 @@
Piet van Oostrum\\
E-mail: piet at vanoostrum.org \\
-WWW: http://www.pietvanoostrum.com
+WWW: http://piet.vanoostrum.org
\section{Version information}
\begin{itemize}
Modified: trunk/Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty 2017-06-05 23:14:20 UTC (rev 44478)
+++ trunk/Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty 2017-06-05 23:14:32 UTC (rev 44479)
@@ -1,110 +1,46 @@
-% Extra marks for latex. Version 2.1.
-% Piet van Oostrum,
-% [Formerly] Dept of Computer and Information Sciences, University of Utrecht,
-% Email: piet at vanoostrum.org
-% WWW: http://www.pietvanoostrum.com
-% ========================================================================
-% LICENCE:
-% This file may be distributed under the terms of the LaTeX Project Public
-% License, as described in lppl.txt in the base LaTeX distribution.
-% Either version 1 or, at your option, any later version.
-% ========================================================================
-% MODIFICATION HISTORY:
-% Oct 11, 2000
-% version 1.99e
-% Added a few % marks to get rid of unwanted spaces, and \endinput.
-% Added LPPL license clause.
-% March 12, 2002
-% version 2.0beta
-% Adapted for the new implementation of marks in LaTeX to solve bug
-% latex/3203.
-% Added symmetric commands \firstrightmark, \lastleftmark, \firstleftxmark,
-% \firstrightxmark, \lastrightxmark, \lastleftxmark, \topleftxmark and
-% \toprightxmark.
-% March 3, 2004
-% version 2.0
-% Release.
-% Aug. 27, 2016
-% version 2.1
-% Added a \ProvidesPackage line.
-% Updated contact information.
-
-% This package gives you two additional marks.
-% \extramarks{m1}{m2} define two extra marks for headers/footers
-% (especially for use with fancyheadings), which can be retrieved
-% by \firstxmark and \lastxmark resp. Usually m1 is what would
-% appear at the top of the page, m2 at the bottom of the page.
-% Typical usage:
-% \pagestyle{fancy}
-% \lhead{\firstxmark}
-% \rfoot{\lastxmark}
-%
-% \extramarks{}{Continued on next page...}
-% text text text text text text text text text text text text text text text
-% text text text text text text text text text text text text text text text
-% text text text text text text text text text text text text text text text
-% text text text text text text text text text text text text text text text
-% text text text text text text text text text text text text text text text
-% \extramarks{Continued}{}
-% \extramarks{}{}
-
-% This package also provides two extra handles to the standard LaTeX marks,
-% namely \firstleftmark and \lastrightmark (the standard \leftmark and
-% \rightmark of LaTeX always give you the last and first, respectively.
-% These are the complementary values). For symmetry reasons \firstrightmark
-% is an alias for \rightmark and \lastleftmark is an alias for \leftmark
-
-% Similarly there are now \firstleftxmark \firstrightxmark \lastrightxmark
-% \lastleftxmark. Here first and last apply to the position on the page,
-% left and right select the m1 and m2 values, respectively.
-
-% Note: there is an extra command \topxmark, but this doesn't work properly
-% if marginpars or floats are used, as LaTeX clobbers TeX's topmark in this
-% case.
-
-\NeedsTeXFormat{LaTeX2e}[1995/06/01]%
-\ProvidesPackage{extramarks}[2016/08/27 2.1 Extra marks]%
-\newtoks\@temptokenb
-
-%Just in case.
+%%
+%% This is file `extramarks.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% fancyhdr.dtx (with options: `extramarks')
+%%
+%% This is a generated file.
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3 of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{extramarks}
+ [2016/10/11 v3.9
+ Extra marks for LaTeX]
+% Copyright (C) 1994-2016 by Piet van Oostrum <piet at vanoostrum.org>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\providecommand\unrestored at protected@xdef{%
- \let\protect\@unexpandable at protect
- \xdef
-}
-
+ \let\protect\@unexpandable at protect \xdef}
\def\markboth#1#2{%
\begingroup
- \let\label\relax \let\index\relax \let\glossary\relax
- \expandafter\@markboth\@themark{#1}{#2}%
- \@temptokena \expandafter{\@themark}%
- \mark{\the\@temptokena}%
+ \let\label\relax \let\index\relax \let\glossary\relax
+ \expandafter\@markboth\@themark{#1}{#2}%
+ \@temptokena \expandafter{\@themark}%
+ \mark{\the\@temptokena}%
\endgroup
\if at nobreak\ifvmode\nobreak\fi\fi}
-% This definitions is in latex.ltx. No use to duplicate here
-%\def\markright#1{%
-% \begingroup
-% \let\label\relax \let\index\relax \let\glossary\relax
-% \expandafter\@markright\@themark {#1}%
-% \@temptokena \expandafter{\@themark}%
-% \mark{\the\@temptokena}%
-% \endgroup
-% \if at nobreak\ifvmode\nobreak\fi\fi}
-
-% Old definition:
-%\def\@markboth#1#2#3#4#5#6{\gdef\@themark{{#5}{#6}{#3}{#4}}}
-%\def\@markright#1#2#3#4#5{\gdef\@themark{{#1}{#5}{#3}{#4}}}
-
-% Note: put #3#4 in toks register.
-\def\@markboth#1#2#3#4#5#6{\@temptokena {{#3}{#4}}%
+\def\@markboth#1#2#3#4#5#6{\@temptokena{{#3}{#4}}%
\unrestored at protected@xdef\@themark{{#5}{#6}\the\@temptokena}}
-
-% Note: put #1 and #3#4 in toks register.
-% Maybe I can get rid of the extra temptokenb by doing the expansion of #5
-% to a temp separately.
-\def\@markright#1#2#3#4#5{\@temptokena {#1}\@temptokenb {{#3}{#4}}%
+\def\@markright#1#2#3#4#5{\@temptokena{#1}\@temptokenb{{#3}{#4}}%
\unrestored at protected@xdef\@themark{{\the\@temptokena}{#5}\the\@temptokenb}}
-\def\@leftmark#1#2#3#4{#1}
+\def\@leftmark#1#2#3#4{#1}
\def\@rightmark#1#2#3#4{#2}
\def\leftmark{\expandafter\@leftmark
@@ -120,15 +56,14 @@
\def\@themark{{}{}{}{}}
-\def\extramarks#1#2{%
+\newcommand\extramarks[2]{%
\begingroup
- \let\label\relax \let\index\relax \let\glossary\relax
- \expandafter\@markextra\@themark{#1}{#2}%
- \@temptokena \expandafter{\@themark}%
- \mark{\the\@temptokena}%
+ \let\label\relax \let\index\relax \let\glossary\relax
+ \expandafter\@markextra\@themark{#1}{#2}%
+ \@temptokena \expandafter{\@themark}%
+ \mark{\the\@temptokena}%
\endgroup
\if at nobreak\ifvmode\nobreak\fi\fi}
-%Note Put #1#2 in toks register
\def\@markextra#1#2#3#4#5#6{\@temptokena {{#1}{#2}}%
\unrestored at protected@xdef\@themark{\the\@temptokena{#5}{#6}}}
\def\firstleftxmark{\expandafter\@leftxmark
@@ -149,3 +84,5 @@
\def\@leftxmark#1#2#3#4{#3}
\def\@rightxmark#1#2#3#4{#4}
\endinput
+%%
+%% End of file `extramarks.sty'.
Modified: trunk/Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty 2017-06-05 23:14:20 UTC (rev 44478)
+++ trunk/Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty 2017-06-05 23:14:32 UTC (rev 44479)
@@ -1,392 +1,142 @@
-% fancyhdr.sty version 3.8
-% Fancy headers and footers for LaTeX.
-% Piet van Oostrum,
-% [Formerly] Dept of Computer and Information Sciences, University of Utrecht,
-% Email: piet at vanoostrum.org
-% WWW: http://www.pietvanoostrum.com
-% ========================================================================
-% LICENCE:
-% This file may be distributed under the terms of the LaTeX Project Public
-% License, as described in lppl.txt in the base LaTeX distribution.
-% Either version 1 or, at your option, any later version.
-% ========================================================================
-% MODIFICATION HISTORY:
-% Sep 16, 1994
-% version 1.4: Correction for use with \reversemargin
-% Sep 29, 1994:
-% version 1.5: Added the \iftopfloat, \ifbotfloat and \iffloatpage commands
-% Oct 4, 1994:
-% version 1.6: Reset single spacing in headers/footers for use with
-% setspace.sty or doublespace.sty
-% Oct 4, 1994:
-% version 1.7: changed \let\@mkboth\markboth to
-% \def\@mkboth{\protect\markboth} to make it more robust
-% Dec 5, 1994:
-% version 1.8: corrections for amsbook/amsart: define \@chapapp and (more
-% importantly) use the \chapter/sectionmark definitions from ps at headings if
-% they exist (which should be true for all standard classes).
-% May 31, 1995:
-% version 1.9: The proposed \renewcommand{\headrulewidth}{\iffloatpage...
-% construction in the doc did not work properly with the fancyplain style.
-% June 1, 1995:
-% version 1.91: The definition of \@mkboth wasn't restored on subsequent
-% \pagestyle{fancy}'s.
-% June 1, 1995:
-% version 1.92: The sequence \pagestyle{fancyplain} \pagestyle{plain}
-% \pagestyle{fancy} would erroneously select the plain version.
-% June 1, 1995:
-% version 1.93: \fancypagestyle command added.
-% Dec 11, 1995:
-% version 1.94: suggested by Conrad Hughes <chughes at maths.tcd.ie>
-% CJCH, Dec 11, 1995: added \footruleskip to allow control over footrule
-% position (old hardcoded value of .3\normalbaselineskip is far too high
-% when used with very small footer fonts).
-% Jan 31, 1996:
-% version 1.95: call \@normalsize in the reset code if that is defined,
-% otherwise \normalsize.
-% this is to solve a problem with ucthesis.cls, as this doesn't
-% define \@currsize. Unfortunately for latex209 calling \normalsize doesn't
-% work as this is optimized to do very little, so there \@normalsize should
-% be called. Hopefully this code works for all versions of LaTeX known to
-% mankind.
-% April 25, 1996:
-% version 1.96: initialize \headwidth to a magic (negative) value to catch
-% most common cases that people change it before calling \pagestyle{fancy}.
-% Note it can't be initialized when reading in this file, because
-% \textwidth could be changed afterwards. This is quite probable.
-% We also switch to \MakeUppercase rather than \uppercase and introduce a
-% \nouppercase command for use in headers. and footers.
-% May 3, 1996:
-% version 1.97: Two changes:
-% 1. Undo the change in version 1.8 (using the pagestyle{headings} defaults
-% for the chapter and section marks. The current version of amsbook and
-% amsart classes don't seem to need them anymore. Moreover the standard
-% latex classes don't use \markboth if twoside isn't selected, and this is
-% confusing as \leftmark doesn't work as expected.
-% 2. include a call to \ps at empty in ps@@fancy. This is to solve a problem
-% in the amsbook and amsart classes, that make global changes to \topskip,
-% which are reset in \ps at empty. Hopefully this doesn't break other things.
-% May 7, 1996:
-% version 1.98:
-% Added % after the line \def\nouppercase
-% May 7, 1996:
-% version 1.99: This is the alpha version of fancyhdr 2.0
-% Introduced the new commands \fancyhead, \fancyfoot, and \fancyhf.
-% Changed \headrulewidth, \footrulewidth, \footruleskip to
-% macros rather than length parameters, In this way they can be
-% conditionalized and they don't consume length registers. There is no need
-% to have them as length registers unless you want to do calculations with
-% them, which is unlikely. Note that this may make some uses of them
-% incompatible (i.e. if you have a file that uses \setlength or \xxxx=)
-% May 10, 1996:
-% version 1.99a:
-% Added a few more % signs
-% May 10, 1996:
-% version 1.99b:
-% Changed the syntax of \f at nfor to be resistent to catcode changes of :=
-% Removed the [1] from the defs of \lhead etc. because the parameter is
-% consumed by the \@[xy]lhead etc. macros.
-% June 24, 1997:
-% version 1.99c:
-% corrected \nouppercase to also include the protected form of \MakeUppercase
-% \global added to manipulation of \headwidth.
-% \iffootnote command added.
-% Some comments added about \@fancyhead and \@fancyfoot.
-% Aug 24, 1998
-% version 1.99d
-% Changed the default \ps at empty to \ps@@empty in order to allow
-% \fancypagestyle{empty} redefinition.
-% Oct 11, 2000
-% version 2.0
-% Added LPPL license clause.
-%
-% A check for \headheight is added. An errormessage is given (once) if the
-% header is too large. Empty headers don't generate the error even if
-% \headheight is very small or even 0pt.
-% Warning added for the use of 'E' option when twoside option is not used.
-% In this case the 'E' fields will never be used.
-%
-% Mar 10, 2002
-% version 2.1beta
-% New command: \fancyhfoffset[place]{length}
-% defines offsets to be applied to the header/footer to let it stick into
-% the margins (if length > 0).
-% place is like in fancyhead, except that only E,O,L,R can be used.
-% This replaces the old calculation based on \headwidth and the marginpar
-% area.
-% \headwidth will be dynamically calculated in the headers/footers when
-% this is used.
-%
-% Mar 26, 2002
-% version 2.1beta2
-% \fancyhfoffset now also takes h,f as possible letters in the argument to
-% allow the header and footer widths to be different.
-% New commands \fancyheadoffset and \fancyfootoffset added comparable to
-% \fancyhead and \fancyfoot.
-% Errormessages and warnings have been made more informative.
-%
-% Dec 9, 2002
-% version 2.1
-% The defaults for \footrulewidth, \plainheadrulewidth and
-% \plainfootrulewidth are changed from \z at skip to 0pt. In this way when
-% someone inadvertantly uses \setlength to change any of these, the value
-% of \z at skip will not be changed, rather an errormessage will be given.
-
-% March 3, 2004
-% Release of version 3.0
-
-% Oct 7, 2004
-% version 3.1
-% Added '\endlinechar=13' to \fancy at reset to prevent problems with
-% includegraphics in header when verbatiminput is active.
-
-% March 22, 2005
-% version 3.2
-% reset \everypar (the real one) in \fancy at reset because spanish.ldf does
-% strange things with \everypar between << and >>.
-
-% Aug 20, 2016
-% version 3.3
-% Replace `\@ifundefined{chapter}' with `\ifx\chapter\@undefined'
-% because the former subtly make \chapter equal to \relax, which may be
-% undesirable in some cases.
-
-% Aug 21, 2016
-% version 3.4
-% Replace \rm by \normalfont\rmfamily
-% and \sl by \normalfont\slshape
-
-% Aug 21, 2016
-% version 3.5
-% Don't define \footruleskip if it is already defined
-
-% Aug. 27, 2016
-% version 3.6
-% Added a \ProvidesPackage line.
-% Updated contact information.
-
-% Aug. 28, 2016
-% version 3.7
-% Removed \normalfont from default values, as every field is already
-% initialised with \normalfont.
-% Set \hsize to \headwidth in header/footer.
-
-% Sept. 6, 2016
-% version 3.8
-% Reset \\, \raggedleft, \raggedright and \centering to their default values
-% to avoid a clash with the tabu package.
-% Move the redefinition of \@makecol to \begin{document} to avoid a clash
-% with the footmisc package (and maybe others)
-% Define a working \iffootnote command
-
+%%
+%% This is file `fancyhdr.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% fancyhdr.dtx (with options: `fancyhdr')
+%%
+%% This is a generated file.
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3 of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\NeedsTeXFormat{LaTeX2e}[1995/06/01]%
-\ProvidesPackage{fancyhdr}[2016/09/06 3.8 Extensive control of page headers and footers]%
-
-\def\ifancy at mpty#1{\def\temp at a{#1}\ifx\temp at a\@empty}
-
-\def\fancy at def#1#2{\ifancy at mpty{#2}\fancy at gbl\def#1{\leavevmode}\else
- \fancy at gbl\def#1{#2\strut}\fi}
-
-\let\fancy at gbl\global
-
-\def\@fancyerrmsg#1{%
- \ifx\PackageError\undefined
- \errmessage{#1}\else
- \PackageError{Fancyhdr}{#1}{}\fi}
-\def\@fancywarning#1{%
- \ifx\PackageWarning\undefined
- \errmessage{#1}\else
- \PackageWarning{Fancyhdr}{#1}{}\fi}
-
-% Usage: \@forc \var{charstring}{command to be executed for each char}
-% This is similar to LaTeX's \@tfor, but expands the charstring.
-
-\def\@forc#1#2#3{\expandafter\f at rc\expandafter#1\expandafter{#2}{#3}}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{fancyhdr}%
+ [2016/10/11 v3.9
+ Extensive control of page headers and footers]%
+% Copyright (C) 1994-2016 by Piet van Oostrum <piet at vanoostrum.org>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\if at nch@mpty#1{\def\temp at a{#1}\ifx\temp at a\@empty}
+\def\f at nch@def#1#2{\if at nch@mpty{#2}\f at nch@gbl\def#1{\leavevmode}\else
+ \f at nch@gbl\def#1{#2\strut}\fi}
+\let\f at nch@gbl\global
+\def\f at nch@errmsg#1{%
+ \ifx\PackageError\undefined \errmessage{#1}\else
+ \PackageError{Fancyhdr}{#1}{}\fi}
+\def\f at nch@warning#1{%
+ \ifx\PackageWarning\undefined \errmessage{#1}\else
+ \PackageWarning{Fancyhdr}{#1}{}\fi}
+\def\f at nch@forc#1#2#3{\expandafter\f at rc\expandafter#1\expandafter{#2}{#3}}
\def\f at rc#1#2#3{\def\temp at ty{#2}\ifx\@empty\temp at ty\else
- \f@@rc#1#2\f@@rc{#3}\fi}
-\def\f@@rc#1#2#3\f@@rc#4{\def#1{#2}#4\f at rc#1{#3}{#4}}
-
-% Usage: \f at nfor\name:=list\do{body}
-% Like LaTeX's \@for but an empty list is treated as a list with an empty
-% element
-
-\newcommand{\f at nfor}[3]{\edef\@fortmp{#2}%
- \expandafter\@forloop#2,\@nil,\@nil\@@#1{#3}}
-
-% Usage: \def at ult \cs{defaults}{argument}
-% sets \cs to the characters from defaults appearing in argument
-% or defaults if it would be empty. All characters are lowercased.
-
-\newcommand\def at ult[3]{%
- \edef\temp at a{\lowercase{\edef\noexpand\temp at a{#3}}}\temp at a
- \def#1{}%
- \@forc\tmpf at ra{#2}%
- {\expandafter\if at in\tmpf at ra\temp at a{\edef#1{#1\tmpf at ra}}{}}%
- \ifx\@empty#1\def#1{#2}\fi}
-%
-% \if at in <char><set><truecase><falsecase>
-%
-\newcommand{\if at in}[4]{%
- \edef\temp at a{#2}\def\temp at b##1#1##2\temp at b{\def\temp at b{##1}}%
- \expandafter\temp at b#2#1\temp at b\ifx\temp at a\temp at b #4\else #3\fi}
-
-\newcommand{\fancyhead}{\@ifnextchar[{\f at ncyhf\fancyhead h}%
- {\f at ncyhf\fancyhead h[]}}
-\newcommand{\fancyfoot}{\@ifnextchar[{\f at ncyhf\fancyfoot f}%
- {\f at ncyhf\fancyfoot f[]}}
-\newcommand{\fancyhf}{\@ifnextchar[{\f at ncyhf\fancyhf{}}%
- {\f at ncyhf\fancyhf{}[]}}
-
-% New commands for offsets added
-
-\newcommand{\fancyheadoffset}{\@ifnextchar[{\f at ncyhfoffs\fancyheadoffset h}%
- {\f at ncyhfoffs\fancyheadoffset h[]}}
-\newcommand{\fancyfootoffset}{\@ifnextchar[{\f at ncyhfoffs\fancyfootoffset f}%
- {\f at ncyhfoffs\fancyfootoffset f[]}}
-\newcommand{\fancyhfoffset}{\@ifnextchar[{\f at ncyhfoffs\fancyhfoffset{}}%
- {\f at ncyhfoffs\fancyhfoffset{}[]}}
-
-% The header and footer fields are stored in command sequences with
-% names of the form: \f at ncy<x><y><z> with <x> for [eo], <y> from [lcr]
-% and <z> from [hf].
-
-\def\f at ncyhf#1#2[#3]#4{%
- \def\temp at c{}%
- \@forc\tmpf at ra{#3}%
- {\expandafter\if at in\tmpf at ra{eolcrhf,EOLCRHF}%
- {}{\edef\temp at c{\temp at c\tmpf at ra}}}%
- \ifx\@empty\temp at c\else
- \@fancyerrmsg{Illegal char `\temp at c' in \string#1 argument:
- [#3]}%
- \fi
- \f at nfor\temp at c{#3}%
- {\def at ult\f@@@eo{eo}\temp at c
- \if at twoside\else
- \if\f@@@eo e\@fancywarning
- {\string#1's `E' option without twoside option is useless}\fi\fi
- \def at ult\f@@@lcr{lcr}\temp at c
- \def at ult\f@@@hf{hf}{#2\temp at c}%
- \@forc\f@@eo\f@@@eo
- {\@forc\f@@lcr\f@@@lcr
- {\@forc\f@@hf\f@@@hf
- {\expandafter\fancy at def\csname
- f at ncy\f@@eo\f@@lcr\f@@hf\endcsname
- {#4}}}}}}
-
-\def\f at ncyhfoffs#1#2[#3]#4{%
- \def\temp at c{}%
- \@forc\tmpf at ra{#3}%
- {\expandafter\if at in\tmpf at ra{eolrhf,EOLRHF}%
- {}{\edef\temp at c{\temp at c\tmpf at ra}}}%
- \ifx\@empty\temp at c\else
- \@fancyerrmsg{Illegal char `\temp at c' in \string#1 argument:
- [#3]}%
- \fi
- \f at nfor\temp at c{#3}%
- {\def at ult\f@@@eo{eo}\temp at c
- \if at twoside\else
- \if\f@@@eo e\@fancywarning
- {\string#1's `E' option without twoside option is useless}\fi\fi
- \def at ult\f@@@lcr{lr}\temp at c
- \def at ult\f@@@hf{hf}{#2\temp at c}%
- \@forc\f@@eo\f@@@eo
- {\@forc\f@@lcr\f@@@lcr
- {\@forc\f@@hf\f@@@hf
- {\expandafter\setlength\csname
- f at ncyO@\f@@eo\f@@lcr\f@@hf\endcsname
- {#4}}}}}%
- \fancy at setoffs}
-
-% Fancyheadings version 1 commands. These are more or less deprecated,
-% but they continue to work.
-
-\newcommand{\lhead}{\@ifnextchar[{\@xlhead}{\@ylhead}}
-\def\@xlhead[#1]#2{\fancy at def\f at ncyelh{#1}\fancy at def\f at ncyolh{#2}}
-\def\@ylhead#1{\fancy at def\f at ncyelh{#1}\fancy at def\f at ncyolh{#1}}
-
-\newcommand{\chead}{\@ifnextchar[{\@xchead}{\@ychead}}
-\def\@xchead[#1]#2{\fancy at def\f at ncyech{#1}\fancy at def\f at ncyoch{#2}}
-\def\@ychead#1{\fancy at def\f at ncyech{#1}\fancy at def\f at ncyoch{#1}}
-
-\newcommand{\rhead}{\@ifnextchar[{\@xrhead}{\@yrhead}}
-\def\@xrhead[#1]#2{\fancy at def\f at ncyerh{#1}\fancy at def\f at ncyorh{#2}}
-\def\@yrhead#1{\fancy at def\f at ncyerh{#1}\fancy at def\f at ncyorh{#1}}
-
-\newcommand{\lfoot}{\@ifnextchar[{\@xlfoot}{\@ylfoot}}
-\def\@xlfoot[#1]#2{\fancy at def\f at ncyelf{#1}\fancy at def\f at ncyolf{#2}}
-\def\@ylfoot#1{\fancy at def\f at ncyelf{#1}\fancy at def\f at ncyolf{#1}}
-
-\newcommand{\cfoot}{\@ifnextchar[{\@xcfoot}{\@ycfoot}}
-\def\@xcfoot[#1]#2{\fancy at def\f at ncyecf{#1}\fancy at def\f at ncyocf{#2}}
-\def\@ycfoot#1{\fancy at def\f at ncyecf{#1}\fancy at def\f at ncyocf{#1}}
-
-\newcommand{\rfoot}{\@ifnextchar[{\@xrfoot}{\@yrfoot}}
-\def\@xrfoot[#1]#2{\fancy at def\f at ncyerf{#1}\fancy at def\f at ncyorf{#2}}
-\def\@yrfoot#1{\fancy at def\f at ncyerf{#1}\fancy at def\f at ncyorf{#1}}
-
-\newlength{\fancy at headwidth}
-\let\headwidth\fancy at headwidth
-\newlength{\f at ncyO@elh}
-\newlength{\f at ncyO@erh}
-\newlength{\f at ncyO@olh}
-\newlength{\f at ncyO@orh}
-\newlength{\f at ncyO@elf}
-\newlength{\f at ncyO@erf}
-\newlength{\f at ncyO@olf}
-\newlength{\f at ncyO@orf}
+ \f at nch@rc#1#2\f at nch@rc{#3}\fi}
+\def\f at nch@rc#1#2#3\f at nch@rc#4{\def#1{#2}#4\f at rc#1{#3}{#4}}
+\newcommand{\f at nch@for}[3]{\edef\@fortmp{#2}%
+ \expandafter\@forloop#2,\@nil,\@nil\@@#1{#3}}
+\newcommand\f at nch@default[3]{%
+ \edef\temp at a{\lowercase{\edef\noexpand\temp at a{#3}}}\temp at a \def#1{}%
+ \f at nch@forc\tmpf at ra{#2}%
+ {\expandafter\f at nch@ifin\tmpf at ra\temp at a{\edef#1{#1\tmpf at ra}}{}}%
+ \ifx\@empty#1\def#1{#2}\fi}
+\newcommand{\f at nch@ifin}[4]{%
+ \edef\temp at a{#2}\def\temp at b##1#1##2\temp at b{\def\temp at b{##1}}%
+ \expandafter\temp at b#2#1\temp at b\ifx\temp at a\temp at b #4\else #3\fi}
+\newcommand{\fancyhead}[2][]{\f at nch@fancyhf\fancyhead h[#1]{#2}}%
+\newcommand{\fancyfoot}[2][]{\f at nch@fancyhf\fancyfoot f[#1]{#2}}%
+\newcommand{\fancyhf}[2][]{\f at nch@fancyhf\fancyhf {}[#1]{#2}}%
+\newcommand{\fancyheadoffset}[2][]{\f at nch@fancyhfoffs\fancyheadoffset h[#1]{#2}}%
+\newcommand{\fancyfootoffset}[2][]{\f at nch@fancyhfoffs\fancyfootoffset f[#1]{#2}}%
+\newcommand{\fancyhfoffset}[2][]{\f at nch@fancyhfoffs\fancyhfoffset {}[#1]{#2}}%
+\def\f at nch@fancyhf#1#2[#3]#4{%
+ \def\temp at c{}%
+ \f at nch@forc\tmpf at ra{#3}%
+ {\expandafter\f at nch@ifin\tmpf at ra{eolcrhf,EOLCRHF}%
+ {}{\edef\temp at c{\temp at c\tmpf at ra}}}%
+ \ifx\@empty\temp at c\else \f at nch@errmsg{Illegal char `\temp at c' in
+ \string#1 argument: [#3]}%
+ \fi \f at nch@for\temp at c{#3}%
+ {\f at nch@default\f at nch@@eo{eo}\temp at c \if at twoside\else \if\f at nch@@eo
+ e\f at nch@warning {\string#1's `E' option without twoside option is
+ useless}\fi\fi \f at nch@default\f at nch@@lcr{lcr}\temp at c
+ \f at nch@default\f at nch@@hf{hf}{#2\temp at c}%
+ \f at nch@forc\f at nch@eo\f at nch@@eo
+ {\f at nch@forc\f at nch@lcr\f at nch@@lcr
+ {\f at nch@forc\f at nch@hf\f at nch@@hf
+ {\expandafter\f at nch@def\csname
+ f at nch@\f at nch@eo\f at nch@lcr\f at nch@hf\endcsname {#4}}}}}}
+\def\f at nch@fancyhfoffs#1#2[#3]#4{%
+ \def\temp at c{}%
+ \f at nch@forc\tmpf at ra{#3}%
+ {\expandafter\f at nch@ifin\tmpf at ra{eolrhf,EOLRHF}%
+ {}{\edef\temp at c{\temp at c\tmpf at ra}}}%
+ \ifx\@empty\temp at c\else \f at nch@errmsg{Illegal char `\temp at c' in
+ \string#1 argument: [#3]}%
+ \fi \f at nch@for\temp at c{#3}%
+ {\f at nch@default\f at nch@@eo{eo}\temp at c \if at twoside\else \if\f at nch@@eo
+ e\f at nch@warning {\string#1's `E' option without twoside option is
+ useless}\fi\fi \f at nch@default\f at nch@@lcr{lr}\temp at c
+ \f at nch@default\f at nch@@hf{hf}{#2\temp at c}%
+ \f at nch@forc\f at nch@eo\f at nch@@eo
+ {\f at nch@forc\f at nch@lcr\f at nch@@lcr
+ {\f at nch@forc\f at nch@hf\f at nch@@hf
+ {\expandafter\setlength\csname
+ f at nch@O@\f at nch@eo\f at nch@lcr\f at nch@hf\endcsname {#4}}}}}%
+ \f at nch@setoffs}
+\newcommand{\lhead}[2][\f at nch@olh]%
+ {\f at nch@def\f at nch@olh{#2}\f at nch@def\f at nch@elh{#1}}
+\newcommand{\chead}[2][\f at nch@och]%
+ {\f at nch@def\f at nch@och{#2}\f at nch@def\f at nch@ech{#1}}
+\newcommand{\rhead}[2][\f at nch@orh]%
+ {\f at nch@def\f at nch@orh{#2}\f at nch@def\f at nch@erh{#1}}
+\newcommand{\lfoot}[2][\f at nch@olf]%
+ {\f at nch@def\f at nch@olf{#2}\f at nch@def\f at nch@elf{#1}}
+\newcommand{\cfoot}[2][\f at nch@ocf]%
+ {\f at nch@def\f at nch@ocf{#2}\f at nch@def\f at nch@ecf{#1}}
+\newcommand{\rfoot}[2][\f at nch@orf]%
+ {\f at nch@def\f at nch@orf{#2}\f at nch@def\f at nch@erf{#1}}
+\newlength{\f at nch@headwidth} \let\headwidth\f at nch@headwidth
+\newlength{\f at nch@O at elh}
+\newlength{\f at nch@O at erh}
+\newlength{\f at nch@O at olh}
+\newlength{\f at nch@O at orh}
+\newlength{\f at nch@O at elf}
+\newlength{\f at nch@O at erf}
+\newlength{\f at nch@O at olf}
+\newlength{\f at nch@O at orf}
\newcommand{\headrulewidth}{0.4pt}
\newcommand{\footrulewidth}{0pt}
-%% Memoir also define \footruleskip.
-%% Don't define \footruleskip if it is already defined
-\@ifundefined{footruleskip}{\newcommand{\footruleskip}{.3\normalbaselineskip}}{}
-
-% Fancyplain stuff shouldn't be used anymore (rather
-% \fancypagestyle{plain} should be used), but it must be present for
-% compatibility reasons.
-
+\@ifundefined{footruleskip}%
+ {\newcommand{\footruleskip}{.3\normalbaselineskip}}{}
\newcommand{\plainheadrulewidth}{0pt}
\newcommand{\plainfootrulewidth}{0pt}
\newif\if at fancyplain \@fancyplainfalse
\def\fancyplain#1#2{\if at fancyplain#1\else#2\fi}
-
-\headwidth=-123456789sp %magic constant
-
-% Command to reset various things in the headers:
-% a.o. single spacing (taken from setspace.sty)
-% and the catcode of ^^M (so that epsf files in the header work if a
-% verbatim crosses a page boundary)
-% It also defines a \nouppercase command that disables \uppercase and
-% \Makeuppercase. It can only be used in the headers and footers.
-% \set \hsize to \headwidth (helps for multicol)
-% reset \\ \raggedleft \raggedright and \centering to their default values (for tabu)
-\let\fnch at raggedleft\raggedleft
-\let\fnch at raggedright\raggedright
-\let\fnch at centering\centering
-\let\fnch at everypar\everypar% save real \everypar because of spanish.ldf
-
-\def\fancy at reset{\fnch at everypar{}\restorecr\endlinechar=13
- \let\\\@normalcr
- \let\raggedleft\fnch at raggedleft
- \let\raggedright\fnch at raggedright
- \let\centering\fnch at centering
- \def\baselinestretch{1}%
- \hsize=\headwidth
- \def\nouppercase##1{{\let\uppercase\relax\let\MakeUppercase\relax
- \expandafter\let\csname MakeUppercase \endcsname\relax##1}}%
- \ifx\undefined\@newbaseline% NFSS not present; 2.09 or 2e
- \ifx\@normalsize\undefined \normalsize % for ucthesis.cls
- \else \@normalsize \fi
- \else% NFSS (2.09) present
+\headwidth=-123456789sp
+\let\f at nch@raggedleft\raggedleft
+\let\f at nch@raggedright\raggedright
+\let\f at nch@centering\centering
+\let\f at nch@everypar\everypar
+\def\f at nch@reset{\f at nch@everypar{}\restorecr\endlinechar=13
+ \let\\\@normalcr \let\raggedleft\f at nch@raggedleft
+ \let\raggedright\f at nch@raggedright \let\centering\f at nch@centering
+ \def\baselinestretch{1}%
+ \hsize=\headwidth
+ \def\nouppercase##1{{\let\uppercase\relax\let\MakeUppercase\relax
+ \expandafter\let\csname MakeUppercase \endcsname\relax##1}}%
+ \ifx\undefined\@newbaseline % NFSS not present; 2.09 or 2e
+ \ifx\@normalsize\undefined \normalsize % for ucthesis.cls
+ \else \@normalsize \fi \else % NFSS (2.09) present
\@newbaseline%
- \fi}
-
-% Initialization of the head and foot text.
-
-% The default values still contain \fancyplain for compatibility.
-\fancyhf{} % clear all
-% lefthead empty on ``plain'' pages, \rightmark on even, \leftmark on odd pages
-% evenhead empty on ``plain'' pages, \leftmark on even, \rightmark on odd pages
+ \fi}
+\fancyhf{}
\if at twoside
\fancyhead[el,or]{\fancyplain{}{\slshape\rightmark}}
\fancyhead[er,ol]{\fancyplain{}{\slshape\leftmark}}
@@ -395,86 +145,43 @@
\fancyhead[r]{\fancyplain{}{\slshape\leftmark}}
\fi
\fancyfoot[c]{\rmfamily\thepage} % page number
-
-% Use box 0 as a temp box and dimen 0 as temp dimen.
-% This can be done, because this code will always
-% be used inside another box, and therefore the changes are local.
-
-\def\@fancyvbox#1#2{\setbox0\vbox{#2}\ifdim\ht0>#1\@fancywarning
- {\string#1 is too small (\the#1): ^^J Make it at least \the\ht0.^^J
- We now make it that large for the rest of the document.^^J
- This may cause the page layout to be inconsistent, however\@gobble}%
- \dimen0=#1\global\setlength{#1}{\ht0}\ht0=\dimen0\fi
- \box0}
-
-% Put together a header or footer given the left, center and
-% right text, fillers at left and right and a rule.
-% The \lap commands put the text into an hbox of zero size,
-% so overlapping text does not generate an errormessage.
-% These macros have 5 parameters:
-% 1. LEFTSIDE BEARING % This determines at which side the header will stick
-% out. When \fancyhfoffset is used this calculates \headwidth, otherwise
-% it is \hss or \relax (after expansion).
-% 2. \f at ncyolh, \f at ncyelh, \f at ncyolf or \f at ncyelf. This is the left component.
-% 3. \f at ncyoch, \f at ncyech, \f at ncyocf or \f at ncyecf. This is the middle comp.
-% 4. \f at ncyorh, \f at ncyerh, \f at ncyorf or \f at ncyerf. This is the right component.
-% 5. RIGHTSIDE BEARING. This is always \relax or \hss (after expansion).
-
-\def\@fancyhead#1#2#3#4#5{#1\hbox to\headwidth{\fancy at reset
- \@fancyvbox\headheight{\hbox
- {\rlap{\parbox[b]{\headwidth}{\raggedright#2}}\hfill
- \parbox[b]{\headwidth}{\centering#3}\hfill
- \llap{\parbox[b]{\headwidth}{\raggedleft#4}}}\headrule}}#5}
-
-\def\@fancyfoot#1#2#3#4#5{#1\hbox to\headwidth{\fancy at reset
- \@fancyvbox\footskip{\footrule
+\def\f at nch@vbox#1#2{\setbox0\vbox{#2}\ifdim\ht0>#1\f at nch@warning
+ {\string#1 is too small (\the#1): ^^J Make it at least \the\ht0.^^J We
+ now make it that large for the rest of the document.^^J This may
+ cause the page layout to be inconsistent, however\@gobble}%
+ \dimen0=#1\global\setlength{#1}{\ht0}\ht0=\dimen0\fi \box0}
+\def\f at nch@head#1#2#3#4#5{#1\hbox to\headwidth{\f at nch@reset
+ \f at nch@vbox\headheight{\hbox
+ {\rlap{\parbox[b]{\headwidth}{\raggedright#2}}\hfill
+ \parbox[b]{\headwidth}{\centering#3}\hfill
+ \llap{\parbox[b]{\headwidth}{\raggedleft#4}}}\headrule}}#5}
+\def\f at nch@foot#1#2#3#4#5{#1\hbox to\headwidth{\f at nch@reset
+ \f at nch@vbox\footskip{\footrule
\hbox{\rlap{\parbox[t]{\headwidth}{\raggedright#2}}\hfill
\parbox[t]{\headwidth}{\centering#3}\hfill
\llap{\parbox[t]{\headwidth}{\raggedleft#4}}}}}#5}
-
\def\headrule{{\if at fancyplain\let\headrulewidth\plainheadrulewidth\fi
- \hrule\@height\headrulewidth\@width\headwidth \vskip-\headrulewidth}}
-
+ \hrule\@height\headrulewidth\@width\headwidth
+ \vskip-\headrulewidth}}
\def\footrule{{\if at fancyplain\let\footrulewidth\plainfootrulewidth\fi
\vskip-\footruleskip\vskip-\footrulewidth
\hrule\@width\headwidth\@height\footrulewidth\vskip\footruleskip}}
-
\def\ps at fancy{%
-\@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}%for amsbook
-%
-% Define \MakeUppercase for old LaTeXen.
-% Note: we used \def rather than \let, so that \let\uppercase\relax (from
-% the version 1 documentation) will still work.
-%
+ \@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}% for amsbook
\@ifundefined{MakeUppercase}{\def\MakeUppercase{\uppercase}}{}%
-\ifx\chapter\@undefined
-\def\sectionmark##1{\markboth
-{\MakeUppercase{\ifnum \c at secnumdepth>\z@
- \thesection\hskip 1em\relax \fi ##1}}{}}%
+\ifx\chapter\@undefined \def\sectionmark##1{\markboth
+ {\MakeUppercase{\ifnum \c at secnumdepth>\z@ \thesection\hskip 1em\relax
+ \fi ##1}}{}}%
\def\subsectionmark##1{\markright {\ifnum \c at secnumdepth >\@ne
- \thesubsection\hskip 1em\relax \fi ##1}}%
-\else
-\def\chaptermark##1{\markboth {\MakeUppercase{\ifnum \c at secnumdepth>\m at ne
- \@chapapp\ \thechapter. \ \fi ##1}}{}}%
+ \thesubsection\hskip 1em\relax \fi ##1}}%
+\else \def\chaptermark##1{\markboth {\MakeUppercase{\ifnum
+ \c at secnumdepth>\m at ne \@chapapp\ \thechapter. \ \fi ##1}}{}}%
\def\sectionmark##1{\markright{\MakeUppercase{\ifnum \c at secnumdepth >\z@
- \thesection. \ \fi ##1}}}%
+ \thesection. \ \fi ##1}}}%
\fi
-%\csname ps at headings\endcsname % use \ps at headings defaults if they exist
\ps@@fancy
\gdef\ps at fancy{\@fancyplainfalse\ps@@fancy}%
-% Initialize \headwidth if the user didn't
-%
\ifdim\headwidth<0sp
-%
-% This catches the case that \headwidth hasn't been initialized and the
-% case that the user added something to \headwidth in the expectation that
-% it was initialized to \textwidth. We compensate this now. This loses if
-% the user intended to multiply it by a factor. But that case is more
-% likely done by saying something like \headwidth=1.2\textwidth.
-% The doc says you have to change \headwidth after the first call to
-% \pagestyle{fancy}. This code is just to catch the most common cases were
-% that requirement is violated.
-%
\global\advance\headwidth123456789sp\global\advance\headwidth\textwidth
\fi}
\def\ps at fancyplain{\ps at fancy \let\ps at plain\ps at plain@fancy}
@@ -481,66 +188,49 @@
\def\ps at plain@fancy{\@fancyplaintrue\ps@@fancy}
\let\ps@@empty\ps at empty
\def\ps@@fancy{%
-\ps@@empty % This is for amsbook/amsart, which do strange things with \topskip
-\def\@mkboth{\protect\markboth}%
-\def\@oddhead{\@fancyhead\fancy at Oolh\f at ncyolh\f at ncyoch\f at ncyorh\fancy at Oorh}%
-\def\@oddfoot{\@fancyfoot\fancy at Oolf\f at ncyolf\f at ncyocf\f at ncyorf\fancy at Oorf}%
-\def\@evenhead{\@fancyhead\fancy at Oelh\f at ncyelh\f at ncyech\f at ncyerh\fancy at Oerh}%
-\def\@evenfoot{\@fancyfoot\fancy at Oelf\f at ncyelf\f at ncyecf\f at ncyerf\fancy at Oerf}%
+ \ps@@empty
+ \def\@mkboth{\protect\markboth}%
+ \def\@oddhead{\f at nch@head\f at nch@Oolh\f at nch@olh\f at nch@och\f at nch@orh\f at nch@Oorh}%
+ \def\@oddfoot{\f at nch@foot\f at nch@Oolf\f at nch@olf\f at nch@ocf\f at nch@orf\f at nch@Oorf}%
+ \def\@evenhead{\f at nch@head\f at nch@Oelh\f at nch@elh\f at nch@ech\f at nch@erh\f at nch@Oerh}%
+ \def\@evenfoot{\f at nch@foot\f at nch@Oelf\f at nch@elf\f at nch@ecf\f at nch@erf\f at nch@Oerf}%
}
-% Default definitions for compatibility mode:
-% These cause the header/footer to take the defined \headwidth as width
-% And to shift in the direction of the marginpar area
-
-\def\fancy at Oolh{\if at reversemargin\hss\else\relax\fi}
-\def\fancy at Oorh{\if at reversemargin\relax\else\hss\fi}
-\let\fancy at Oelh\fancy at Oorh
-\let\fancy at Oerh\fancy at Oolh
-
-\let\fancy at Oolf\fancy at Oolh
-\let\fancy at Oorf\fancy at Oorh
-\let\fancy at Oelf\fancy at Oelh
-\let\fancy at Oerf\fancy at Oerh
-
-% New definitions for the use of \fancyhfoffset
-% These calculate the \headwidth from \textwidth and the specified offsets.
-
-\def\fancy at offsolh{\headwidth=\textwidth\advance\headwidth\f at ncyO@olh
- \advance\headwidth\f at ncyO@orh\hskip-\f at ncyO@olh}
-\def\fancy at offselh{\headwidth=\textwidth\advance\headwidth\f at ncyO@elh
- \advance\headwidth\f at ncyO@erh\hskip-\f at ncyO@elh}
-
-\def\fancy at offsolf{\headwidth=\textwidth\advance\headwidth\f at ncyO@olf
- \advance\headwidth\f at ncyO@orf\hskip-\f at ncyO@olf}
-\def\fancy at offself{\headwidth=\textwidth\advance\headwidth\f at ncyO@elf
- \advance\headwidth\f at ncyO@erf\hskip-\f at ncyO@elf}
-
-\def\fancy at setoffs{%
-% Just in case \let\headwidth\textwidth was used
- \fancy at gbl\let\headwidth\fancy at headwidth
- \fancy at gbl\let\fancy at Oolh\fancy at offsolh
- \fancy at gbl\let\fancy at Oelh\fancy at offselh
- \fancy at gbl\let\fancy at Oorh\hss
- \fancy at gbl\let\fancy at Oerh\hss
- \fancy at gbl\let\fancy at Oolf\fancy at offsolf
- \fancy at gbl\let\fancy at Oelf\fancy at offself
- \fancy at gbl\let\fancy at Oorf\hss
- \fancy at gbl\let\fancy at Oerf\hss}
-
-% Redefine \@makecol so that we can capture if there are top/bottom floats, footnotes
-% or if we are on a float page.
-% Because of a clash with the footmisc package we do this at \begin{document}}
-
-\newif\iffnch at footnote
+\def\f at nch@Oolh{\if at reversemargin\hss\else\relax\fi}
+\def\f at nch@Oorh{\if at reversemargin\relax\else\hss\fi}
+\let\f at nch@Oelh\f at nch@Oorh
+\let\f at nch@Oerh\f at nch@Oolh
+\let\f at nch@Oolf\f at nch@Oolh
+\let\f at nch@Oorf\f at nch@Oorh
+\let\f at nch@Oelf\f at nch@Oelh
+\let\f at nch@Oerf\f at nch@Oerh
+\def\f at nch@offsolh{\headwidth=\textwidth\advance\headwidth\f at nch@O at olh
+ \advance\headwidth\f at nch@O at orh\hskip-\f at nch@O at olh}
+\def\f at nch@offselh{\headwidth=\textwidth\advance\headwidth\f at nch@O at elh
+ \advance\headwidth\f at nch@O at erh\hskip-\f at nch@O at elh}
+\def\f at nch@offsolf{\headwidth=\textwidth\advance\headwidth\f at nch@O at olf
+ \advance\headwidth\f at nch@O at orf\hskip-\f at nch@O at olf}
+\def\f at nch@offself{\headwidth=\textwidth\advance\headwidth\f at nch@O at elf
+ \advance\headwidth\f at nch@O at erf\hskip-\f at nch@O at elf}
+\def\f at nch@setoffs{%
+ \f at nch@gbl\let\headwidth\f at nch@headwidth
+ \f at nch@gbl\let\f at nch@Oolh\f at nch@offsolh
+ \f at nch@gbl\let\f at nch@Oelh\f at nch@offselh \f at nch@gbl\let\f at nch@Oorh\hss
+ \f at nch@gbl\let\f at nch@Oerh\hss \f at nch@gbl\let\f at nch@Oolf\f at nch@offsolf
+ \f at nch@gbl\let\f at nch@Oelf\f at nch@offself \f at nch@gbl\let\f at nch@Oorf\hss
+ \f at nch@gbl\let\f at nch@Oerf\hss
+}
+\newif\iff at nch@footnote
\AtBeginDocument{%
-\let\latex at makecol\@makecol
-\def\@makecol{\ifvoid\footins\fnch at footnotefalse\else\fnch at footnotetrue\fi
-\let\topfloat\@toplist\let\botfloat\@botlist\latex at makecol}%
+ \let\latex at makecol\@makecol
+ \def\@makecol{\ifvoid\footins\f at nch@footnotefalse\else\f at nch@footnotetrue\fi
+ \let\topfloat\@toplist\let\botfloat\@botlist\latex at makecol}%
}
\newcommand\iftopfloat[2]{\ifx\topfloat\empty #2\else #1\fi}%
\newcommand\ifbotfloat[2]{\ifx\botfloat\empty #2\else #1\fi}%
\newcommand\iffloatpage[2]{\if at fcolmade #1\else #2\fi}%
-\newcommand\iffootnote[2]{\iffnch at footnote #1\else #2\fi}%
-
+\newcommand\iffootnote[2]{\iff at nch@footnote #1\else #2\fi}%
\newcommand{\fancypagestyle}[2]{%
- \@namedef{ps@#1}{\let\fancy at gbl\relax#2\relax\ps at fancy}}
+ \@namedef{ps@#1}{\let\f at nch@gbl\relax#2\relax\ps at fancy}}
+\endinput
+%%
+%% End of file `fancyhdr.sty'.
Modified: trunk/Master/texmf-dist/tex/latex/fancyhdr/fancyheadings.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fancyhdr/fancyheadings.sty 2017-06-05 23:14:20 UTC (rev 44478)
+++ trunk/Master/texmf-dist/tex/latex/fancyhdr/fancyheadings.sty 2017-06-05 23:14:32 UTC (rev 44479)
@@ -1,6 +1,30 @@
-% Public domain.
-\NeedsTeXFormat{LaTeX2e}[1995/06/01]%
-\ProvidesPackage{fancyheadings}[2008/02/04 1.99 Dummy package to call fancyhdr]%
+%%
+%% This is file `fancyheadings.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% fancyhdr.dtx (with options: `fancyheadings')
+%%
+%% This is a generated file.
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3 of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{fancyheadings}
+ [2016/10/11 v3.9
+ Legacy package to call fancyhdr]
+% Public domain
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\PackageWarningNoLine{fancyheadings}{%
Please stop using fancyheadings!\MessageBreak
Use fancyhdr instead.\MessageBreak
@@ -9,7 +33,7 @@
\MessageBreak
fancyhdr is 99 percent compatible with\MessageBreak
fancyheadings. The only incompatibility is\MessageBreak
- that \protect\headrulewidth\space and \protect\footrulewidth\space
+ that \protect\headrulewidth\space and \protect\footrulewidth\space
and\MessageBreak
their \protect\plain... versions are no longer length\MessageBreak
parameters, but normal macros (to be changed\MessageBreak
@@ -16,3 +40,5 @@
with \protect\renewcommand\space rather than \protect\setlength).}
\RequirePackage{fancyhdr}
\endinput
+%%
+%% End of file `fancyheadings.sty'.
More information about the tex-live-commits
mailing list