ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Willi Egger <w.egger@boede.nl>
Subject: Database....
Date: 07 Jul 2003 12:13:39 +0200	[thread overview]
Message-ID: <1057572818.2597.8.camel@linux.local> (raw)

[-- Attachment #1: Type: text/plain, Size: 289 bytes --]

Hi Contexters

Is there anybody who has experionce with the database options as
described in core-dat?

I tried to setup an address-database. But I am unable to get it working.
I get an error message saying "missing \endcsname"

Please have a look at the enclosed testfiles.

Cheers Willi

[-- Attachment #2: database.tex --]
[-- Type: text/x-tex, Size: 1336 bytes --]

% Sample record

\def\DoWithRecord#1%
   {\startpacked
    \let\\=\quad
    name:  \getrecordentry{name}~\getrecordentry{family name}\par
    address: \getrecordentry{postal address}\par
    \stoppacked}

\definerecord[address][command=\DoWithRecord]
\setuprecord[address][command=\DoWithRecord]


\definerecordentry[address][Name]
\definerecordentry[address][Surname]
\definerecordentry[address][Foreletters]
\definerecordentry[address][Street]
\definerecordentry[address][StreetNumber]
\definerecordentry[address][Place]
\definerecordentry[address][PostalCode]
\definerecordentry[address][FunctionNL]
\definerecordentry[address][Function]
\definerecordentry[address][Phone]
\definerecordentry[address][Fax]
\definerecordentry[address][Email]


\startrecord{Hans}
\memberofgroup                  {board}
\setrecordentry{Name}           {Hans}
\setrecordentry{Surname}        {Hagen}
\setrecordentry{Foreletters}    {H.}
\setrecordentry{Street}         {Ridderstraat}
\setrecordentry{StreetNumber}   {27}
\setrecordentry{Place}          {Hasselt}
\setrecordentry{PostalCode}     {8061 GH}
\setrecordentry{FunctionNL}     {Voorzitter NTG}
\setrecordentry{Function}       {President NTG}
\setrecordentry{Phone}          {38-4775369}
\setrecordentry{Fax}            {38-4775374}
\setrecordentry{Email}          {pragma@wxs.nl}
\stoprecord

[-- Attachment #3: test.tex --]
[-- Type: text/x-tex, Size: 1460 bytes --]

% Footertexts
% Database
% W. Egger
% 3.07.2003

\setupoutput[pdftex]

%\input NTG-board-members

\processrecords[database.tex][Hans]

\def\FootItemHeaderI{Telefoon}
\def\FootItemHeaderII{Webstek}
\def\FootItemHeaderIII{}
\def\FootItemHeaderIV{e-mail}
\def\FootItemI{0485 573896}
\def\FootItemII{www.boede.nl}
\def\FootItemIII{}
\def\FootItemIV{w.egger@boede.nl}


\startbuffer[SetUpFooterText]
       \hbox to \textwidth{%
         \vbox{% Hans Hagen: needed either \hbox or \vbox; 04-05-2003\setupfootertexts[{\getbuffer[SetUpFooterText]}][]
             \starttabulate[|*{4}{lw(.25\textwidth)|}]
                \NC {\tfx \FootItemHeaderI}
                \NC {\tfx \FootItemHeaderII}
                \NC {\tfx \FootItemHeaderIII}
                \NC {\tfx \FootItemHeaderIV} \NC\NR
                \NC \switchtobodyfont[rm] \FootItemI
                \NC \switchtobodyfont[rm] \FootItemII
                \NC \switchtobodyfont[rm] \FootItemIII
                \NC \switchtobodyfont[rm] \FootItemIV \NC\NR
             \stoptabulate%
          }%
       }%
\stopbuffer

\setupfootertexts[{\getbuffer[SetUpFooterText]}]

\starttext

Some text

\startlines
\getrecordentry{Name}
\getrecordentry{Surame}
\getrecordentry{Foreletters}
\getrecordentry{Street}
\getrecordentry{StreetNumber}
\getrecordentry{Place}
\getrecordentry{PostalCode}
\getrecordentry{FunctionNL}
\getrecordentry{Function}
\getrecordentry{Phone}
\getrecordentry{Email}
\stoplines

\stoptext

             reply	other threads:[~2003-07-07 10:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-07 10:13 Willi Egger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-01-23  8:45 database Wolfgang Werners-Lucchini
2007-01-24  2:44 ` database Mojca Miklavec
2003-04-23 18:55 database LEGUEDOIS, Frederic
2003-04-25 10:23 ` database Taco Hoekwater
2003-04-25 11:21   ` database Hans Hagen

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=1057572818.2597.8.camel@linux.local \
    --to=w.egger@boede.nl \
    --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).