diff options
author | Karl Berry <karl@freefriends.org> | 2019-01-31 22:39:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-01-31 22:39:45 +0000 |
commit | 6c44317e8904afb8ad612d63a792b3bd6b900bf8 (patch) | |
tree | 960f3271fb63f3b3066b2650a00b9347433fdca0 /Master/texmf-dist/tex/latex/fancyhdr | |
parent | ffaaaff2cb1f37fad774c1374ae5b5c9e9cc87ab (diff) |
fancyhdr (31jan19)
git-svn-id: svn://tug.org/texlive/trunk@49886 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/fancyhdr')
-rw-r--r-- | Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty | 121 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fancyhdr/fancyheadings.sty | 2 |
3 files changed, 83 insertions, 44 deletions
diff --git a/Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty b/Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty index 43e6ffc75dd..e9758b3720d 100644 --- a/Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty +++ b/Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty @@ -21,9 +21,9 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{extramarks} - [2017/06/30 v3.9a + [2019/01/31 v3.10 Extra marks for LaTeX] -% Copyright (C) 1994-2016 by Piet van Oostrum <piet@vanoostrum.org> +% Copyright (C) 1994-2019 by Piet van Oostrum <piet@vanoostrum.org> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newtoks\@temptokenb \providecommand\unrestored@protected@xdef{% diff --git a/Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty b/Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty index fd08936e5dc..cc42fba6011 100644 --- a/Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty +++ b/Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty @@ -21,22 +21,27 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{fancyhdr}% - [2017/06/30 v3.9a + [2019/01/31 v3.10 Extensive control of page headers and footers]% -% Copyright (C) 1994-2016 by Piet van Oostrum <piet@vanoostrum.org> +% Copyright (C) 1994-2019 by Piet van Oostrum <piet@vanoostrum.org> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\if@nch@mpty#1{\def\temp@a{#1}\ifx\temp@a\@empty} \def\f@nch@def#1#2{\if@nch@mpty{#2}\f@nch@gbl\def#1{\leavevmode}\else \f@nch@gbl\def#1{#2\strut}\fi} \let\f@nch@gbl\global -\def\f@nch@errmsg#1{% - \ifx\PackageError\undefined \errmessage{#1}\else - \PackageError{Fancyhdr}{#1}{}\fi} -\def\f@nch@warning#1{% - \ifx\PackageWarning\undefined \errmessage{#1}\else - \PackageWarning{Fancyhdr}{#1}{}\fi} -\def\f@nch@forc#1#2#3{\expandafter\f@rc\expandafter#1\expandafter{#2}{#3}} -\def\f@rc#1#2#3{\def\temp@ty{#2}\ifx\@empty\temp@ty\else +\newcommand{\f@nch@ifundefined}[1]{% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname #1\endcsname\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\newcommand\f@nch@errmsg[1]{% + \f@nch@ifundefined{PackageError}{\errmessage{#1}}{\PackageError{Fancyhdr}{#1}{}}} +\newcommand\f@nch@warning[1]{% + \f@nch@ifundefined{PackageWarning}{\errmessage{#1}}{\PackageWarning{Fancyhdr}{#1}{}}} +\newcommand{\f@nch@forc}[3]{\expandafter\f@rc\expandafter#1\expandafter{#2}{#3}} +\newcommand{\f@rc}[3]{\def\temp@ty{#2}\ifx\@empty\temp@ty\else \f@nch@rc#1#2\f@nch@rc{#3}\fi} \def\f@nch@rc#1#2#3\f@nch@rc#4{\def#1{#2}#4\f@rc#1{#3}{#4}} \newcommand{\f@nch@for}[3]{\edef\@fortmp{#2}% @@ -113,7 +118,7 @@ \newlength{\f@nch@O@orf} \newcommand{\headrulewidth}{0.4pt} \newcommand{\footrulewidth}{0pt} -\@ifundefined{footruleskip}% +\f@nch@ifundefined{footruleskip}% {\newcommand{\footruleskip}{.3\normalbaselineskip}}{} \newcommand{\plainheadrulewidth}{0pt} \newcommand{\plainfootrulewidth}{0pt} @@ -131,11 +136,11 @@ \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} + \f@nch@ifundefined{@newbaseline} % NFSS not present; 2.09 or 2e + {\f@nch@ifundefined{@normalsize} {\normalsize} % for ucthesis.cls + {\@normalsize}}% + {\@newbaseline}% NFSS (2.09) present + } \fancyhf{} \if@twoside \fancyhead[el,or]{\fancyplain{}{\slshape\rightmark}} @@ -145,40 +150,74 @@ \fancyhead[r]{\fancyplain{}{\slshape\leftmark}} \fi \fancyfoot[c]{\rmfamily\thepage} % page number -\def\f@nch@vbox#1#2{\setbox0\vbox{#2}\ifdim\ht0>#1\f@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@nch@head#1#2#3#4#5{#1\hbox to\headwidth{\f@nch@reset - \f@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@nch@foot#1#2#3#4#5{#1\hbox to\headwidth{\f@nch@reset - \f@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} +\newcommand\f@nch@vbox[2]{% + \setbox0\vbox{#2}% + \ifdim\ht0>#1\relax + \f@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\relax + \global#1=\ht0\relax + \ht0=\dimen0 % + \fi + \box0} +\newcommand\f@nch@head[5]{% + #1% + \hbox to\headwidth{% + \f@nch@reset + \f@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% +} +\newcommand\f@nch@foot[5]{% + #1% + \hbox to\headwidth{% + \f@nch@reset + \f@nch@vbox\footskip{% + \setbox0=\vbox{\footrule}\unvbox0 + \vskip\footruleskip + \hbox{% + \rlap{\parbox[t]{\headwidth}{\raggedright#2}}% + \hfill + \parbox[t]{\headwidth}{\centering#3}% + \hfill + \llap{\parbox[t]{\headwidth}{\raggedleft#4}}% + }% + }% + }% + #5% +} \def\headrule{{\if@fancyplain\let\headrulewidth\plainheadrulewidth\fi \hrule\@height\headrulewidth\@width\headwidth \vskip-\headrulewidth}} \def\footrule{{\if@fancyplain\let\footrulewidth\plainfootrulewidth\fi - \vskip-\footruleskip\vskip-\footrulewidth - \hrule\@width\headwidth\@height\footrulewidth\vskip\footruleskip}} + \hrule\@width\headwidth\@height\footrulewidth}} \def\ps@fancy{% - \@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}% for amsbook -\@ifundefined{MakeUppercase}{\def\MakeUppercase{\uppercase}}{}% -\ifx\chapter\@undefined \def\sectionmark##1{\markboth - {\MakeUppercase{\ifnum \c@secnumdepth>\z@ \thesection\hskip 1em\relax + \f@nch@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}% for amsbook +\f@nch@ifundefined{MakeUppercase}{\def\MakeUppercase{\uppercase}}{}% +\f@nch@ifundefined{chapter}% + {\def\sectionmark##1{\markboth{\MakeUppercase{\ifnum \c@secnumdepth>\z@ + \thesection\hskip 1em\relax \fi ##1}}{}}% -\def\subsectionmark##1{\markright {\ifnum \c@secnumdepth >\@ne - \thesubsection\hskip 1em\relax \fi ##1}}% -\else \def\chaptermark##1{\markboth {\MakeUppercase{\ifnum + \def\subsectionmark##1{\markright {\ifnum \c@secnumdepth >\@ne + \thesubsection\hskip 1em\relax \fi ##1}}}% + {\def\chaptermark##1{\markboth {\MakeUppercase{\ifnum \c@secnumdepth>\m@ne \@chapapp\ \thechapter. \ \fi ##1}}{}}% \def\sectionmark##1{\markright{\MakeUppercase{\ifnum \c@secnumdepth >\z@ \thesection. \ \fi ##1}}}% -\fi +} \ps@@fancy \gdef\ps@fancy{\@fancyplainfalse\ps@@fancy}% \ifdim\headwidth<0sp diff --git a/Master/texmf-dist/tex/latex/fancyhdr/fancyheadings.sty b/Master/texmf-dist/tex/latex/fancyhdr/fancyheadings.sty index 65d09ad3c8d..5f2ae4e3e4e 100644 --- a/Master/texmf-dist/tex/latex/fancyhdr/fancyheadings.sty +++ b/Master/texmf-dist/tex/latex/fancyhdr/fancyheadings.sty @@ -21,7 +21,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{fancyheadings} - [2017/06/30 v3.9a + [2019/01/31 v3.10 Legacy package to call fancyhdr] % Public domain %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |