* Comment after \startseparatedlist[...]
@ 2014-01-20 20:02 Joshua Krämer
2014-01-20 22:41 ` Hans Hagen
0 siblings, 1 reply; 7+ messages in thread
From: Joshua Krämer @ 2014-01-20 20:02 UTC (permalink / raw)
To: ntg-context-wvrSQK3plZs
Dear list,
if there is a comment after \startseparatedlist[...] from the database
module, context fails. Thus, this example in the wiki doesn't work:
http://wiki.contextgarden.net/M-database
Minimal example:
\usemodule[database]
\defineseparatedlist[Test]
[
before=\bTABLE,
after=\eTABLE,
left=\bTD,
right=\eTD,
first=\bTR,
last=\eTR
]
\starttext
\startTest % problematic comment
Eins, zwei, drei
\stopTest
\stoptext
Kind regards,
Joshua Krämer
___________________________________________________________________________________
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] 7+ messages in thread
* Re: Comment after \startseparatedlist[...]
2014-01-20 20:02 Comment after \startseparatedlist[...] Joshua Krämer
@ 2014-01-20 22:41 ` Hans Hagen
2014-01-21 14:39 ` Joshua Krämer
0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2014-01-20 22:41 UTC (permalink / raw)
To: ntg-context
On 1/20/2014 9:02 PM, Joshua Krämer wrote:
> Dear list,
>
> if there is a comment after \startseparatedlist[...] from the database
> module, context fails. Thus, this example in the wiki doesn't work:
> http://wiki.contextgarden.net/M-database
>
> Minimal example:
>
> \usemodule[database]
> \defineseparatedlist[Test]
> [
> before=\bTABLE,
> after=\eTABLE,
> left=\bTD,
> right=\eTD,
> first=\bTR,
> last=\eTR
> ]
>
> \starttext
>
> \startTest % problematic comment
> Eins, zwei, drei
> \stopTest
>
> \stoptext
in fact you get:
\startTest Eins, zwei, drei
\stopTest
because of the comment and we ignore all till the end of the first line
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 7+ messages in thread
* Re: Comment after \startseparatedlist[...]
2014-01-20 22:41 ` Hans Hagen
@ 2014-01-21 14:39 ` Joshua Krämer
2014-01-21 16:51 ` Hans Hagen
0 siblings, 1 reply; 7+ messages in thread
From: Joshua Krämer @ 2014-01-21 14:39 UTC (permalink / raw)
To: ntg-context-wvrSQK3plZs
Am Mon, 20 Jan 2014 23:41:55 +0100
schrieb Hans Hagen <pragma-42P/b7yZOt0@public.gmane.org>:
> in fact you get:
>
> \startTest Eins, zwei, drei
> \stopTest
>
> because of the comment and we ignore all till the end of the first
> line
I still don't understand it. This works:
\startTest Eins, zwei, drei \stopTest
This doesn't work (context stops with error):
\startTest %Test
Eins, zwei, drei \stopTest
It seems that context fails whenever there is a comment inside the
database listing (or database file).
I actually would like to read in a database file and skip the first
row, but because of this problem it doesn't work.
Kind regards,
Joshua
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context-wvrSQK3plZs@public.gmane.org / 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] 7+ messages in thread
* Re: Comment after \startseparatedlist[...]
2014-01-21 14:39 ` Joshua Krämer
@ 2014-01-21 16:51 ` Hans Hagen
2014-01-21 22:25 ` Joshua Krämer
0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2014-01-21 16:51 UTC (permalink / raw)
To: ntg-context
On 1/21/2014 3:39 PM, Joshua Krämer wrote:
> Am Mon, 20 Jan 2014 23:41:55 +0100
> schrieb Hans Hagen <pragma@wxs.nl>:
>
>> in fact you get:
>>
>> \startTest Eins, zwei, drei
>> \stopTest
>>
>> because of the comment and we ignore all till the end of the first
>> line
>
> I still don't understand it. This works:
>
> \startTest Eins, zwei, drei \stopTest
>
> This doesn't work (context stops with error):
>
> \startTest %Test
> Eins, zwei, drei \stopTest
>
> It seems that context fails whenever there is a comment inside the
> database listing (or database file).
>
> I actually would like to read in a database file and skip the first
> row, but because of this problem it doesn't work.
has to do with catcode changes so % is no longer %
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 7+ messages in thread
* Re: Comment after \startseparatedlist[...]
2014-01-21 22:25 ` Joshua Krämer
@ 2014-01-21 22:19 ` Wolfgang Schuster
2014-01-21 22:54 ` Joshua Krämer
0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2014-01-21 22:19 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1566 bytes --]
You can add “commentchar=\letterpercent” to your separatedlist definition which will make % the character for comments, the setups hack isn’t necessary.
Wolfgang
On 21.01.2014 23:13:25, Joshua Krämer <joshua.kraemer@gmail.com> wrote: Am Tue, 21 Jan 2014 17:51:17 +0100
schrieb Hans Hagen <pragma@wxs.nl>:
> has to do with catcode changes so % is no longer %
Thanks for the hint. I have tried to do it like that (from Mojca
Miklavec's "My Way"):
\usemodule[database]
\unprotect
\startsetups Data:unix
\catcode`\%=\@@comment
\stopsetups
\protect
\defineseparatedlist [Data]
[
separator=tab,
before=\bTABLE, after=\eTABLE,
first=\bTR, last=\eTR,
left=\bTD, right=\eTD,
setups=unix
]
\starttext
\startData
% time LG LG-SD HG HG-SD p
24 0.74 0.36 1.19 0.51 0.15
48 0.90 0.65 1.45 0.54 0.21
72 1.23 0.35 1.59 0.59 0.27
\stopData
\stoptext
... but still, context stops with an error. I have also tried to use
\# like in the My Way example without success.
Is this supposed to work?
Kind regards,
Joshua Krämer
___________________________________________________________________________________
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
___________________________________________________________________________________
[-- Attachment #1.2: Type: text/html, Size: 1761 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] 7+ messages in thread
* Re: Comment after \startseparatedlist[...]
2014-01-21 16:51 ` Hans Hagen
@ 2014-01-21 22:25 ` Joshua Krämer
2014-01-21 22:19 ` Wolfgang Schuster
0 siblings, 1 reply; 7+ messages in thread
From: Joshua Krämer @ 2014-01-21 22:25 UTC (permalink / raw)
To: ntg-context-wvrSQK3plZs
Am Tue, 21 Jan 2014 17:51:17 +0100
schrieb Hans Hagen <pragma@wxs.nl>:
> has to do with catcode changes so % is no longer %
Thanks for the hint. I have tried to do it like that (from Mojca
Miklavec's "My Way"):
\usemodule[database]
\unprotect
\startsetups Data:unix
\catcode`\%=\@@comment
\stopsetups
\protect
\defineseparatedlist [Data]
[
separator=tab,
before=\bTABLE, after=\eTABLE,
first=\bTR, last=\eTR,
left=\bTD, right=\eTD,
setups=unix
]
\starttext
\startData
% time LG LG-SD HG HG-SD p
24 0.74 0.36 1.19 0.51 0.15
48 0.90 0.65 1.45 0.54 0.21
72 1.23 0.35 1.59 0.59 0.27
\stopData
\stoptext
... but still, context stops with an error. I have also tried to use
\# like in the My Way example without success.
Is this supposed to work?
Kind regards,
Joshua Krämer
___________________________________________________________________________________
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] 7+ messages in thread
* Re: Comment after \startseparatedlist[...]
2014-01-21 22:19 ` Wolfgang Schuster
@ 2014-01-21 22:54 ` Joshua Krämer
0 siblings, 0 replies; 7+ messages in thread
From: Joshua Krämer @ 2014-01-21 22:54 UTC (permalink / raw)
To: ntg-context-wvrSQK3plZs
Am Tue, 21 Jan 2014 23:19:43 +0100
schrieb Wolfgang Schuster <schuster.wolfgang@gmail.com>:
> You can add “commentchar=\letterpercent” to your separatedlist
> definition which will make % the character for comments, the setups
> hack isn’t necessary.
Thank you, I have added it to the Wiki.
Kind regards,
Joshua Krämer
___________________________________________________________________________________
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] 7+ messages in thread
end of thread, other threads:[~2014-01-21 22:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-20 20:02 Comment after \startseparatedlist[...] Joshua Krämer
2014-01-20 22:41 ` Hans Hagen
2014-01-21 14:39 ` Joshua Krämer
2014-01-21 16:51 ` Hans Hagen
2014-01-21 22:25 ` Joshua Krämer
2014-01-21 22:19 ` Wolfgang Schuster
2014-01-21 22:54 ` Joshua Krämer
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).