%%
%% This is file `interfaces-marks.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% interfaces.dtx  (with options: `marks')
%% 
%% 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>
%% 
\ProvidesPackage{interfaces-marks}
   [2010/10/12 v1.0 easier use of e-TeX marks (FC)]
\RequirePackage{interfaces-base}
\newrobustcmd\marksthe[2]{%
   \ifcsname marks@#1\endcsname\else
      \itf@marks@new{#1}%
   \fi
   \expandafter\marks\csname marks@#1\endcsname{\unexpanded{#2}}%
}% \marksthe
\newrobustcmd*\marksthecs[2]{%
   \ifcsname marks@#1\endcsname\else
      \itf@marks@new{#1}%
   \fi
   \expandafter\marks\csname marks@#1\endcsname{%
      \unexpanded\expandafter\expandafter\expandafter{%
            \csname#2\endcsname}}%
}% \marksthecs
\def\itf@marks@new#1{%
   \expandafter\newmarks\csname marks@#1\endcsname
   \PackageInfo{interfaces-marks}
      {New marks `#1' defined}
}% \itf@marks@warning
\newcommand*\thefirstmarks[1]{%
   \ifcsname marks@#1\endcsname
      \expandafter\firstmarks\csname marks@#1\endcsname
   \fi
}% \thefirstmarks
\newcommand*\thebotmarks[1]{%
   \ifcsname marks@#1\endcsname
      \expandafter\botmarks\csname marks@#1\endcsname
   \fi
}% \thebotmarks
\newcommand*\thetopmarks[1]{%
   \ifcsname marks@#1\endcsname
      \expandafter\topmarks\csname marks@#1\endcsname
   \fi
}% \thetopmarks
%% \getthemarks\firstmarks{section}\macro
\newrobustcmd*\getthemarks[3]{%
   \ifcsname marks@#2\endcsname
      \expandafter\itf@getthemarks\expandafter#1\csname marks@#2\endcsname{#3}%
   \else \let#3\@undefined
   \fi
}% \getthemarks
\def\itf@getthemarks#1#2#3{%
   \expandafter\def\expandafter#3\expandafter{#1#2}%
}% \itf@getthemarks
\newrobustcmd*\getthefirstmarks[2]{\getthemarks\firstmarks{#1}{#2}}
\newrobustcmd*\getthebotmarks[2]{\getthemarks\botmarks{#1}{#2}}
\newrobustcmd*\getthetopmarks[2]{\getthemarks\topmarks{#1}{#2}}
%% \ifmarksequal\firstmarks\botmarks{subsection}{ true }{ false }
\newrobustcmd*\ifmarksequal[3]{%
   \begingroup
      \getthemarks{#1}{#3}\@tempa
      \getthemarks{#2}{#3}\@tempb
   \expandafter\endgroup
   \csname ltx@\ifdefined\@tempa\ifdefined\@tempb
      \ifx\@tempa\@tempb first\else
      second\fi\else
      second\fi\else
      second\fi
   oftwo\endcsname
}% \ifmarksequal
\endinput
%%
%% End of file `interfaces-marks.sty'.
