Settings Help
CTAN
Comprehensive TeX Archive Network
Home Upload Browse

Direc­tory tex-archive/macros/latex/contrib/memory

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

Files

Name Size Date Notes
README 1493 2013-05-13 11:18:57
memory.dtx 5708 2013-05-13 11:22:16
memory.ins 1942 2013-05-10 08:07:28
memory.pdf 30008 2013-05-13 11:21:00

Down­load the com­plete con­tents of this di­rec­tory in one zip archive (31.8k).

mem­ory – Con­tain­ers for data in LaTeX

The pack­age al­lows the user to de­clare sin­gle ob­ject or ar­ray con­tain­ers.

Doc­u­men­ta­tion
Ver­sion1.2
Li­censeThe LaTeX Project Public Li­cense 1.3
Copy­right2013 Song Zhi­wei
Main­tainerSong Zhi­wei
Con­tained inTeXLive as mem­ory
MiKTeX as mem­ory
Topics sup­port for de­vel­op­ment of (La)TeX macros
Guest Book Sitemap Contact 2014-04-20 12:46 CEST