summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/emarks
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-11-04 23:29:33 +0000
committerKarl Berry <karl@freefriends.org>2011-11-04 23:29:33 +0000
commita9f975064a3557008a31a98222c475e3d4e4ccdf (patch)
tree5de25c0da62776e105bbe87213e0c8c772bb69b3 /Master/texmf-dist/tex/latex/emarks
parent48dfdb6d4df016470854129a494373b5d72e2fb0 (diff)
new latex package emarks (1nov11)
git-svn-id: svn://tug.org/texlive/trunk@24504 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/emarks')
-rw-r--r--Master/texmf-dist/tex/latex/emarks/emarks.sty83
1 files changed, 83 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/emarks/emarks.sty b/Master/texmf-dist/tex/latex/emarks/emarks.sty
new file mode 100644
index 00000000000..4f528be2b2f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/emarks/emarks.sty
@@ -0,0 +1,83 @@
+%%
+%% This is file `emarks.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% emarks.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% emarks : 2011/03/26 v1.0 - e-TeX named marks registers (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 emarks.dtx
+%% and the derived files:
+%% emarks.sty, emarks.ins, emarks.drv,
+%% and: emarks.pdf
+%%
+%% emarks : 2011/03/26 v1.0 - e-TeX named marks registers (FC)
+%% Copyright (C) 2011 by FC <florent.chervet @t free.fr>
+%%
+\NeedsTeXFormat{LaTeX2e}[2005/12/01]
+\ProvidesPackage{emarks}
+ [2011/03/26 v1.0 - e-TeX named marks registers (FC)]
+\RequirePackage {etex}
+\def\emarks@newmarks #1{\PackageInfo {emarks}{New marks register `#1'}%
+ \newmarks #1% \newmarks is global !!
+}% \emarks@newmarks
+\protected\def\marksthe {\emarks@setmarks {}}
+\protected\def\marksthecs {\emarks@setmarks {\toks@\expandafter{\csname\the\toks@\endcsname}}}
+\def\emarks@setmarks #1{\begingroup \@ifstar {\emarks@ {#1}\def }
+ {\emarks@ {#1}\edef }%
+}% \emarks@setmarks
+\def\emarks@ #1#2#3{\def\@tempa
+ {#1#2\@tempa {\the\toks@ }\expandafter\emarks@marks \csname marks@#3\endcsname }%
+ \afterassignment \@tempa \toks@ =
+}% \emarks@
+\def\emarks@marks #1{\ifx \relax#1\emarks@newmarks #1\fi \marks #1{\@tempa }\endgroup }
+\newcommand*\thefirstmarks {\romannumeral \emarks@themarks \firstmarks }
+\newcommand*\thebotmarks {\romannumeral \emarks@themarks \botmarks }
+\newcommand*\thetopmarks {\romannumeral \emarks@themarks \topmarks }
+\def\emarks@themarks #1#2{\expandafter \ifx
+ \csname\ifcsname marks@#2\endcsname marks@#2\else relax\fi\endcsname\relax
+ \expandafter \z@
+ \else \expandafter \z@ #1\csname marks@#2\expandafter \endcsname \fi
+}% \emarks@themarks
+\protected\def\getthemarks #1#2#3{\ifcsname marks@#2\endcsname
+ \expandafter \def \expandafter #3\expandafter {#1\csname marks@#2\endcsname}%
+ \else \let #3=\@undefined \fi
+}% \getthemarks
+\protected\def\getthefirstmarks {\getthemarks \firstmarks }
+\protected\def\getthebotmarks {\getthemarks \botmarks }
+\protected\def\getthetopmarks {\getthemarks \topmarks }
+\protected\def\ifmarksvoid #1#2{\begingroup \getthemarks {#1}{#2}\x
+ \ifodd \ifdefined\x \ifx \x\relax 0 \fi \ifx \x\@empty 0 \fi \else 0 \fi
+ 1 \endgroup\expandafter\@secondoftwo
+ \else \endgroup\expandafter\@firstoftwo \fi
+}% \ifmarksvoid
+\protected\def\ifmarksequal #1#2#3{\begingroup \getthemarks{#1}{#3}\x \getthemarks{#2}{#3}\y
+ \expandafter \endgroup \ifodd \ifdefined\x \ifdefined\y \ifx \x\y 0 \fi\fi\fi
+ 1 \expandafter\@secondoftwo
+ \else \expandafter\@firstoftwo \fi
+}% \ifmarksequal
+\protected\def\showthemarks #1{\begingroup \emarks@showthemarks 0{#1}\firstmarks
+ \emarks@showthemarks 2{#1}\botmarks
+ \emarks@showthemarks 4{#1}\topmarks
+ \message{firstmarks "#1": \the\toks0^^J%
+ botmarks "#1": \the\toks2^^J%
+ topmarks "#1": \the\toks4^^J}\show\@tempa
+ \endgroup
+}% \showthemarks
+\def\emarks@showthemarks #1#2#3{\getthemarks #3{#2}\@tempa \toks #1 = \ifdefined\@tempa
+ \expandafter\ifx \noexpand\@tempa\@tempa {}\else \expandafter {\@tempa }\fi
+ \else {}\fi
+}% \emarks@showthemarks
+\endinput
+%%
+%% End of file `emarks.sty'.