diff options
author | Karl Berry <karl@freefriends.org> | 2016-09-06 21:31:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-09-06 21:31:34 +0000 |
commit | 327ccdda521fd51f95fc32ad7f01789a5a278f5d (patch) | |
tree | 4a3ee83b2cdbeda34b729c4b5bc250227d5cd955 /Master/texmf-dist/tex/latex/fancyhdr | |
parent | 47962829fa9ae2e9127ec987e6428fcf34da7578 (diff) |
fancyhdr (6sep16)
git-svn-id: svn://tug.org/texlive/trunk@42004 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/fancyhdr')
-rw-r--r-- | Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty | 59 |
1 files changed, 46 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty b/Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty index 11b894e713d..9af920b8a71 100644 --- a/Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty +++ b/Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty @@ -1,4 +1,4 @@ -% fancyhdr.sty version 3.6 +% fancyhdr.sty version 3.8 % Fancy headers and footers for LaTeX. % Piet van Oostrum, % [Formerly] Dept of Computer and Information Sciences, University of Utrecht, @@ -165,8 +165,23 @@ % 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 + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e}[1995/06/01]% -\ProvidesPackage{fancyhdr}[2016/08/27 3.6 Extensive control of page headers and footers]% +\ProvidesPackage{fancyhdr}[2016/09/06 3.8 Extensive control of page headers and footers]% \def\ifancy@mpty#1{\def\temp@a{#1}\ifx\temp@a\@empty} @@ -343,9 +358,20 @@ % 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@raggedleft\raggedleft +\let\fnch@raggedright\raggedright +\let\fnch@centering\centering \let\fnch@everypar\everypar% save real \everypar because of spanish.ldf + \def\fancy@reset{\fnch@everypar{}\restorecr\endlinechar=13 + \let\\\@normalcr + \let\raggedleft\fnch@raggedleft + \let\raggedright\fnch@raggedright + \let\centering\fnch@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 @@ -362,13 +388,13 @@ % lefthead empty on ``plain'' pages, \rightmark on even, \leftmark on odd pages % evenhead empty on ``plain'' pages, \leftmark on even, \rightmark on odd pages \if@twoside - \fancyhead[el,or]{\fancyplain{}{\normalfont\slshape\rightmark}} - \fancyhead[er,ol]{\fancyplain{}{\normalfont\slshape\leftmark}} + \fancyhead[el,or]{\fancyplain{}{\slshape\rightmark}} + \fancyhead[er,ol]{\fancyplain{}{\slshape\leftmark}} \else - \fancyhead[l]{\fancyplain{}{\normalfont\slshape\rightmark}} - \fancyhead[r]{\fancyplain{}{\normalfont\slshape\leftmark}} + \fancyhead[l]{\fancyplain{}{\slshape\rightmark}} + \fancyhead[r]{\fancyplain{}{\slshape\leftmark}} \fi -\fancyfoot[c]{\normalfont\rmfamily\thepage} % page number +\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 @@ -501,13 +527,20 @@ \fancy@gbl\let\fancy@Oorf\hss \fancy@gbl\let\fancy@Oerf\hss} -\newif\iffootnote +% 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@footnote +\AtBeginDocument{% \let\latex@makecol\@makecol -\def\@makecol{\ifvoid\footins\footnotetrue\else\footnotefalse\fi -\let\topfloat\@toplist\let\botfloat\@botlist\latex@makecol} -\def\iftopfloat#1#2{\ifx\topfloat\empty #2\else #1\fi} -\def\ifbotfloat#1#2{\ifx\botfloat\empty #2\else #1\fi} -\def\iffloatpage#1#2{\if@fcolmade #1\else #2\fi} +\def\@makecol{\ifvoid\footins\fnch@footnotefalse\else\fnch@footnotetrue\fi +\let\topfloat\@toplist\let\botfloat\@botlist\latex@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@fcolmade #1\else #2\fi}% +\newcommand\iffootnote[2]{\iffnch@footnote #1\else #2\fi}% \newcommand{\fancypagestyle}[2]{% \@namedef{ps@#1}{\let\fancy@gbl\relax#2\relax\ps@fancy}} |