ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Conditionals
@ 2012-09-29  0:31 Troy Henderson
  2012-09-29  1:40 ` Conditionals Rogers, Michael K
  0 siblings, 1 reply; 3+ messages in thread
From: Troy Henderson @ 2012-09-29  0:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

I have a list of numbers,

2, 6, 7, 8, 12, 14, 18, 20, 186, 188, 316, 318, 354, 372, 376

that I would like to use as exceptions in a \dostepwiserecurse loop.  That
is, within the loop if \recurselevel is NOT EQUAL to either of these
numbers, then I want to do something -- otherwise, I simply increment
\recurselevel.

I would appreciate an example of how to do this.

Thanks,

Troy Henderson

[-- Attachment #1.2: Type: text/html, Size: 431 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] 3+ messages in thread

* Re: Conditionals
  2012-09-29  0:31 Conditionals Troy Henderson
@ 2012-09-29  1:40 ` Rogers, Michael K
  2012-09-29  1:56   ` Conditionals Troy Henderson
  0 siblings, 1 reply; 3+ messages in thread
From: Rogers, Michael K @ 2012-09-29  1:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On Sep 28, 2012, at 8:31 PM, Troy Henderson <thenders@gmail.com>
 wrote:

> I have a list of numbers,
>
> 2, 6, 7, 8, 12, 14, 18, 20, 186, 188, 316, 318, 354, 372, 376
>
> that I would like to use as exceptions in a \dostepwiserecurse loop.  That is, within the loop if \recurselevel is NOT EQUAL to either of these numbers, then I want to do something -- otherwise, I simply increment \recurselevel.
>
> I would appreciate an example of how to do this.
>
> Thanks,
>
> Troy Henderson

\starttext
\dorecurse{400}
{\doifnotinset{\recurselevel}{2, 6, 7, 8, 12, 14, 18, 20, 186, 188, 316, 318, 354, 372, 376}
{\recurselevel, }}
\stoptext


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).
___________________________________________________________________________________
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] 3+ messages in thread

* Re: Conditionals
  2012-09-29  1:40 ` Conditionals Rogers, Michael K
@ 2012-09-29  1:56   ` Troy Henderson
  0 siblings, 0 replies; 3+ messages in thread
From: Troy Henderson @ 2012-09-29  1:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

> \starttext
> \dorecurse{400}
> {\doifnotinset{\recurselevel}{2, 6, 7, 8, 12, 14, 18, 20, 186, 188, 316,
> 318, 354, 372, 376}
> {\recurselevel, }}
> \stoptext
>

Thanks.  That worked perfectly!

Troy

[-- Attachment #1.2: Type: text/html, Size: 395 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] 3+ messages in thread

end of thread, other threads:[~2012-09-29  1:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-29  0:31 Conditionals Troy Henderson
2012-09-29  1:40 ` Conditionals Rogers, Michael K
2012-09-29  1:56   ` Conditionals Troy Henderson

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