From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/53510 Path: news.gmane.org!not-for-mail From: Andreas Harder Newsgroups: gmane.comp.tex.context Subject: \starbuffer in own macros Date: Sat, 17 Oct 2009 22:29:34 +0200 Message-ID: References: <6faad9f00910161206h7540f0fai2d6cde281cbc9977@mail.gmail.com> <4AD9DBA5.1020707@bredband.net> <4AD9E6F3.5090406@bredband.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: multipart/mixed; boundary=Apple-Mail-3-478783834 X-Trace: ger.gmane.org 1255811406 30198 80.91.229.12 (17 Oct 2009 20:30:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 Oct 2009 20:30:06 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Oct 17 22:29:56 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.50) id 1MzFuR-00014z-9D for gctc-ntg-context-518@m.gmane.org; Sat, 17 Oct 2009 22:29:51 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7E583C9ADD; Sat, 17 Oct 2009 22:29:50 +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 0pcjwOzEfHue; Sat, 17 Oct 2009 22:29:50 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6CE1AC9AF1; Sat, 17 Oct 2009 22:29:46 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2C98AC9B41 for ; Sat, 17 Oct 2009 22:29:44 +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 Qvx4bztsdU3S for ; Sat, 17 Oct 2009 22:29:41 +0200 (CEST) Original-Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15]) by balder.ntg.nl (Postfix) with ESMTP id 8A2F6C9ADD for ; Sat, 17 Oct 2009 22:29:40 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 4ED2878A191D for ; Sat, 17 Oct 2009 22:29:35 +0200 (CEST) Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08468-10 for ; Sat, 17 Oct 2009 22:29:34 +0200 (CEST) X-CHKRCPT: Envelopesender vrfy aharder@uni-koblenz.de Original-Received: from [192.168.1.112] (95-88-43-201-dynip.superkabel.de [95.88.43.201]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTP id D69B8789823F for ; Sat, 17 Oct 2009 22:29:34 +0200 (CEST) In-Reply-To: X-Mailer: Apple Mail (2.1076) X-Virus-Scanned: amavisd-new at uni-koblenz.de X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:53510 Archived-At: --Apple-Mail-3-478783834 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252; format=flowed; delsp=yes Hi all, now that \inline[ref] etc. work=97whereas in the case of \someline[ref] =20= \inline[ref] always jumps to the else-branch of its definition and =20 outputs the same line twice=97I tried, obviously naive, to realize the =20= following functionality (attachment). --Apple-Mail-3-478783834 Content-Disposition: attachment; filename=test-linenumbering4.tex Content-Type: application/octet-stream; name="test-linenumbering4.tex" Content-Transfer-Encoding: 7bit \def\startMyCite#1{\startbuffer[#1]\startlines[#1]} \def\stopMyCite#1{\stoplines[#1]\stopbuffer} \def\getMyCite#1{% \startlinenumbering[{\in[lr:b:#1]}] % the result of \in[lr:b:#1] \getbuffer[#1] \stoplinenumbering} \starttext \startlinenumbering \someline[lin:a] We thrive in information--thick worlds because of our marvelous and everyday ca- pacity to select, edit, single out, structure, highlight, group, pair, merge, harmo- nize, synthesize, focus, % \startline[test] \startMyCite{test} organize, condense, reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, dis- tinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through, browse, glance into, leaf through, \stopMyCite{test} % \stopline[test] skim, re- fine, enumerate, glean, synopsize, winnow the wheat from the chaff and separate the sheep from the goats. \stoplinenumbering \inline[lin:a] % 1--1 instead of 1 % \inline[test] \getMyCite{test} should output \startlinenumbering[3] organize, condense, reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, dis- tinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through, browse, glance into, leaf through, \stoplinenumbering \stoptext %%% Local Variables: %%% mode: context %%% TeX-master: t %%% End: --Apple-Mail-3-478783834 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes It seems that the (wrong?) use of \starbuffer in a macro is the cause of the error: ! File ended while scanning use of \dododowithbuffer. Can someone provide a correction? Regards Andreas --Apple-Mail-3-478783834 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 ___________________________________________________________________________________ --Apple-Mail-3-478783834--