From: "Jan-Erik Hägglöf" <janerik.hagglof@bredband.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: caption in TSV tables
Date: Fri, 13 Jun 2008 09:48:28 +0200 [thread overview]
Message-ID: <1213343308.7887.21.camel@djsameman> (raw)
[-- Attachment #1: Type: text/plain, Size: 830 bytes --]
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
[-- Attachment #2: tsvmall.tex --]
[-- Type: text/x-matlab, Size: 682 bytes --]
% 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
[-- Attachment #3: sndfall.dat --]
[-- Type: text/plain, Size: 296 bytes --]
# 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
[-- Attachment #4: Type: text/plain, Size: 487 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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 other threads:[~2008-06-13 7:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1213343308.7887.21.camel@djsameman \
--to=janerik.hagglof@bredband.net \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).