summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-10-18 20:29:35 +0000
committerKarl Berry <karl@freefriends.org>2018-10-18 20:29:35 +0000
commiteb0188be025e61dd6da473e22b9842cd22adf2ce (patch)
tree0475453305ddbdf575db051d6a3cda02b2338653 /Master/texmf-dist/tex
parent0bd86e39a67aaac4274bbf501f97827394ad6a32 (diff)
grabbox (18oct18)
git-svn-id: svn://tug.org/texlive/trunk@48933 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/grabbox/grabbox.sty129
1 files changed, 129 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/grabbox/grabbox.sty b/Master/texmf-dist/tex/latex/grabbox/grabbox.sty
new file mode 100644
index 00000000000..22ab1b7880b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/grabbox/grabbox.sty
@@ -0,0 +1,129 @@
+%%
+%% This is file `grabbox.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% grabbox.dtx (with options: `pkg')
+%%
+%% --------------------------------------------------------------
+%% grabbox -- utilities to get an argument as a box
+%% E-mail: jspratte@yahoo.de
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%% --------------------------------------------------------------
+%%
+%% Copyright (C) 2018 Jonathan P. Spratte
+%%
+%% This work may be distributed and/or modified under the conditions of the
+%% LaTeX Project Public License (LPPL), either version 1.3c of this license or
+%% (at your option) any later version. The latest version of this license is in
+%% the file:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status) by
+%% Jonathan P. Spratte.
+%%
+%% This work consists of the file grabbox.dtx
+%% and the derived files grabbox.pdf and
+%% grabbox.sty.
+%%
+\newcommand*\grabbox@date{2018-10-18}
+\newcommand*\grabbox@version{1.0b}
+\ProvidesPackage{grabbox}
+ [\grabbox@date\ v\grabbox@version\ utilities to get an argument as a box]
+\@ifdefinable{\if@grabbox@spaces@}{\newif\if@grabbox@spaces@}
+\newcommand\grabbox@def[2]
+ {%
+ \@ifdefinable#1{\protected\def#1{#2}}%
+ }
+\newcommand\grabbox@def@step[4]
+ {%
+ \@ifdefinable#1{\protected\def#1##1{\def#2{##1}\grabbox@opt#3#4}}%
+ }
+\long\def\grabbox@check@bracket #1[#2\endgrabbox@check@bracket
+ {%
+ \if\relax\detokenize{#2}\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ }
+\protected\def\grabbox@opt#1#2%
+ {%
+ \@ifnextchar[
+ {\grabbox@opt@get#1#2}
+ {\def#1{}#2}%
+ }
+\long\def\grabbox@opt@get#1#2#3]%
+ {%
+ \expandafter\grabbox@opt@get@a\expandafter{\@gobble#3}#1#2%
+ }
+\protected\long\def\grabbox@opt@get@a#1#2#3%
+ {%
+ \grabbox@check@bracket #1[\endgrabbox@check@bracket
+ {\def#2{#1}#3}
+ {\grabbox@opt@get@b#2#3{#1]}}%
+ }
+\protected\long\def\grabbox@opt@get@b#1#2#3#4]%
+ {%
+ \grabbox@check@bracket #4[\endgrabbox@check@bracket
+ {\def#1{#3#4}#2}
+ {\grabbox@opt@get@b#1#2{#3#4]}}%
+ }
+\grabbox@def\grabbox@unpack
+ {%
+ \expandafter\ifx\grabbox@type\hbox
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ \unhbox
+ \unvbox
+ \grabbox@name
+ }
+\grabbox@def\grabbox
+ {%
+ \@ifstar
+ {\@grabbox@spaces@true\grabbox@a}
+ {\@grabbox@spaces@false\grabbox@a}%
+ }
+\grabbox@def@step\grabbox@a\grabbox@name\grabbox@into@pre\grabbox@b
+\grabbox@def@step\grabbox@b\grabbox@type\grabbox@into@post\grabbox@c
+\protected\long\def\grabbox@c#1%
+ {%
+ \def\grabbox@final{#1}%
+ \afterassignment\grabbox@intermediate
+ \setbox\grabbox@name\grabbox@type
+ }
+\grabbox@def\grabbox@intermediate
+ {%
+ \aftergroup\grabbox@after
+ \grabbox@into@pre
+ \if@grabbox@spaces@
+ \else
+ \ignorespaces
+ \fi
+ }
+\grabbox@def\grabbox@after
+ {%
+ \if@grabbox@spaces@
+ \setbox\grabbox@name\grabbox@type
+ {%
+ \grabbox@unpack
+ \grabbox@into@post
+ }%
+ \else
+ \setbox\grabbox@name\grabbox@type
+ {%
+ \grabbox@unpack
+ \ifhmode\unskip\fi
+ \grabbox@into@post
+ }%
+ \fi
+ \grabbox@final
+ }
+%%
+%%
+%% End of file `grabbox.sty'.