summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/storecmd
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/storecmd')
-rw-r--r--Master/texmf-dist/doc/latex/storecmd/README105
-rw-r--r--Master/texmf-dist/doc/latex/storecmd/storecmd-example.tex29
2 files changed, 134 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/storecmd/README b/Master/texmf-dist/doc/latex/storecmd/README
new file mode 100644
index 00000000000..e380405f9d8
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/storecmd/README
@@ -0,0 +1,105 @@
+This is the README file for the 'storecmd' package.
+
+VERSION
+
+Version 0.0.1, October 2011.
+
+SUMMARY
+
+This package provides macros for command definition that save the
+name of the command being defined in a file or a macro container.
+It was written in response to a post on comp.text.tex for a macro
+that will define commands and also save the commands being defined
+in a file or a container macro for spelling exceptions. Three
+macros are provided for this purpose:
+
+\defsavecmd<cmd><param>{<defn>}
+\newsavecmd<cmd><param>{<defn>}
+\renewsavecmd<cmd><param>{<defn>}
+
+Here <cmd> is the command name, <param> is the parameter list, and
+<defn> is the replacement text. In \defsavecmd, the <param> list is
+as in \def; in \newsavecmd and \renewsavecmd, the <param> list is
+as in \newcommand. \defsavecmd will overwrite an existing command;
+both \newsavecmd and \renewsavecmd will not do so.
+
+The commands \defsavecmd, \newsavecmd and \renewsavecmd may be
+prefixed by \globalcmd and/or \protectedcmd to yield global or robust
+definitions, respectively.
+
+The package options are:
+
+neversave - Never save/store the new commands in the container
+ file or command. The new commands will still be defined.
+ Default: false
+
+storerenew - Allow the storage of a command that has already
+ been stored. This is used by \renewsavecmd.
+ Default: false.
+
+overwrite - Allow overwrite of an existing container file or
+ command. Default: false.
+
+storefile - Container file. Default: cmdnamesfile.
+
+storecmd - Container command. Default: cmdnamesmacro.
+
+verbose - Give extra information in the transcript file.
+ Default: true. Turn this off if you don't like
+ or need such information.
+
+
+EXAMPLE FILE
+
+\begin{filecontents}{storecmd-example.tex}
+\documentclass{article}
+% Container commands are also accepted as package options,
+% but in this case 'catoptions' must be loaded before
+% \usepackage{storecmd}.
+% Eg,
+% \usepackage{catoptions}
+% \usepackage[storecmd=\mycommands]{storecmd}
+%
+% Uncomment the next line to test what happens when
+% an existing command is being refilled:
+% \def\mycommands{}
+
+\usepackage[
+ storerenew=true,storecmd=mycommands,storefile=mycommands
+]{storecmd}
+
+\defsavecmd\cmda#1#2{xxx#1#2}
+\globalcmd\defsavecmd\cmdb#1#2{xxx#1#2}
+\globalcmd\newsavecmd\cmdc[2]{xxx#1#2}
+\globalcmd\newsavecmd\cmdd[2][yy]{xxx#1#2}
+\protectedcmd\globalcmd\renewsavecmd*\cmda[2][zz]{\def\y##1{##1xxx}}
+
+% Try \show\mycommands or see file 'mycommands.tex'.
+
+\begin{document}
+Blackberry lily.
+\end{document}
+\end{filecontents}
+
+
+LICENSE
+
+Copyright (c) October 2011 Ahmed Musa (amusa22@gmail.com)
+
+This work (ie, all the files in the storecmd manifest) may be
+distributed and/or modified under the conditions of the LaTeX
+Project Public License (LPPL), either version 1.3 of this license or
+any later version. The latest version of this license is in
+http://www.latex-project.org/lppl.txt and version 1.3 or later
+is part of all distributions of LaTeX version 2005/12/01 or later.
+
+The LPPL maintenance status of this software is 'author-maintained'.
+
+This software is provided 'as it is', without warranty of any
+kind, either expressed or implied, including, but not limited to,
+the implied warranties of merchantability and fitness for a
+particular purpose.
+
+
+
+
diff --git a/Master/texmf-dist/doc/latex/storecmd/storecmd-example.tex b/Master/texmf-dist/doc/latex/storecmd/storecmd-example.tex
new file mode 100644
index 00000000000..c1325c8d9f6
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/storecmd/storecmd-example.tex
@@ -0,0 +1,29 @@
+\documentclass{article}
+% Container commands are also accepted as package options,
+% but in this case 'catoptions' must be loaded before
+% \usepackage{storecmd}.
+% Eg,
+% \usepackage{catoptions}
+% \usepackage[storecmd=\mycommands]{storecmd}
+%
+% Uncomment the next line to test what happens when
+% an existing command is being refilled:
+% \def\mycommands{}
+
+\usepackage[
+ storerenew=false,storecmd=mycommands,storefile=mycommands
+]{storecmd}
+
+\defsavecmd\cmda#1#2{xxx#1#2}
+\globalcmd\defsavecmd\cmdb#1#2{xxx#1#2}
+\globalcmd\newsavecmd\cmdc[2]{xxx#1#2}
+\globalcmd\newsavecmd\cmdd[2][yy]{xxx#1#2}
+\protectedcmd\globalcmd\renewsavecmd*\cmda[2][zz]{\def\y##1{##1xxx}}
+
+% Try \show\mycommands or see file 'mycommands.tex'.
+
+\begin{document}
+
+Blackberry lily.
+
+\end{document}