From d9eed51f22174ef543823392b76a190f3c7f83a4 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 7 Mar 2016 23:22:23 +0000 Subject: gobble (7mar16) git-svn-id: svn://tug.org/texlive/trunk@39964 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/generic/gobble/README | 19 +++++++ .../texmf-dist/doc/generic/gobble/gobble-user.tex | 31 +++++++++++ Master/texmf-dist/doc/generic/gobble/gobble.pdf | Bin 0 -> 157385 bytes Master/texmf-dist/doc/generic/gobble/gobble.tex | 61 +++++++++++++++++++++ 4 files changed, 111 insertions(+) create mode 100644 Master/texmf-dist/doc/generic/gobble/README create mode 100644 Master/texmf-dist/doc/generic/gobble/gobble-user.tex create mode 100644 Master/texmf-dist/doc/generic/gobble/gobble.pdf create mode 100644 Master/texmf-dist/doc/generic/gobble/gobble.tex (limited to 'Master/texmf-dist/doc/generic/gobble') diff --git a/Master/texmf-dist/doc/generic/gobble/README b/Master/texmf-dist/doc/generic/gobble/README new file mode 100644 index 00000000000..df5d8c2fd02 --- /dev/null +++ b/Master/texmf-dist/doc/generic/gobble/README @@ -0,0 +1,19 @@ +LaTeX and generic TeX packages 'gobble' and 'gobble-user' +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Copyright (c) 2012 by Martin Scharrer +CTAN: http://www.ctan.org/pkg/gobble +Code repository: https://bitbucket.org/martin_scharrer/gobble + +The LaTeX package 'gobble' includes several gobble macros not +included in the LaTeX kernel. These macros remove a number of +arguments after them; a feature regulary used inside other +macros. This includes gobble macros for optional arguments. + +The LaTeX package 'gobble-user' provides these macros to the +user level, i.e. using names without '@', so that these can be +used without \makeatletter and \makeatother. + +The same macros are provided inside .tex files for use with +plain-TeX or other TeX formats. However, the gobble macros +for optional macros require \@ifnextchar to be defined. + diff --git a/Master/texmf-dist/doc/generic/gobble/gobble-user.tex b/Master/texmf-dist/doc/generic/gobble/gobble-user.tex new file mode 100644 index 00000000000..f5a6aef4e09 --- /dev/null +++ b/Master/texmf-dist/doc/generic/gobble/gobble-user.tex @@ -0,0 +1,31 @@ +\expandafter\ifx\csname gobble-user.tex loaded\endcsname\relax + \expandafter\def\csname gobble-user.tex loaded\endcsname{1}% +\else + \expandafter\endinput +\fi +\input{gobble} +\expandafter\edef\csname gobbletex@catcode\endcsname{% + \catcode`\noexpand\@=\the\catcode`\@% +}% +\catcode`\@=11 +\let\gobble\@gobble +\let\gobbletwo\@gobbletwo +\let\gobblethree\@gobblethree +\let\gobblefour\@gobblefour +\let\gobbleopt\@gobbleopt +\let\gobbletwoopt\@gobbletwoopt +\let\gobbleallopt\@gobbleallopt +\let\gobbletwoopttwo\@gobbletwoopttwo +\let\firstofone\@firstofone +\let\firstoftwo\@firstoftwo +\let\secondoftwo\@secondoftwo +\let\firstofthree\@firstofthree +\let\secondofthree\@secondofthree +\let\thirdofthree\@thirdofthree +\let\gobbletofi\@gobbletofi +\let\gobbletoelse\@gobbletoelse +\let\gobbletoor\@gobbletoor +\gobbletex@catcode +\endinput +%% +%% End of file `gobble-user.tex'. diff --git a/Master/texmf-dist/doc/generic/gobble/gobble.pdf b/Master/texmf-dist/doc/generic/gobble/gobble.pdf new file mode 100644 index 00000000000..cf3dd7a4cdb Binary files /dev/null and b/Master/texmf-dist/doc/generic/gobble/gobble.pdf differ diff --git a/Master/texmf-dist/doc/generic/gobble/gobble.tex b/Master/texmf-dist/doc/generic/gobble/gobble.tex new file mode 100644 index 00000000000..723fd4992db --- /dev/null +++ b/Master/texmf-dist/doc/generic/gobble/gobble.tex @@ -0,0 +1,61 @@ +\expandafter\ifx\csname gobble.tex loaded\endcsname\relax + \expandafter\def\csname gobble.tex loaded\endcsname{1}% +\else + \expandafter\endinput +\fi +\expandafter\edef\csname gobbletex@catcode\endcsname{% + \catcode`\noexpand\@=\the\catcode`\@% +}% +\catcode`\@=11 +\long\def\@gobble#1{}% +\long\def\@gobbletwo#1#2{}% +\long\def\@gobblethree#1#2#3{}% +\long\def\@gobblefour#1#2#3#4{}% +\long\def\@gobbleopt{% + \@ifnextchar[% + {\@gobbleopt@}% + {}% +}% +\def\@gobbleopt@[#1]{}% +\long\def\@gobbletwoopt{% + \@ifnextchar[% + {\@gobbletwoopt@}% + {}% +}% +\def\@gobbletwoopt@[#1]{\@gobbleopt}% +\long\def\@gobbleallopt{% + \@ifnextchar[% + {\@gobbleallopt@}% + {}% +}% +\long\def\@gobbleallopt@[#1]{% + \@ifnextchar[% + {\@gobbleallopt@}% + {}% +}% +\long\def\@gobbletwoopttwo{% + \@ifnextchar[% + {\@gobbletwoopttwo@}% + {\@gobbletwo}% +}% +\long\def\@gobbletwoopttwo@[#1]{% + \@ifnextchar[% + {\@gobbletwoopttwo@@}% + {\@gobbletwo}% +}% +\long\def\@gobbletwoopttwo@@[#1]{% + \@gobbletwo +}% +\long\def\@firstofone#1{#1}% +\long\def\@firstoftwo#1#2{#1}% +\long\def\@secondoftwo#1#2{#2}% +\long\def\@firstofthree#1#2#3{#1}% +\long\def\@secondofthree#1#2#3{#2}% +\long\def\@thirdofthree#1#2#3{#3}% +\long\def\@gobbletofi#1#2\fi{\fi#1}% +\long\def\@gobbletoelse#1#2\else{\else#1}% +\long\def\@gobbletoor#1#2\or{\or#1}% +\gobbletex@catcode +\endinput +%% +%% End of file `gobble.tex'. -- cgit v1.2.3