summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/interfaces/interfaces-hypbmsec.code.tex
blob: 387e73fbc4f240fe677cb31d42470c32b2600fbb (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
%%
%% This is file `interfaces-hypbmsec.code.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% interfaces.dtx  (with options: `hypbmsec.code.tex')
%% 
%% This is a generated file.
%% 
%% interfaces : 2010/10/20 v1.0 - interfaces : interfaces with keys for other packages (FC)
%% 
%% This work 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
%% 
%% This work consists of the main source file interfaces.dtx
%% and the derived files
%%     interfaces.sty, interfaces.pdf, interfaces.ins,
%%     interfaces-base.sty,
%%     interfaces-LaTeX.sty,
%%     interfaces-tikz.sty,
%%     interfaces-titlesec.sty,
%%     interfaces-hyperref.sty,
%%     interfaces-bookmark.sty,
%%     interfaces-hypbmsec.sty,interfaces-hypbmsec.code.tex,
%%     interfaces-fancyhdr.sty,
%%     interfaces-marks.sty,
%%     interfaces-tocloft.sty,
%%     interfaces-makecell.sty,
%%     interfaces-enumitem.sty,
%%     interfaces-truncate.sty,
%%     interfaces-appendix.sty,
%%     interfaces-embedfile.sty,
%%     interfaces-environ.sty,
%%     interfaces-umrand.sty,
%%     interfaces-scrlfile.sty,
%%     interfaces-pgfkeys.sty,
%%     interfaces-etoolbox.sty,
%%     interfaces-fancyvrb.sty
%% 
%% interfaces: interfaces with keys for other packages (FC)
%% Copyright (C) 2010 by Florent Chervet <florent.chervet@free.fr>
%% 
\ProvidesFile{hypbmsec.code.tex}
   [2010/10/05 v1.0 code for interfaces-hypbmsec (FC)]
\itf@patch\pretocmd\hbs@do{%
   \edef\itf@tp{\expandafter\itf@strip@at\string#1}%
   }%
   {\PackageInfo{interfaces-hypbmsec}
      {Command \string\hbs@do\space successfully patched}}
   {\PackageWarning{interfaces-hypbmsec}
      {Command \string\hbs@do\space could not be patched
      \MessageBreak loading of `interfaces-hypbmsec` aborted
      \MessageBreak \string\lastsection\space will not work}%
    \endinput}%
\itf@patch\pretocmd\hbs@process{%
   \itf@hbs@next{#1}%
   }%
   {\PackageInfo{interfaces-hypbmsec}
      {Command \string\hbs@process\space successfully patched}}
   {\PackageWarning{interfaces-hypbmsec}
      {Command \string\hbs@process\space could not be patched
      \MessageBreak loading of `interfaces-hypbmsec` aborted
      \MessageBreak \string\lastsection\space will not work}%
      \endinput}%
\long\def\itf@hbs@next#1{%
   \csdef{itf@next\itf@tp title}{#1}%
   \ifx\hbs@tocstring\relax
      \csletcs{itf@next\itf@tp toc}{itf@next\itf@tp}%
   \else
      \cslet{itf@next\itf@tp toc}\hbs@tocstring
   \fi
   \ifx\hbs@bmstring\relax
      \csletcs{itf@next\itf@tp bookmark}{itf@next\itf@tp toc}%
   \else
      \cslet{itf@next\itf@tp bookmark}\hbs@bmstring
   \fi
   \expandafter\expandafter\expandafter
   \expandafter\expandafter\expandafter
   \expandafter\itf@hbs@chkclass
         \expandafter\expandafter\expandafter\string
            \expandafter\hbs@seccmd\string\ttl@\@nil
      {}
      {\expandafter\itf@last@from@next\expandafter{\itf@tp}}%
}% \itf@hbs@next
\edef\itf@tp{%
   \long\def\noexpand\itf@hbs@chkclass##1\string\ttl@##2\noexpand\@nil{%
      \noexpand\ifblank{##1}%
   }% \itf@hbs@chkclass
}\itf@tp
\itf@patch\pretocmd\ttl@select{%
   \itf@last@from@next{#1}}
   {\PackageInfo{interfaces-hypbmsec}
      {Command \string\ttl@select\space successfully patched}}
   {\PackageWarning{interfaces-hypbmsec}
      {Command \string\ttl@select\space could not be patched
      \MessageBreak loading of `interfaces-hypbmsec` aborted
      \MessageBreak \string\lastsection\space will not work}%
      \endinput}%
\def\itf@last@from@next#1{%
   \expandafter\let\csname last#1title\expandafter\endcsname
                        \csname itf@next#1title\endcsname
   \expandafter\let\csname itf@last#1toc\expandafter\endcsname
                        \csname itf@next#1toc\endcsname
   \expandafter\let\csname last#1bookmark\expandafter\endcsname
                        \csname itf@next#1bookmark\endcsname
   \expandafter\def\csname lastsectionname\endcsname{#1}%
}% \itf@last@from@next
%%-----------------------------------------------------------------------------
%% \lastsection reinitialization (at \stepcounter-> \cl@section)
\def\itf@hbs@resetlast#1{%
   \ifcsname last#1\endcsname
      \global\expandafter\let
         \csname last#1\endcsname\@empty
   \fi
}% \itf@hbs@resetlast
\def\itf@hbs@reset#1{%
   \itf@hbs@resetlast{#1title}%
   \itf@hbs@resetlast{#1bookmark}%
   \itf@hbs@resetlast{#1toc}%
   \csuse{cl@#1}%
}% \itf@hbs@reset
\let\ltx@stpelt\@stpelt
\def\itf@hbs@stpelt#1{%
   \let\@elt\itf@hbs@reset
   \@elt{#1}%
   \let\@elt\itf@stpelt
}% \itf@hbs@stpelt
\def\itf@stpelt#1{%
   \ltx@stpelt{#1}%
   \itf@hbs@stpelt{#1}%
}% \itf@stpelt
\let\@stpelt\itf@stpelt
%%-----------------------------------------------------------------------------
\@for\itf@tp:=part,section,subsection,subsubsection,paragraph,subparagraph%
   \do{\global\expandafter\let\csname last\itf@tp title\endcsname\@empty
      \global\expandafter\let\csname last\itf@tp toc\endcsname\@empty
      \global\expandafter\let\csname last\itf@tp bookmark\endcsname\@empty}%
\AtBeginDocument{\ifundef\chapter{}
   {\global\let\lastchaptertitle\@empty
    \global\let\lastchaptertoc\@empty
    \global\let\lastchapterbookmark\@empty}%
}%
\endinput
%%
%% End of file `interfaces-hypbmsec.code.tex'.