diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:51:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:51:47 +0000 |
commit | 5c05ea484fef59422c02c364886090dba1484888 (patch) | |
tree | 443d9a2ff9aaf5893b6de81c7c81799c07b30210 /Master/texmf-dist/tex/latex/autotab | |
parent | 59c94a0a96e936395186b2fc9e5aa3a20ad148da (diff) |
autotab
git-svn-id: svn://tug.org/texlive/trunk@686 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/autotab')
-rw-r--r-- | Master/texmf-dist/tex/latex/autotab/autotab.sty | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/autotab/autotab.sty b/Master/texmf-dist/tex/latex/autotab/autotab.sty new file mode 100644 index 00000000000..840acfc7346 --- /dev/null +++ b/Master/texmf-dist/tex/latex/autotab/autotab.sty @@ -0,0 +1,45 @@ +% This is autotab.sty as of 5. October 1989 +% written by Gabriele Kruljac +% Max-Planck-Institute Stuttgart +% kruljac@ds0mpi11 +% this style generates tabular lines from data files +% see autotab.tex for a description +% +% notice that the input data has to be written in valid TeX syntax +% (i.e. \_, \% and so on) +% +% The name of the input data file will be read from the terminal +% everytime the command \readtabline{...} is used + +\typeout{Document substyle `autotab' by MPI FKF, Version 1.0 as of 5. October 1989} + +\newif\ifnoteof +\newcount\reccount +\def\testeof{\ifeof10\global\noteoffalse\else\global\noteoftrue\fi} + +\long\def\readtabline#1{% +\global\def\autotabline{} +\let\septabline={\noexpand\septabline} +\let\septabcol={\noexpand\septabcol} +\let\savenu=\" +\let\"=u +\noteoftrue +\message{Please type the name of the tabular input data file:} +\read16 to\inputfile +\openin10=\inputfile +\loop + \read10 to\inrec + \testeof +\ifnoteof + \advance\reccount by 1 + \ifnum\reccount=#1 + \global\edef\autotabline{\autotabline\inrec\septabline} + \reccount=0 + \else + \global\edef\autotabline{\autotabline\inrec\septabcol} + \fi +\repeat +\closein10 +\let\"=\savenu +\global\let\septabcol=& +\global\let\septabline=\\} |