diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty | 147 |
1 files changed, 42 insertions, 105 deletions
diff --git a/Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty b/Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty index 0f0a97ebb2c..8235ec981ad 100644 --- a/Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty +++ b/Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty @@ -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@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@vanoostrum.org> +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \providecommand\unrestored@protected@xdef{% - \let\protect\@unexpandable@protect - \xdef -} - + \let\protect\@unexpandable@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@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@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@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@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@nobreak\ifvmode\nobreak\fi\fi} -%Note Put #1#2 in toks register \def\@markextra#1#2#3#4#5#6{\@temptokena {{#1}{#2}}% \unrestored@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'. |