summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-05-13 23:46:45 +0000
committerKarl Berry <karl@freefriends.org>2013-05-13 23:46:45 +0000
commit37779918ae3fb37b74b1153c61c19b3e3c8aa501 (patch)
tree286a3e244e0e66624e31e66f752e6751ac7417a0 /Master
parent53fd1db4e92c7f40124c92de9c43b455aa7f29bb (diff)
memory (13may13)
git-svn-id: svn://tug.org/texlive/trunk@30452 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/memory/README45
-rw-r--r--Master/texmf-dist/doc/latex/memory/memory.pdfbin0 -> 30008 bytes
-rw-r--r--Master/texmf-dist/source/latex/memory/memory.dtx136
-rw-r--r--Master/texmf-dist/source/latex/memory/memory.ins55
-rw-r--r--Master/texmf-dist/tex/latex/memory/memory.sty46
-rw-r--r--Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/memory.tlpsrc0
7 files changed, 283 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/memory/README b/Master/texmf-dist/doc/latex/memory/README
new file mode 100644
index 00000000000..625922a8a0c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/memory/README
@@ -0,0 +1,45 @@
+Copyright (C) 2013 by Song Zhiwei <songzw@gmail.com>
+
+The package memory.sty provides an easy way to declare object or array
+containers. If you are considering to use an auxiliary file, you really
+need this package rather than the heavy I/O manipulation.
+
+Usage:
+
+ 1. Declares a data variable in local scope or global scope.
+
+ \newdata{<local variable name>}
+ \newdata*{<global variable name>}
+
+ e.g. \newdata{Person} % Note: no backslash for variable declaration
+ \newdata*{Time} % Note: \Time is declared in global scope
+
+ 2. Uses = or := to set value. The := version sets expanded value to variable.
+
+ 1) Sets value as a single variable
+
+ \Person = {Song Zhiwei} % Note: add backslash for declared variable
+ \Time := \today % Note: set the expanded result of \today to \Time
+
+ 2) Sets value as an array.
+
+ \Person[1] = {28.3}
+
+ 3) Sets value as a multiple dimensional array.
+
+ \Time[2,5,\thesection] = \today % Note: the value will be saved globally
+ % for the global variable
+
+ 4) Sets value as an object.
+
+ \Person[description] = {A Chinese gentleman.}
+ \Person[hair] = {black}
+
+ 3. Gets values.
+
+ \Person % Song Zhiwei
+ \Time % May 13, 2013
+ \Person[1] % 28.3
+ \Time[2,5,\thesection] % May 13, 2013
+ \Person[description] % A Chinese gentleman.
+ \Person[hair] % black
diff --git a/Master/texmf-dist/doc/latex/memory/memory.pdf b/Master/texmf-dist/doc/latex/memory/memory.pdf
new file mode 100644
index 00000000000..5a6e3b478a5
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/memory/memory.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/memory/memory.dtx b/Master/texmf-dist/source/latex/memory/memory.dtx
new file mode 100644
index 00000000000..537757498bc
--- /dev/null
+++ b/Master/texmf-dist/source/latex/memory/memory.dtx
@@ -0,0 +1,136 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2013 by Song Zhiwei <songzw@gmail.com>
+% -----------------------------------------------------------
+%
+% This file may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3c 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
+%
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2006/05/20 or later.
+%
+% \fi
+%
+% \iffalse
+%
+%<*driver>
+\ProvidesFile{memory.dtx}
+%</driver>
+%<memory>\NeedsTeXFormat{LaTeX2e}[2003/12/01]
+%<memory>\ProvidesPackage{memory}
+%<*memory>
+ [2013/05/13 v1.2 containers for data of object and array in LaTeX]
+%</memory>
+%<*driver>
+\documentclass[a4paper]{ltxdoc}
+\usepackage{memory}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\OnlyDescription
+\begin{document}
+ \DocInput{memory.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{69}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% \changes{v1.2}{2013/05/13}{Uses := to set the expanded value to a variable}
+% \changes{v1.1}{2013/05/11}{Reports warning when redeclaring a variable}
+% \changes{v1.0}{2013/05/10}{Initial version}
+%
+% \GetFileInfo{memory.dtx}
+%
+% \DoNotIndex{}
+%
+% \title{The \textsf{memory} package\thanks{This document
+% corresponds to \textsf{memory}~\fileversion, dated \filedate.}}
+% \author{Song Zhiwei\\\texttt{songzw@gmail.com}}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% The package memory.sty provides an easy way to declare object or array
+% containers.
+% If you are considering to use an auxiliary file, you really need
+% this package rather than the heavy I/O manipulation.
+%
+% \section{Usage}
+% \newcommand\MyDescribeMacro[1]{\marginpar{\raggedleft\strut\MacroFont#1}}
+% \DescribeMacro{\newdata\marg{variable}}
+% \DescribeMacro{\newdata*\marg{variable}}
+% These macros declare data variables locally and globally, respectively.
+% The value for star version is also saved globally.
+% \begin{verbatim}\newdata{Person} % Note: no backslash for the variable declaration
+%\newdata*{Time}\end{verbatim}\newdata{Person} \newdata*{Time}
+% Uses = or := to set value. The := version sets the expanded value to variable.
+% \MyDescribeMacro{\textbackslash\meta{var}\oarg{p}=\marg{value}}%
+% \MyDescribeMacro{\textbackslash\meta{var}\oarg{p}:=\marg{value}}\\[0.5em]
+% -- Sets value as a single variable.
+% \begin{verbatim}\Person = {Song Zhiwei} % Note: add backslash for declared variable
+%\Time := \today\end{verbatim}
+% \Person = {Song Zhiwei} \Time := \today
+% -- Sets value as an array.
+% \begin{verbatim}\Person[1] = {28.3}\end{verbatim}\Person[1] = {28.3}
+% -- Sets value as a multiple dimensional array.
+% \begin{verbatim}\Time[2,5,\thesection] = {13 May 2013}\end{verbatim}
+% \Time[2,5,\thesection] = {13 May 2013}
+% -- Sets value as an object.
+% \begin{verbatim}\Person[description] = {A Chinese gentleman.}
+%\Person[hair] = {black}\end{verbatim}
+% \Person[description] = {A Chinese gentleman.}
+% \Person[hair] = {black}
+% -- Gets values.
+% \MyDescribeMacro{\textbackslash\meta{variable}\oarg{p}}
+% \begin{center}\newcommand\VRule{\rule[-0.2em]{0.4pt}{1.2em}}
+% \verb|\Person|\hfill\VRule\quad\makebox[12em][l]{\Person}\\
+% \verb|\Time|\hfill\VRule\quad\makebox[12em][l]{\Time}\\
+% \verb|\Person[1]|\hfill\VRule\quad\makebox[12em][l]{\Person[1]}\\
+% \verb|\Time[2,5,\thesection]|\hfill\VRule\quad\makebox[12em][l]{\Time[2,5,\thesection]}\\
+% \verb|\Person[description]|\hfill\VRule\quad\makebox[12em][l]{\Person[description]}\\
+% \verb|\Person[hair]|\hfill\VRule\quad\makebox[12em][l]{\Person[hair]}
+% \end{center}
+%
+% \StopEventually{}
+\def\set@memory#1#2=#3{\if#1*\expandafter\gdef\csname#2\endcsname{#3}%
+ \else\expandafter\def\csname#2\endcsname{#3}\fi}
+\def\eset@memory#1#2=#3{\if#1*\expandafter\xdef\csname#2\endcsname{#3}%
+ \else\expandafter\edef\csname#2\endcsname{#3}\fi}
+\def\etest@memory#1#2:{\@ifnextchar={\eset@memory{#1}{#2}}
+ {\csname #2\endcsname:}}
+\def\data@memory#1#2{\@ifnextchar={\set@memory{#1}{@#2@memory}}
+ {\@ifnextchar:{\etest@memory{#1}{@#2@memory}}
+ {\csname @#2@memory\endcsname}}}
+\def\array@memory#1#2[#3]{\data@memory{#1}{#2@#3}}
+\def\newdata@memory#1#2{\@ifundefined{#2}
+ {\if#1*\expandafter\gdef\csname#2\endcsname{\@ifnextchar[
+ {\array@memory{#1}{#2}}{\data@memory{#1}{#2}}}%
+ \else \expandafter\def\csname#2\endcsname{\@ifnextchar[
+ {\array@memory{#1}{#2}}{\data@memory{#1}{#2}}}\fi}
+ {\PackageWarningNoLine{memory}{`#2' already defined.
+ Macro `newdata' ignored!}}}
+\def\newdata{\@ifnextchar*{\newdata@memory}{\newdata@memory{}}}
+% \Finale
+\endinput
diff --git a/Master/texmf-dist/source/latex/memory/memory.ins b/Master/texmf-dist/source/latex/memory/memory.ins
new file mode 100644
index 00000000000..5bc4e75388b
--- /dev/null
+++ b/Master/texmf-dist/source/latex/memory/memory.ins
@@ -0,0 +1,55 @@
+%%
+%% Copyright (C) 2013 by Song Zhiwei <songzw@gmail.com>
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3c 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
+%%
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2006/05/20 or later.
+%%
+
+\input docstrip.tex
+\keepsilent
+
+\usedir{tex/latex/memory}
+
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2013 by Song Zhiwei <songzw@gmail.com>
+
+This file may be distributed and/or modified under the conditions of
+the LaTeX Project Public License, either version 1.3c 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 32
+
+and version 1.3c or later is part of all distributions of LaTeX
+version 2006/05/20 or later.
+
+\endpreamble
+
+\generate{\file{memory.sty}{\from{memory.dtx}{memory}}}
+
+\obeyspaces
+\Msg{*************************************************************}
+\Msg{* *}
+\Msg{* To finish the installation you have to move the following *}
+\Msg{* file into a directory searched by TeX: *}
+\Msg{* *}
+\Msg{* memory.sty *}
+\Msg{* *}
+\Msg{* To produce the documentation run the file memory.dtx *}
+\Msg{* through LaTeX. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{* *}
+\Msg{*************************************************************}
+
+\endbatchfile
diff --git a/Master/texmf-dist/tex/latex/memory/memory.sty b/Master/texmf-dist/tex/latex/memory/memory.sty
new file mode 100644
index 00000000000..19c1d68c83f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/memory/memory.sty
@@ -0,0 +1,46 @@
+%%
+%% This is file `memory.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% memory.dtx (with options: `memory')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2013 by Song Zhiwei <songzw@gmail.com>
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3c 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 32
+%%
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2006/05/20 or later.
+%%
+\NeedsTeXFormat{LaTeX2e}[2003/12/01]
+\ProvidesPackage{memory}
+ [2013/05/13 v1.2 containers for data of object and array in LaTeX]
+\def\set@memory#1#2=#3{\if#1*\expandafter\gdef\csname#2\endcsname{#3}%
+ \else\expandafter\def\csname#2\endcsname{#3}\fi}
+\def\eset@memory#1#2=#3{\if#1*\expandafter\xdef\csname#2\endcsname{#3}%
+ \else\expandafter\edef\csname#2\endcsname{#3}\fi}
+\def\etest@memory#1#2:{\@ifnextchar={\eset@memory{#1}{#2}}
+ {\csname #2\endcsname:}}
+\def\data@memory#1#2{\@ifnextchar={\set@memory{#1}{@#2@memory}}
+ {\@ifnextchar:{\etest@memory{#1}{@#2@memory}}
+ {\csname @#2@memory\endcsname}}}
+\def\array@memory#1#2[#3]{\data@memory{#1}{#2@#3}}
+\def\newdata@memory#1#2{\@ifundefined{#2}
+ {\if#1*\expandafter\gdef\csname#2\endcsname{\@ifnextchar[
+ {\array@memory{#1}{#2}}{\data@memory{#1}{#2}}}%
+ \else \expandafter\def\csname#2\endcsname{\@ifnextchar[
+ {\array@memory{#1}{#2}}{\data@memory{#1}{#2}}}\fi}
+ {\PackageWarningNoLine{memory}{`#2' already defined.
+ Macro `newdata' ignored!}}}
+\def\newdata{\@ifnextchar*{\newdata@memory}{\newdata@memory{}}}
+\endinput
+%%
+%% End of file `memory.sty'.
diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
index d4ef9d46dc5..aa9a332f2b5 100644
--- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
@@ -480,6 +480,7 @@ depend mdframed
depend media9
depend meetingmins
depend memexsupp
+depend memory
depend menu
depend menukeys
depend method
diff --git a/Master/tlpkg/tlpsrc/memory.tlpsrc b/Master/tlpkg/tlpsrc/memory.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/memory.tlpsrc