ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Database module gives an error
@ 2012-07-25 15:13 Rogers, Michael K
  2012-07-25 15:36 ` Wolfgang Schuster
  0 siblings, 1 reply; 2+ messages in thread
From: Rogers, Michael K @ 2012-07-25 15:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1957 bytes --]

There is an example of an address label in Mojca'shttp://dl.contextgarden.net/myway/csv.pdf that throws an error in the current beta.  I changed "\def\SendMe" to "\unexpanded\def.." which fixed one error.  But now I get the following.  Can it be fixed?

\usemodule[database]
\unexpanded\def\SendMe#1#2#3#4{\framed [align={flushleft,lohi},
width=6cm, height=2.6cm]{#1\crlf#2\crlf\crlf\uppercase{#3\crlf#4}}}
\starttext
\defineseparatedlist[Address][separator={;},command=\SendMe]
\startAddress
NTG;Maasstraat 2;NL-5836 BB Sambeek;The Netherlands
Dante~e.V.;Postfach 101840;D-69008 Heidelberg;Germany
\stopAddress
\stoptext

! Missing { inserted.

system          > tex > error on line 18 in file foo9094.tex: Missing { inserted ...

 8     Dante~e.V.;Postfach 101840;D-69008 Heidelberg;Germany
 9     \stopAddress
10     \stoptext
11

<to be read again>
                   \unskip
\crlf ->\ifhmode \unskip
                         \prewordbreak \crlfplaceholder \ifcase \raggedstatu...
<to be read again> \uppercase \crlf
                                    MAASSTRAAT 2\crlf \SendMe
\SendMe ...f #2\crlf \crlf \uppercase {#3\crlf #4}
                                                  }
\SendMe ...f #2\crlf \crlf \uppercase {#3\crlf #4}
                                                  }
l.18 \SendMe

...
l.9 \stopAddress

?

Thanks,

Michael

________________________________

This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).

[-- Attachment #1.2: Type: text/html, Size: 3491 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Database module gives an error
  2012-07-25 15:13 Database module gives an error Rogers, Michael K
@ 2012-07-25 15:36 ` Wolfgang Schuster
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2012-07-25 15:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 869 bytes --]


Am 25.07.2012 um 17:13 schrieb Rogers, Michael K:

> There is an example of an address label in Mojca'shttp://dl.contextgarden.net/myway/csv.pdf that throws an error in the current beta.  I changed "\def\SendMe" to "\unexpanded\def.." which fixed one error.  But now I get the following.  Can it be fixed?

The example fails because in the MkIV version the command is applied to each table entry and not to the whole row as it was in MkII.

\usemodule[database]

\define[1]\MyCommand
  {\framed{#1}}

\defineseparatedlist
  [PriceTag]
  [separator={:},
     command=\MyCommand]

\starttext

\startPriceTag
Finnish thing:English name:2.15 eur:Finland
Pieni nyörihaarukka, koivua:Small lucet, beech:6 eur:xxx
\stopPriceTag

\stoptext

BTW: In MkIV \define\…{…} == \unexpanded\def\…{…} and the old \def\…{…} == \defineexpandable\…{…}

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 1589 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-25 15:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-25 15:13 Database module gives an error Rogers, Michael K
2012-07-25 15:36 ` Wolfgang Schuster

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).