blob: e9758b3720d31b72b9100ff49ba3231f3489d84b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
%%
%% 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}
[2019/01/31 v3.10
Extra marks for LaTeX]
% Copyright (C) 1994-2019 by Piet van Oostrum <piet@vanoostrum.org>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newtoks\@temptokenb
\providecommand\unrestored@protected@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}%
\endgroup
\if@nobreak\ifvmode\nobreak\fi\fi}
\def\@markboth#1#2#3#4#5#6{\@temptokena{{#3}{#4}}%
\unrestored@protected@xdef\@themark{{#5}{#6}\the\@temptokena}}
\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\@rightmark#1#2#3#4{#2}
\def\leftmark{\expandafter\@leftmark
\botmark\@empty\@empty\@empty\@empty}
\def\rightmark{\expandafter\@rightmark
\firstmark\@empty\@empty\@empty\@empty}
\def\firstleftmark{\expandafter\@leftmark
\firstmark\@empty\@empty\@empty\@empty}
\def\lastrightmark{\expandafter\@rightmark
\botmark\@empty\@empty\@empty\@empty}
\let\firstrightmark \rightmark
\let\lastleftmark \leftmark
\def\@themark{{}{}{}{}}
\newcommand\extramarks[2]{%
\begingroup
\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}
\def\@markextra#1#2#3#4#5#6{\@temptokena {{#1}{#2}}%
\unrestored@protected@xdef\@themark{\the\@temptokena{#5}{#6}}}
\def\firstleftxmark{\expandafter\@leftxmark
\firstmark\@empty\@empty\@empty\@empty}
\def\firstrightxmark{\expandafter\@rightxmark
\firstmark\@empty\@empty\@empty\@empty}
\def\topleftxmark{\expandafter\@leftxmark
\topmark\@empty\@empty\@empty\@empty}
\def\toprightxmark{\expandafter\@rightxmark
\topmark\@empty\@empty\@empty\@empty}
\def\lastleftxmark{\expandafter\@leftxmark
\botmark\@empty\@empty\@empty\@empty}
\def\lastrightxmark{\expandafter\@rightxmark
\botmark\@empty\@empty\@empty\@empty}
\let\firstxmark\firstleftxmark
\let\lastxmark\lastrightxmark
\let\topxmark\topleftxmark
\def\@leftxmark#1#2#3#4{#3}
\def\@rightxmark#1#2#3#4{#4}
\endinput
%%
%% End of file `extramarks.sty'.
|