Changes

Jump to navigation Jump to search
17 bytes removed ,  04:03, 1 June 2016
new example
< [[source:m-database.tex|m-database source]] | [http://dl.contextgarden.net/myway/csv.pdf MyWay] | [[Tables Overview]] >
{{todo|more examples and explanation}}
<texcode>\usemodule[database]== Inline ==
\defineseparatedlist [MyTable][ separator=tab, before=\bTABLE, after=\eTABLE, first=\bTR, last=\eTR, left=\bTD, right=\eTD, commentchar=\letterpercent,]% The % must (This might be set as the comment char explicitly, because by default its catcode is changed.outdated)
% columns are separated with a tab (not with a space)\startMyTable% Cows in Holland, 1 unit meaning 1000 cows.Cows Total Milking Pregnant01/1995 1709 1449 26001/1996 1713 1444 269... ... ... ...11/2004 1457 1295 16111/2005 1421 1263 158\stopMyTable</texcode> <contextsource=yes mode=mkiv>
\setuplayout[scale=0.8]
\setupcolors[state=start]
11/2005 1421 1263 158
\stopMyTable
 
%load from a file
%\processseparatedfile[TSV][cows.tsv]
 
</context>
 
==Data from File==
 
(This is current as of 2016-05-31)
 
<context source=yes mode=mkiv>
\usemodule[database]
 
\starttext
 
\defineseparatedlist
[test]
[separator=space, % tab
before=\bTABLE,after=\eTABLE,
first=\bTR,last=\eTR,
left=\bTD,right=\eTD]
 
\processdatabasefile[test][csv.csv]
 
\stoptext
</context>
==Links==
* [http://www.physik.uni-freiburg.de/~doerr/exceltex/index.en.html exceltex] - LaTeX package to fetch data from Excel documents ([http://www.rubygarden.org/ruby?ScriptingExcelScripting Excel article])
* [http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=tab4tex tab4tex] - Preprocessor for LaTeX tabular environments
* [http://dl.contextgarden.net/myway/csv.pdf MyWay] about CSV
* [http://www.ntg.nl/maps/42/12.pdf Using ConTeXt with databases] (article in NTG-MAPS)
[[Category:Tables]]

Navigation menu