diff options
Diffstat (limited to 'obsolete/macros/latex/contrib/cellwise')
-rw-r--r-- | obsolete/macros/latex/contrib/cellwise/README | 4 | ||||
-rw-r--r-- | obsolete/macros/latex/contrib/cellwise/cellwise.sty | 41 | ||||
-rw-r--r-- | obsolete/macros/latex/contrib/cellwise/cellwise.tex | 73 |
3 files changed, 118 insertions, 0 deletions
diff --git a/obsolete/macros/latex/contrib/cellwise/README b/obsolete/macros/latex/contrib/cellwise/README new file mode 100644 index 0000000000..7e8a482f4c --- /dev/null +++ b/obsolete/macros/latex/contrib/cellwise/README @@ -0,0 +1,4 @@ +A pure TeX macro to build tables cellwise, passing formats and commands to tables, cells, lines or columns, enhanced by a simple notes-function to add notes to every cell. + + + diff --git a/obsolete/macros/latex/contrib/cellwise/cellwise.sty b/obsolete/macros/latex/contrib/cellwise/cellwise.sty new file mode 100644 index 0000000000..0ad440cdcd --- /dev/null +++ b/obsolete/macros/latex/contrib/cellwise/cellwise.sty @@ -0,0 +1,41 @@ +\def\cellwise{\centerline{CELLWISE - a \TeX{}-macro }\centerline{Matthias Borck-Elsner matthias at kleinesnetzwerk.net}\vskip\baselineskip }%The + %title +\newdimen\cellnotesize +\newdimen\cellwidth +\newdimen\cellheight +\newdimen\cellwall +\newcount\cells +\newcount\cellfloors +\newcount\cellblocks +\newcount\jails +\newcount\cellnotes +\def\cellnotefont{cmr8} +\def\jailcmds{} +\def\cellblockcmds{} +\def\cellfloorcmds{} +\def\cellcmds{} +\def\cellno{} +\newwrite\cntnotes +\immediate\openout\cntnotes=\jobname.cnt\relax + \font\cellnotesize=\cellnotefont + \def\cellnote#1{\global\advance\cellnotes by 1 + $^{\the\cellnotes}$\immediate\write\cntnotes{ +\cellnotesize{\cellno $^{\the\cellnotes}$ #1 \hfill\vskip0.1\baselineskip }}}% +\def\thecellnotes[#1]{#1 \vskip\baselineskip \immediate\closeout\cntnotes \input\jobname.cnt \relax}% + +\cellwidth=4cm \cellheight=4cm \cellwall=10pt +\def\cellrag#1{#1} +\def\jailname#1{#1 \vskip1.0\baselineskip} +\def\jail#1{\advance\jails by 1 \cellblocks=0 \cellfloors=0 \cells=0 + \parindent=0pt \jailcmds \vskip0.5\baselineskip #1}% +% +\def\cellblock#1{\advance\cellblocks by 1 \parindent=0pt \cellblockcmds #1 \vskip0.5\baselineskip }% +% +\def\cellfloor#1{\advance\cellfloors by 1 \parindent=0pt \hbox{\cellfloorcmds #1} \vskip0.5\baselineskip } +% +\def\cell#1{ \parindent=0pt % +\advance\cells by 1 \vtop{\hsize=\cellwidth \cellnoshow \cellcmds + \vskip0.5\baselineskip \cellrag #1 \vfill + \vskip0.5\baselineskip}\hskip\cellwall} + + diff --git a/obsolete/macros/latex/contrib/cellwise/cellwise.tex b/obsolete/macros/latex/contrib/cellwise/cellwise.tex new file mode 100644 index 0000000000..0563b16055 --- /dev/null +++ b/obsolete/macros/latex/contrib/cellwise/cellwise.tex @@ -0,0 +1,73 @@ + +\input cellwise.sty +\cellwise +\def\jailcmds{\ifnum \the\jails=1 \rm \else\fi} +\def\cellblockcmds{\ifnum \the\cellblocks=1 \sl \else\fi} +\def\cellfloorcmds{\ifnum \the\cellfloors=1 \it \else\fi} +\def\cellcmds{\ifnum\the\cellfloors=1 \ifnum \the\cells=3 \tt \else \fi\fi} +\def\cellno{\the\jails.\the\cellblocks.\the\cellfloors.\the\cells} +\parindent=0pt +This is a pure \TeX{} macro. The macro enables you to define jails (= tables), +cellblocks(= tablesegments),cellfloors (=tablelines) and cells (= single +cells) and to pass commands to them.Columns are represented by a series of +cells(= all cells having the No. 3 make a column). Includes a simple notes function to place notes in a cell. Examples +below. The code has not more than 38 lines, I think there is no need to +comment it. \vskip\baselineskip + +\vbox{ +Example 1: The command $\backslash jailcmds \{\backslash ifnum \backslash +the \backslash jails=2 \backslash rm \backslash else \backslash fi\}$ +tells \TeX{} to type the whole jail (=table) rm as long as no other +command is given at a lower level.} +\vskip\baselineskip +\vbox{Example 2: The command $\backslash cellblockcmds \{\backslash +ifnum \backslash the \backslash cellblocks=2 \backslash sl \backslash else \backslash fi\}$ +tells \TeX{} to type the whole cellblock (=tablesegment) slanted as long as no other +command is given at a lower level.} +\vskip\baselineskip + +\vbox{Example 3: The command $\backslash cellfloorcmds \{\backslash ifnum \backslash +the \backslash cellfloors=2 \backslash it \backslash else \backslash fi\}$ +tells \TeX{} to type the whole cellfloor (=tableline) italic as long as no +other command is given at a lower level.} +\vbox{Example 4: The command $\backslash cellcmds \{\backslash ifnum \backslash +the \backslash cells=2 \backslash tt \backslash else \backslash fi\}$ +tells \TeX{} to type the second cell in every jail/block/floor with boldface.} +Commands maybe combined by the $\backslash if \backslash fi$ routines. +Next feature will be, to let a text flow through the jails, blocks, floors and +cells, but this is not worked out yet. The command will be defined +as $\backslash$ cellchain. +\cellrag{\raggedright} +\def\cellnoshow{} +\jail{\jailname{\centerline{Example 5: JAILHOUSE ROCK}}% +\cellblock{% +\cellfloor{% +\cell{Spider Murphy\cellnote{Tenor Saxophone}} +\cell{Little Joe \cellnote{Slide Trombone}} +\cell{Escaped \cellnote{none}} +}% +\cellfloor{% +\cell{Purple Gang \cellnote{Rhythm Section}} +\cell{Escaped \cellnote{none}} +\cell{Escaped \cellnote{none}} +}% +\cellfloor{% +\cell{No.47} +\cell{No.3} +\cell{Escaped \cellnote{none}} +}% +\cellfloor{% +\cell{Shifty Henry \cellnote{Wants to make a break}} +\cell{Bugs\cellnote{Says:``Nix Nix''}} +\cell{Escaped \cellnote{none}} +}% +}% +}% + +\cellblock{ +\cellfloor{\cell{}} +\cellfloor{ +\cell{}\cell{} +}} +{\thecellnotes[Instruments]}% +\bye |