From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/79897 Path: news.gmane.org!not-for-mail From: Andre Caldas Newsgroups: gmane.comp.tex.context Subject: Re: New module: simplesteps. Date: Fri, 14 Dec 2012 09:21:34 -0200 Message-ID: References: <20121214010420.GA18312@phlegethon.router_intern> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=14dae9d717bc39930304d0ce3dfc X-Trace: ger.gmane.org 1355484122 13396 80.91.229.3 (14 Dec 2012 11:22:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Dec 2012 11:22:02 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Dec 14 12:22:17 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TjTLM-00029F-Tg for gctc-ntg-context-518@m.gmane.org; Fri, 14 Dec 2012 12:22:16 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 86798101E2; Fri, 14 Dec 2012 12:22:02 +0100 (CET) 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 WVT2mSLcxiXx; Fri, 14 Dec 2012 12:22:00 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 8FDF8101E7; Fri, 14 Dec 2012 12:22:00 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 26B05101E7 for ; Fri, 14 Dec 2012 12:21:59 +0100 (CET) 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 ERoqNtgJLXdk for ; Fri, 14 Dec 2012 12:21:57 +0100 (CET) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id AA748101E2 for ; Fri, 14 Dec 2012 12:21:57 +0100 (CET) Original-Received: from mail-la0-f41.google.com (mail-la0-f41.google.com [209.85.215.41]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id qBEBDjS9002207 for ; Fri, 14 Dec 2012 12:13:45 +0100 Original-Received: by mail-la0-f41.google.com with SMTP id m15so2826822lah.14 for ; Fri, 14 Dec 2012 03:21:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=yfRV21aLR+jJo0Z4Aaup5Npmvqa5ye5g0zOdMNbq+Xs=; b=BlGGS04eIL+XNuS3gp2iThKuUXDPaZDE5x07UMiIkquggJGs3zI8PJ2r9xY8vpz0w8 PhaQs0vBY2j2+Igpuib4Qjl6o3bkq60aWTh7Z+vof6/rJW6mNNxiTShoK0EYuVO4vDva SxFaPAFxdp7cMBUM1aSXDQV6mLvfaK5sJcv0ds1tirjCnpxsKtwSG/N73MMqSRvL1M5Q zioASQ/oyUonX60qkPkWROg/+UEqwKOKVPnS5z+LST1rj5hdlDw+1M83o6qgYvnruqyp a8Z80Pk/gGOmgE4DV9OPafmnwgXSO2NuXxJILQ1mQ4YuUw/yGhkQaNeA1GcJeHX3L8Rv EtFQ== Original-Received: by 10.112.83.7 with SMTP id m7mr2299670lby.15.1355484115865; Fri, 14 Dec 2012 03:21:55 -0800 (PST) Original-Received: by 10.112.22.3 with HTTP; Fri, 14 Dec 2012 03:21:34 -0800 (PST) In-Reply-To: <20121214010420.GA18312@phlegethon.router_intern> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.215.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0WIzndJ6M - f504cf9a8224 - 20121214 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 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:79897 Archived-At: --14dae9d717bc39930304d0ce3dfc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello! > thanks for the interesting contribution! Have a look at the patch > I hopefully don=E2=80=99t forget to append. Thank you! I will take a look and learn... ;-) >> [...] >> I use \startbuffer and \stopbuffer, and also Lua. As I said, I don't >> really know how to write a module... comments are very welcome. > > Honestly, it doesn=E2=80=99t work, but that=E2=80=99s a minor flaw! Sorry! I forgot to mention. Only a little subset of it works. I have (already - so I don't forget to) attached a "tex" file that works. > [**lots of advices I will study carefully latter**] > [...] > I could not figure out how exactly the section block thingy is > supposed to work. It does not create the \startframe macro at all > -- is this something custom? I don't know how to use this "startframe" yet. So, I am doing like this right now: (numbers like 2-3 or 2- don't work yet) =3D=3D=3D START code snip =3D=3D=3D \startbuffer[simplesteps] \startitemize \item First item \uncover[2,3,4]{\item Second item} \uncover[3,4]{\item Second item} \uncover[4]{\item Second item} \stopitemize \stopbuffer \simplestepsplaybuffer =3D=3D=3D STOP code snip =3D=3D=3D The "simplestepsplaybuffer" macro simply calls the simplesteps.playbuffer() lua function. This function plays the buffer and determines if it has to be played again or not. If it does, then it tex.print('\simplestepsplaybuffer'). The macros "uncover" determine how far the specification is from being played. If it is being played now, then show. If it is played "next", then show in gray. And so on. > I infer it=E2=80=99s about the slide title > so I have \startframe call \section but that should be taken as a > placeholder at most. In my own slide module I use > \{start,stop}section with the option placehead=3Dno and rely on the > page header to display the slide title (i.e. current section > running head). That was the laziest way I could imagine :P I guess that's what I want to do. I just don't have the necessary knowledge yet. ;-) > Some remarks: > > - you should rename simplesteps.mkiv to t-simplesteps.mkiv, > indicating that it is a thirdparty module I will. I think I will have a bitbucket repository exclusively for modules. Then I will have the proper directory structure, the proper naming scheme and hopefully proper documentation, xml, etc. (lots of things to learn!) > - if you plan on expanding the code you eventually will come to > love this bit: http://wiki.contextgarden.net/System_Macros > - Context has a namespacing system which you might consider > switching to in the long term: > http://tex.stackexchange.com/q/58654 > but it=E2=80=99s arguably an advanced method Well, I do want to do it the right (recommended) way! > - maybe switch to mkvi as named parameters make rewriting > macros a breeze Would you elaborate a bit further? >> Is it ok if I send a PDF sample to the list? I hope you can use the TEX file attached. Cheers, Andr=C3=A9 Caldas. --14dae9d717bc39930304d0ce3dfc Content-Type: application/x-tex; name="simpletest.tex" Content-Disposition: attachment; filename="simpletest.tex" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hap7mc6n2 JSBUaGlzIGZpbGUgaXMgYSBzb2x1dGlvbiB0ZW1wbGF0ZSBmb3I6CgolIC0gR2l2aW5nIGEgdGFs ayBvbiBzb21lIHN1YmplY3QuCiUgLSBUaGUgdGFsayBpcyBiZXR3ZWVuIDE1bWluIGFuZCA0NW1p biBsb25nLgoKJSBUaGlzIGlzIGFkYXB0ZWQgZnJvbSB0aGUgZXhhbXBsZSBieSBUaWxsIFRhbnRh dSA8dGFudGF1QHVzZXJzLnNvdXJjZWZvcmdlLm5ldD4KJSBpbmNsdWRlZCBhcyBwYXJ0IG9mIHRo ZSBiZWFtZXIgcGFja2FnZSBpbiBMYVRlWAolCiUgSW4gcHJpbmNpcGxlLCB0aGlzIGZpbGUgY2Fu IGJlI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GFydGl0ZW1pemUKICAgIFxp dGVtIFRoZSB7XGVtIGZpcnN0IG1haW4gbWVzc2FnZX0gb2YgeW91ciB0YWxrIGluIG9uZSBvciB0 d28gbGluZXMuCiAgICBcdW5jb3ZlclsyLDNde1xpdGVtIFRoZSB7XGVtIHNlY29uZCBtYWluIG1l c3NhZ2V9IG9mIHlvdXIgdGFsayBpbiBvbmUgb3IgdHdvIGxpbmVzLn0KICAgIFx1bmNvdmVyWzNd e1xpdGVtIFBlcmhhcHMgYSB7XGVtIHRoaXJkIG1lc3NhZ2V9LCBidXQgbm90IG1vcmUgdGhhbiB0 aGF0Ln0KICBcc3RvcGl0ZW1pemUKXHN0b3BidWZmZXIKXHNpbXBsZXN0ZXBzcGxheWJ1ZmZlcgoK XHN0b3B0ZXh0Cgo= --14dae9d717bc39930304d0ce3dfc Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --14dae9d717bc39930304d0ce3dfc--