ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: An interesting default for recurselevel in xetex
Date: Sun, 23 Aug 2009 15:56:09 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LNX.2.00.0908231545500.31641@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <4A911FE9.7070405@wxs.nl>

On Sun, 23 Aug 2009, Hans Hagen wrote:

> Aditya Mahajan wrote:
>> Hi,
>> 
>> Guess what happens when you run this with xetex
>> 
>> \starttext\recurselevel\stoptext
>> 
>> This is a side effect of the definition of \dofastrecurse. After using 
>> \dofastrecurse, the default value of recurselevel is 
>> \number\fastrecursecounter rather than 0. I don't think that this will have 
>> any side effects.
>
> no, it's just the last value; of course i can set it to zero
>
>
> recurselevel is also known inside \doloop so there it makes sense to have it 
> afterrwards (or when using \exitloop in any case)

Both \dorecurse and \doloop leave the value of \recurselevel to its 
previous value. \dofastrecurse does not and sets it to the last value.

\starttext
\recurselevel

\dorecurse{6}{Hello }
\recurselevel

\doloop{\ifnum\recurselevel>6\relax \exitloop\else again  \fi}
\recurselevel

\dofastrecurse{1}{6}{1}{and again}
\recurselevel
\stoptext

I do not think that any change is needed (One shouldn't use \recurselevel 
outside a recursion macro anyways). I was just surprised to find that 
recurselevel was defaulting to such a weird value in xetex.

Aditya
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2009-08-23 19:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-23  7:04 Aditya Mahajan
2009-08-23 10:54 ` Hans Hagen
2009-08-23 19:56   ` Aditya Mahajan [this message]
2009-08-23 21:44     ` 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=alpine.LNX.2.00.0908231545500.31641@ybpnyubfg.ybpnyqbznva \
    --to=adityam@umich.edu \
    --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).