summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/interfaces/interfaces-hypbmsec.code.tex
blob: d613aeb5dddb1550db517bf0b422b8acdcf4b146 (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
%%
%% 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.1 - 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{interfaces-hypbmsec.code.tex}
   [2010/10/27 v1.2 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}%
   \expandafter\let\csname itf@next\itf@tp toc\expandafter\endcsname
      \csname
         \ifx\hbs@tocstring\relax itf@next\itf@tp title\else
                                  hbs@tocstring\fi
      \endcsname
   \expandafter\let\csname itf@next\itf@tp bookmark\expandafter\endcsname
      \csname
         \ifx\hbs@bmstring\relax itf@next\itf@tp toc\else
                                 hbs@bmstring\fi
      \endcsname
   \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
\long\expandafter\def\expandafter\itf@hbs@chkclass
            \expandafter#\expandafter1\string\ttl@#2\@nil{%
   \ifblank{#1}{\if@nobreak\itf@hbs@nobreakfix#2\@nnil\fi}%
}% \itf@hbs@chkclass
\def\itf@hbs@nobreakfix#1#{\itf@hbs@n@breakfix}
\def\itf@hbs@n@breakfix#1#2\@nnil{%
   \unless\ifx\lastsectionname\relax
   \unless\ifnum\csname ttll@#1\endcsname > \csname ttll@\lastsectionname\endcsname\relax
      \@nobreakfalse
   \fi\fi
}% \itf@hbs@nobreakfix
\def\itf@last@from@next#1{%
   \gdef\lastsectionname{#1}%
   \global\expandafter\let\csname last#1title\expandafter\endcsname
                        \csname itf@next#1title\endcsname
   \global\expandafter\let\csname last#1toc\expandafter\endcsname
                        \csname itf@next#1toc\endcsname
   \global\expandafter\let\csname last#1bookmark\expandafter\endcsname
                        \csname itf@next#1bookmark\endcsname
   \let\@elt\itf@resetlastsections
   \csname cl@#1\endcsname
}% \itf@last@from@next
\def\itf@resetlastsections#1{%
   \expandafter\let\csname last#1title\endcsname\relax
   \expandafter\let\csname last#1toc\endcsname\relax
   \expandafter\let\csname last#1bookmark\endcsname\relax
   \csname cl@#1\endcsname
}% \itf@resetlastsections
\let\lastsectionname\relax
\@for\itf@tp:=part,section,subsection,subsubsection,paragraph,subparagraph%
   \do{\expandafter\let\csname last\itf@tp title\endcsname\relax
      \expandafter\let\csname last\itf@tp toc\endcsname\relax
      \expandafter\let\csname last\itf@tp bookmark\endcsname\relax
   }%
\AtBeginDocument{\ifundef\chapter{}
   {\let\lastchaptertitle\relax
    \let\lastchaptertoc\relax
    \let\lastchapterbookmark\relax}%
}%
\endinput
%%
%% End of file `interfaces-hypbmsec.code.tex'.