summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/makecmds/makecmds.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:58:32 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:58:32 +0000
commitbe6d4211836ea40a4fbbd23d3a23dc8349795b84 (patch)
tree0c0514ceedc92bab8890f24b2a4d401a16788839 /Master/texmf-dist/tex/latex/makecmds/makecmds.sty
parent90612109a8e91c754cfa5ab7b20630165c465436 (diff)
makecmds
git-svn-id: svn://tug.org/texlive/trunk@1063 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/makecmds/makecmds.sty')
-rw-r--r--Master/texmf-dist/tex/latex/makecmds/makecmds.sty95
1 files changed, 95 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/makecmds/makecmds.sty b/Master/texmf-dist/tex/latex/makecmds/makecmds.sty
new file mode 100644
index 00000000000..780525769f4
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/makecmds/makecmds.sty
@@ -0,0 +1,95 @@
+%%
+%% This is file `makecmds.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% makecmds.dtx (with options: `usc')
+%%
+%% Copyright 2000 Peter R. Wilson
+%%
+%% This program is provided under the terms of the
+%% LaTeX Project Public License distributed from CTAN
+%% archives in directory macros/latex/base/lppl.txt.
+%%
+%% Author: Peter Wilson (CUA)
+%% now at: peter.r.wilson@boeing.com
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{makecmds}[2000/05/27 v1.0 extra command making commands]
+
+\newif\ifm@kwarn
+ \m@kwarnfalse
+\DeclareOption{warn}{\m@kwarntrue}
+\ProcessOptions\relax
+
+\def\makecommand{\@star@or@long\m@ke@command}
+\def\m@ke@command#1{%
+ \ifx #1\undefined\else
+ \ifm@kwarn
+ \PackageWarning{makecmds}{Redefining command `\protect#1'}
+ \fi
+ \fi
+ \let\@ifdefinable\@rc@ifdefinable
+ \new@command#1}
+
+\def\provideenvironment{%
+ \@star@or@long\m@kprovide@environment}
+\def\m@kprovide@environment#1{%
+ \@ifundefined{#1}{%
+ \expandafter\let\csname#1\endcsname\relax
+ \expandafter\let\csname end#1\endcsname\relax
+ \new@environment{#1}}{\m@kdiscardenvargs{#1}}
+}
+\def\m@kdiscardenvargs#1{%
+ \@testopt{\m@kenva#1}0}
+\def\m@kenva#1[#2]{%
+ \@ifnextchar [{\m@kenvb#1[#2]}{\m@kthrowenv{#1}{[#2]}}}
+\def\m@kenvb#1[#2][#3]{\m@kthrowenv{#1}{[#2][#3]}}
+\def\m@kthrowenv#1#2#3#4{}
+
+\def\makeenvironment{\@star@or@long\m@ke@environment}
+\def\m@ke@environment#1{%
+ \@ifundefined{#1}{\new@environment{#1}}{%
+ \ifm@kwarn
+ \PackageWarning{makecmds}{Redefining environment `#1'}
+ \fi
+ \renew@environment{#1}}
+}
+
+\def\providelength#1{%
+ \ifx #1\undefined
+ \newlength{#1}
+ \fi
+}
+\def\makelength#1{%
+ \ifx #1\undefined
+ \newlength{#1}
+ \else
+ \ifm@kwarn
+ \PackageWarning{makecmds}{Redefining length `\protect#1'}
+ \fi
+ \newskip#1
+ \fi
+}
+
+\def\providecounter#1{%
+ \@ifundefined{c@#1}{\newcounter{#1}}{%
+ \@ifnextchar[{\m@k@gobbleendoptarg}{}}%
+}
+\def\makecounter#1{%
+ \expandafter\ifx \csname c@#1\endcsname \undefined
+ \else
+ \ifm@kwarn
+ \PackageWarning{makecmds}{Redefining counter `#1'}
+ \fi
+ \fi
+ \@definecounter{#1}%
+ \@ifnextchar[{\@newctr{#1}}{}
+}
+
+\def\m@k@gobbleendoptarg[#1]{}
+
+\endinput
+%%
+%% End of file `makecmds.sty'.