* merging data from four files in one document
@ 2007-09-19 12:47 Jelle Huisman
2007-09-19 13:48 ` Aditya Mahajan
0 siblings, 1 reply; 3+ messages in thread
From: Jelle Huisman @ 2007-09-19 12:47 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi all,
I try to merge data from four files in one document. The source files
are simple text files, each with 420 numbered lines of text. I have
created a simple natural table with cells for the different pieces of
data. I would like to make one document with 420 tables, each with the
right data from the four source files (so Table 1 with data from line 1
from file One and line 1 from file Two and line 1 from file Three and
line 1 from file Four, and next Table 2 with data from line 2 from file
One and line 2 from file Two et cetera...) What is the best way to
automate this process?
Thanks,
Jelle
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: merging data from four files in one document
2007-09-19 12:47 merging data from four files in one document Jelle Huisman
@ 2007-09-19 13:48 ` Aditya Mahajan
2007-09-20 8:42 ` Jelle Huisman
0 siblings, 1 reply; 3+ messages in thread
From: Aditya Mahajan @ 2007-09-19 13:48 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Wed, 19 Sep 2007, Jelle Huisman wrote:
> Hi all,
>
> I try to merge data from four files in one document. The source files
> are simple text files, each with 420 numbered lines of text. I have
> created a simple natural table with cells for the different pieces of
> data. I would like to make one document with 420 tables, each with the
> right data from the four source files (so Table 1 with data from line 1
> from file One and line 1 from file Two and line 1 from file Three and
> line 1 from file Four, and next Table 2 with data from line 2 from file
> One and line 2 from file Two et cetera...) What is the best way to
> automate this process?
Write a script in your favourite language to create the 420 natural
tables. Then call your script from ConTeXt and then use \write18 or
\executesystemcommand to run it (See
http://wiki.contextgarden.net/executesystemcommand and
http://wiki.contextgarden.net/Write18), and then \input the file that
is created.
You can also do the whole thing in TeX, but IMHO it is not worth the
effort. An alternative may be to use LuaTeX, where you write your
script in lua, and execute it directly in luatex. This will have a
slight speed advantage.
Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-09-20 8:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-19 12:47 merging data from four files in one document Jelle Huisman
2007-09-19 13:48 ` Aditya Mahajan
2007-09-20 8:42 ` Jelle Huisman
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).