Hi All ConTeXt lovers!

I am studying physics at Örebro University in Sweden and often produce
documents report from experiments. For Me it naturally fells in to use
Context typesetting together with tools like octave and Gnuplot. 

The issue until now, has been when you need to transer data from octave
output textfiles to a representable table in a context document.

Hardwriting all \NC and \HL stuff together with cut and paste method is
time consuming. But thanks to Hans, Wolfgang, Taco and Mojca I successfully
manage to import experiment values from a textfile (that also Gnuplot
can read and do graphic) to a nice table with caption so you can refer
to it in the textflow.

So I decided to contribute my successfull result in attached
examplefiles.

Thanks and all wishes!

Jan-Erik Hägglöf 


% engine=luatex
\mainlanguage[sv]
\setupinteraction[state=start]
\setupcolors[state=start]
% \environments
\usemodule[database]
\unprotect
\startsetups TSV:unix
 \catcode \#=\@@comment
\stopsetups
\protect
\defineseparatedlist[TSV][separator=tab,before=,after=,first=\bTR,last=\eTR,left=\bTD,right=\eTD]
\setupTABLE[r][1][style=bold,background=color,backgroundcolor=gray]
\starttext
\placetable[here][tab:test]{caption}
{\bgroup
\bTABLE
\startTSV 
time $ T $(s)	Decay  $ \frac{d\nu}{dt} $ 	error $ \delta \nu'=\sqrt{\nu} $
\stopTSV
\processseparatedfile[TSV][sndfall.dat] 
\eTABLE \egroup}

As you can see in table(\ref[t][tab:test]) it works out well in this experiment.
\stoptext
# time decay errors
24.5    38.528  6.21
44.5    24.139  4.91
64.5    17.250  4.15
84.5    12.806  3.58
104.5   8.361   2.89
129     6.278   2.51
159     4.861   2.2
189     3.917   1.98
219     3.973   1.99
249     2.973   1.72
279     2.556   1.6
322.5   2.150   1.47
382.5   1.739   1.32
442.5   1.150   1.07
502.5   0.750   0.87
562.5   0.628   0.79


















___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to