summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/interfaces/interfaces-hypbmsec.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/interfaces/interfaces-hypbmsec.code.tex')
-rw-r--r--Master/texmf-dist/doc/latex/interfaces/interfaces-hypbmsec.code.tex110
1 files changed, 45 insertions, 65 deletions
diff --git a/Master/texmf-dist/doc/latex/interfaces/interfaces-hypbmsec.code.tex b/Master/texmf-dist/doc/latex/interfaces/interfaces-hypbmsec.code.tex
index 387e73fbc4f..d613aeb5ddd 100644
--- a/Master/texmf-dist/doc/latex/interfaces/interfaces-hypbmsec.code.tex
+++ b/Master/texmf-dist/doc/latex/interfaces/interfaces-hypbmsec.code.tex
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% interfaces : 2010/10/20 v1.0 - interfaces : interfaces with keys for other packages (FC)
+%% 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
@@ -44,8 +44,8 @@
%% 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)]
+\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}%
}%
@@ -55,7 +55,7 @@
{Command \string\hbs@do\space could not be patched
\MessageBreak loading of `interfaces-hypbmsec` aborted
\MessageBreak \string\lastsection\space will not work}%
- \endinput}%
+ \endinput}
\itf@patch\pretocmd\hbs@process{%
\itf@hbs@next{#1}%
}%
@@ -68,81 +68,61 @@
\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\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
-\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}%
+\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{%
- \expandafter\let\csname last#1title\expandafter\endcsname
+ \gdef\lastsectionname{#1}%
+ \global\expandafter\let\csname last#1title\expandafter\endcsname
\csname itf@next#1title\endcsname
- \expandafter\let\csname itf@last#1toc\expandafter\endcsname
+ \global\expandafter\let\csname last#1toc\expandafter\endcsname
\csname itf@next#1toc\endcsname
- \expandafter\let\csname last#1bookmark\expandafter\endcsname
+ \global\expandafter\let\csname last#1bookmark\expandafter\endcsname
\csname itf@next#1bookmark\endcsname
- \expandafter\def\csname lastsectionname\endcsname{#1}%
+ \let\@elt\itf@resetlastsections
+ \csname cl@#1\endcsname
}% \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
-%%-----------------------------------------------------------------------------
+\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{\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}%
+ \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{}
- {\global\let\lastchaptertitle\@empty
- \global\let\lastchaptertoc\@empty
- \global\let\lastchapterbookmark\@empty}%
+ {\let\lastchaptertitle\relax
+ \let\lastchaptertoc\relax
+ \let\lastchapterbookmark\relax}%
}%
\endinput
%%