From 37779918ae3fb37b74b1153c61c19b3e3c8aa501 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 13 May 2013 23:46:45 +0000 Subject: memory (13may13) git-svn-id: svn://tug.org/texlive/trunk@30452 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/memory/README | 45 ++++++++++++++++++++++++++ Master/texmf-dist/doc/latex/memory/memory.pdf | Bin 0 -> 30008 bytes 2 files changed, 45 insertions(+) create mode 100644 Master/texmf-dist/doc/latex/memory/README create mode 100644 Master/texmf-dist/doc/latex/memory/memory.pdf (limited to 'Master/texmf-dist/doc/latex/memory') 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 + +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{} + \newdata*{} + + 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 Binary files /dev/null and b/Master/texmf-dist/doc/latex/memory/memory.pdf differ -- cgit v1.2.3