From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/86524 Path: news.gmane.org!not-for-mail From: Rik Kabel Newsgroups: gmane.comp.tex.context Subject: Re: starttexdefinition error in standalone, works in TL2013 Date: Sat, 01 Mar 2014 12:01:36 -0500 Message-ID: <53121270.1090702@rik.users.panix.com> References: <530EBA58.3020703@rik.users.panix.com> <4FDA647E-AA4E-4619-88EE-65DE254BA093@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1393693309 25388 80.91.229.3 (1 Mar 2014 17:01:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Mar 2014 17:01:49 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sat Mar 01 18:01:59 2014 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 1WJnIS-0003Bs-KW for gctc-ntg-context-518@m.gmane.org; Sat, 01 Mar 2014 18:01:56 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 98974101EA; Sat, 1 Mar 2014 18:01:55 +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 JtBXSMPmZhpt; Sat, 1 Mar 2014 18:01:54 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id E3AAA101E6; Sat, 1 Mar 2014 18:01:53 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 949B2101E6 for ; Sat, 1 Mar 2014 18:01:52 +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 QyDApUB6iNvE for ; Sat, 1 Mar 2014 18:01:51 +0100 (CET) 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 5DD21101E1 for ; Sat, 1 Mar 2014 18:01:41 +0100 (CET) Original-Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s21H1d7s018542 for ; Sat, 1 Mar 2014 18:01:40 +0100 Original-Received: from [192.168.9.157] (pool-173-56-235-45.nycmny.fios.verizon.net [173.56.235.45]) by mailbackend.panix.com (Postfix) with ESMTP id B834232AAB for ; Sat, 1 Mar 2014 12:01:38 -0500 (EST) User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: <4FDA647E-AA4E-4619-88EE-65DE254BA093@gmail.com> X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=166.84.1.89; country=US; region=NY; city=Richmond Hill; postalcode=11418; latitude=40.7005; longitude=-73.8345; metrocode=501; areacode=718; http://maps.google.com/maps?q=40.7005,-73.8345&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0RLwh1Dai - 41a4f78cff28 - 20140301 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 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:86524 Archived-At: On 2014-03-01 07:32, Wolfgang Schuster wrote: > Am 27.02.2014 um 05:08 schrieb Rik Kabel : {useful information on TL2013 and starttexdefinition skipped} > BTW: It=92s better to follow contexts rules and use start/stop for enviro= nments, this way you can make use of the buffer mechanism to store text. > > \unexpanded\def\startTranslation > {\begingroup > \dosingleempty\dostartTranslation} > > \def\dostartTranslation[#1]% > {\iffirstargument > \getrawparameters[Translation][setups=3D,language=3Den,#1]% > \fi > \grabbufferdata[Translation][startTranslation][stopTranslation]} > > \def\stopTranslation > {\language[\Translationlanguage]% > \Translationsetups > (\,\getbufferdata[Translation]\removeunwantedspaces\,)% > \endgroup} > > \starttext > > \startTranslation[language=3Dnl] > It betrays a slow-witted mentality to pursue the streams, but not to see = the sources of things. > \stopTranslation > > \stoptext > Thank you for the excellent example. The only problem I see is that it = fails if no optional argument is present (in which case the keyval = settings \TranslationXXX never get defined). This is easily remedied by = removing the \iffirstargument and \fi wrapping the \getrawparameters. -- = Rik ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________