From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/84716 Path: news.gmane.org!not-for-mail From: Thangalin Newsgroups: gmane.comp.tex.context Subject: Code Called Twice? Date: Thu, 10 Oct 2013 23:21:35 -0700 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1381472497 12663 80.91.229.3 (11 Oct 2013 06:21:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Oct 2013 06:21:37 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Oct 11 08:21:43 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VUW6Y-0001oV-EC for gctc-ntg-context-518@m.gmane.org; Fri, 11 Oct 2013 08:21:42 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7B4BF101E8; Fri, 11 Oct 2013 08:19:06 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8czjYMISgIAy; Fri, 11 Oct 2013 08:19:05 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 2682D101DE; Fri, 11 Oct 2013 08:19:05 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C483B101DE for ; Fri, 11 Oct 2013 08:19:03 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id OYwEuzXnZnFz for ; Fri, 11 Oct 2013 08:19:03 +0200 (CEST) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 0692E10193 for ; Fri, 11 Oct 2013 08:19:02 +0200 (CEST) Original-Received: from mail-ie0-x22e.google.com (mail-ie0-x22e.google.com [IPv6:2607:f8b0:4001:c03::22e]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r9B6LaRb002139 for ; Fri, 11 Oct 2013 08:21:37 +0200 Original-Received: by mail-ie0-f174.google.com with SMTP id qd12so2807701ieb.33 for ; Thu, 10 Oct 2013 23:21:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=P5mcw2e6oFfZyB62rPzDFDXc79ZPmbcRkJ4RLSU/oL4=; b=JSntLUGkraucKPX48+QkCak3nNfSvZeNRuvFMToJ98TllRQ9qpt1DqJZ9l7wQaADEU bDGVVOigPT8kHiKtKwL1RJ3E+k1X0ddOemAR8lH8TAoPBn15O979ttEcg+aL1CyUI7SJ OkOAWYP+PeU8UEtqRubMdCZve87qQ0YmBXHeEYBX/3+78fFiNTd4UXWstkauz2MyFJ7r r9b+p2K+DzhxHcIMZjN1MceoxPckfAQwKvlePFchdapsZZ8eYv+svxusYXdHwEEDjfDr vMOwa9Aokd0nONhfVC5J9QzAdOPYZ8b6/XBvh5iEWP4k/pg7s5p4yNxVSAVJ35dN0p+y nXxg== X-Received: by 10.50.108.71 with SMTP id hi7mr1371899igb.59.1381472496022; Thu, 10 Oct 2013 23:21:36 -0700 (PDT) Original-Received: by 10.42.6.203 with HTTP; Thu, 10 Oct 2013 23:21:35 -0700 (PDT) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2607:f8b0:4001:c03::22e; country=US X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0RKzGlAR5 - 8e185aa10812 - 20131011 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:84716 Archived-At: Hi, I noticed something unexpected with the following code: \enabletrackers[metapost.showlog] \startuseMPgraphic{heading:ThemeTitleStyle} show "HEADING:THEMETITLESTYLE"; show \MPstring{heading:title}; draw textext( \MPstring{heading:title} ) rotated 5 withcolor blue; \stopuseMPgraphic \defineframed[ThemeTitleStyle][ background=\useMPgraphic{ThemeTitleStyle}, ] \def\processword#1{% \setMPtext{heading:title}{#1}% \useMPgraphic{heading:ThemeTitleStyle} } \define[1]\ThemeChapterTitle{\applytosplitstringword\processword{#1}} \setuphead[chapter][deeptextcommand={\ThemeChapterTitle}] \starttext \startchapter[title=Why Is heading:ThemeTitleStyle Called Twice?] \input knuth \stopchapter \stoptext It appears as though heading:ThemeTitleStyle is being called twice: metapost > info: >> "HEADING:THEMETITLESTYLE" >> "Why" metapost > info: >> "HEADING:THEMETITLESTYLE" >> "Why" I am trying to produce a random number that is not equal to the previous random number. However, if the code is called twice, then I'd have to add code to ignore one of the calls. Any ideas why the code seems to be called twice and what can be done to ensure that it is only called once? Thank you! ___________________________________________________________________________________ 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 ___________________________________________________________________________________