From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/93716 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Job done event Date: Sun, 14 Feb 2016 15:38:28 +0100 Message-ID: <56C09164.1060306@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0697713224776144078==" X-Trace: ger.gmane.org 1455460766 1701 80.91.229.3 (14 Feb 2016 14:39:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Feb 2016 14:39:26 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Feb 14 15:39:15 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aUxpT-0001Qn-14 for gctc-ntg-context-518@m.gmane.org; Sun, 14 Feb 2016 15:39:15 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id CE7666ABE; Sun, 14 Feb 2016 15:38:47 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id clHbSJ2GlQHy; Sun, 14 Feb 2016 15:38:45 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id BCCC26AC2; Sun, 14 Feb 2016 15:38:45 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 0ED4B6ABE for ; Sun, 14 Feb 2016 15:38:45 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2ZolyT9WDJH5 for ; Sun, 14 Feb 2016 15:38:44 +0100 (CET) Original-Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 851366AB7 for ; Sun, 14 Feb 2016 15:38:34 +0100 (CET) Original-Received: by mail-wm0-f53.google.com with SMTP id a4so25219738wme.1 for ; Sun, 14 Feb 2016 06:38:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=D1fruPlg2dN2ZywL4FT4blQVyszPTjcB8bMeeJznMbc=; b=cxG2WwZbYdsB/6ydZeo6YCOkHnaJmi2rQXcIFUBsIGoLcRCpCjNAtXyBl8y/dxZ2+N j3Un1tlegnHvLZpoMaub0bJEmUmctUsmpo88lM5fnkXJnf1NdI2I5NfQ9ih6ndCSr1fS krcZAVjUdffZU4EiYaq3gMRmWcdWk5eUN2HhduucgT5CUxBSxpMz4ZGKHt3jgPZuDBNn P4RsU3vZaYOsm4mCbAJz+VyehIaTAzAvhBCC5g0tKT2trQt1bpPCXLfXvb3LZN8VXd8j 6uBb1la3PlrwcoMBYUA6kSpdjMglmjWB4aBUbUpklCFjSmL3pbEMR+w9OmlVn8veyHQf KJlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type; bh=D1fruPlg2dN2ZywL4FT4blQVyszPTjcB8bMeeJznMbc=; b=WybNTWrDR3TjTYDNPh4BJjKTHaOtBupqO0zPeOPunvJYDp48L8q+mFbBKSQPO3AqwC CjgmGq6Wwq0Wo+Ci+88EHY5vPUMYUMQJWIZyCcE68xVMqLnAABNV/wJ+eE+HWvtSf33P IHqJruZBzukVaTlUPGq6dwoC9hYyATjiaemvMz4IR7TBzsvXit+1EUZdbARxwiTmT8sZ PX+I7Uvo/4jZxhmmEjIZxArm2EPCEdQZUeQoiSiyPEvUQ5y3fLPS/e2g4VKZDNpfprCa 8zJ2h/HdwM1KwDgs96urJLuf2e8NOcz10x4wYyyEPj24DBPCT07lNhPEefECgiI8VJ7e VGiA== X-Gm-Message-State: AG10YOQVmMlkhPAov5CQJSaguuWW4OmEZ8Hcb9yku+BukWmbGNB+j3dpzaAiNgmSD+PHzA== X-Received: by 10.28.218.145 with SMTP id r139mr8464971wmg.52.1455460713710; Sun, 14 Feb 2016 06:38:33 -0800 (PST) Original-Received: from keima.localdomain (x2f28d66.dyn.telefonica.de. [2.242.141.102]) by smtp.gmail.com with ESMTPSA id g1sm16897208wmc.0.2016.02.14.06.38.32 for (version=TLSv1/SSLv3 cipher=OTHER); Sun, 14 Feb 2016 06:38:32 -0800 (PST) User-Agent: Postbox 4.0.8 (Macintosh/20151105) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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" Xref: news.gmane.org gmane.comp.tex.context:93716 Archived-At: This is a multi-part message in MIME format. --===============0697713224776144078== Content-Type: multipart/alternative; boundary="------------080409070500000903080002" This is a multi-part message in MIME format. --------------080409070500000903080002 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable > Luk=C3=A1=C5=A1 Proch=C3=A1zka > 14. Februar 2016 um 08:46 > Hello, > > during typesetting a document I'm collecting some information. > > At the end (i.e. right before \stoptext or right after \stoptext), I'd=20 > need to perform an operation. > > The way is to place some code before my code: > > \starttext > ... > > \DoSomethingMine > \stoptext > > But I'm looking for a way that the code inside document prepares the=20 > final operation and a way to avoid writing "\DoSomethingMine" before=20 > \stoptext (or \stopcomponent) - something being processed by ConTeXt=20 > naturally. > > Something like: > > \starttext > ... > \startluacode > context.reactors.jobfinished =3D function(prev_op) > -- Do something mine > prev_op() > end > \stopluacode > ... > \stoptext % ConTeXt to call "context.reactors.jobfinished" or similar=20 > implicitly > > Does ConTeXt offer something like described? (Would be nice...) \appendtoks ... % put your own code here \to \everystoptext Wolfgang --------------080409070500000903080002 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
14= .=20 Februar 2016 um 08:46
Hello,

during typesetting a document I'm collecting some information.

At the end (i.e. right before \stoptext or right after \stoptext),=20 I'd need to perform an operation.

The way is to place some code before my code:

\starttext
=C2=A0 ...

=C2=A0 \DoSomethingMine
\stoptext

But I'm looking for a way that the code inside document prepares the final operation and a way to avoid writing "\DoSomethingMine" before=20 \stoptext (or \stopcomponent) - something being processed by ConTeXt=20 naturally.

Something like:

\starttext
=C2=A0 ...
=C2=A0 \startluacode
=C2=A0=C2=A0=C2=A0 context.reactors.jobfinished =3D function(prev_op)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 -- Do something mine
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 prev_op()
=C2=A0=C2=A0=C2=A0 end
=C2=A0 \stopluacode
=C2=A0 ...
\stoptext % ConTeXt to call "context.reactors.jobfinished" or=20 similar implicitly

Does ConTeXt offer something like described? (Would be nice...)
\appendtoks
=C2=A0=C2=A0 ... % put your own code here
\to \everystoptext

Wolfgang
--------------080409070500000903080002-- --===============0697713224776144078== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============0697713224776144078==--