From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/87149 Path: news.gmane.org!not-for-mail From: "Chris Kennedy (ConTeXt List)" Newsgroups: gmane.comp.tex.context Subject: Re: Synonyms and criterium Date: Mon, 28 Apr 2014 06:27:13 -0700 Message-ID: <38250a59eae68a7cc696dd0b40f0fbf4.squirrel@webmail.dragonbard.com> References: <9561b3a3d27c603dc6b13d644bb7e4ff.squirrel@webmail.dragonbard.com> 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 1398691665 8361 80.91.229.3 (28 Apr 2014 13:27:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Apr 2014 13:27:45 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Mon Apr 28 15:27:37 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 1Welaq-0007Bk-NX for gctc-ntg-context-518@m.gmane.org; Mon, 28 Apr 2014 15:27:36 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4D94F1025E for ; Mon, 28 Apr 2014 15:27:36 +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 uNWoH1-5Az6c for ; Mon, 28 Apr 2014 15:27:36 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id DE48810203 for ; Mon, 28 Apr 2014 15:27:31 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BA7B4101E9 for ; Mon, 28 Apr 2014 15:27:28 +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 Snw8+My0HtDQ for ; Mon, 28 Apr 2014 15:27:27 +0200 (CEST) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id EB340101E7 for ; Mon, 28 Apr 2014 15:27:26 +0200 (CEST) Original-Received: from homiemail-a10.g.dreamhost.com (homie.mail.dreamhost.com [208.97.132.208]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s3SDRFV7011100 for ; Mon, 28 Apr 2014 15:27:25 +0200 Original-Received: from homiemail-a10.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a10.g.dreamhost.com (Postfix) with ESMTP id 9A794280076 for ; Mon, 28 Apr 2014 06:27:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=dragonbard.com; h= message-id:in-reply-to:references:date:subject:from:to :mime-version:content-type:content-transfer-encoding; s= dragonbard.com; bh=6RoT6sf/LrzPKUcVxw8qjO1V18Y=; b=Gk9egtewEPB8q aOz+89exwu7rit4f4DLlvBazJaIrMiLRXLlKU3qZIYPdQY6/TkWi0JbjzAJdxZT4 8Gc7HGL7+mixJyt+DDd6hY2wEPLhKKOL8KTFhmR1O4utFo+dfThK930UkUiKkfJT 3fcUj3Y+lsakRNg+oE0XOEmPfR/jUU= Original-Received: from webmail.dragonbard.com (caiajhbihbdd.dreamhost.com [208.97.187.133]) (Authenticated sender: ckennedy@dragonbard.com) by homiemail-a10.g.dreamhost.com (Postfix) with ESMTPA id 36930280074 for ; Mon, 28 Apr 2014 06:27:12 -0700 (PDT) Original-Received: from 71.161.78.235 (proxying for 71.161.78.235) (SquirrelMail authenticated user ckennedy@dragonbard.com) by webmail.dragonbard.com with HTTP; Mon, 28 Apr 2014 06:27:13 -0700 In-Reply-To: User-Agent: SquirrelMail/1.4.21 X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=208.97.132.208; country=US; region=California; city=Brea; latitude=33.9167; longitude=-117.9001; http://maps.google.com/maps?q=33.9167,-117.9001&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03LTprgvd - d4dfb5f1e13d - 20140428 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 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:87149 Archived-At: I appreciate what you are saying in regards to examples, but in this case I have looked at the source code and a minimal example wouldn't be of assistance. But since you insist... %Warning, don't have context or source files on current computer, so this is from memory %Expect bugs. \definesynonym[Define][Defines][\fullDefine] \setupDefines[criterium=used] \Define[defa]{Def A}{Full definition of A. Used in Chapter 1.} \Define[defb]{Def B}{Full definition of B. Used in Chapter 2.} \Define[defc]{Def C}{Full definition of C. Used in Chapter 2.} \Define[defu]{Def U}{This definition is not used at all.} \starttext \startchapter[title={One}] \placelistofDefines[width=fit,align=serried] %will show all used in document, want only those used in chapter. Here we are looking at \defa. \stopchapter \startchapter[title={Two}] \placelistofDefines[width=fit,align=serried] %only want those used in this chapter, will show defa as well. Here we are discussing \defb\ and \defc. \stopchapter \stoptext I'm good enough with TeX and Lua to understand what is going on, but not good enough to patch it. The usage model for synonyms is either all defined, or all used in the entire document, not just those per chapter. The Lua code only tracks whether a synonym was used at any point within the run, it has only one counter. I need to differentiate between synonyms used by chapter. In this case, synonyms are simply missing the feature I want. I'm asking for alternatives that allow me to use a predefined list of "synonym like" definitions that are common for the entire document, but per chapter only place a list of those that are used within that chapter, like when you place an in-chapter table of contents. Basically I'm asking for direction on where to look next, since the current definition of synonyms will not do what I need. I'm hoping I have overlooked some other feature that will let me do what I need to do. If not, guess I will have to get programming. I updated context last week to current using the procedure on contextgarden. Thanks. On Mon, April 28, 2014 00:56, Thangalin wrote: > A couple of reasons for minimal examples: having an isolated issue is > easier to debug and in the process of simplifying the code you might > stumble on the solution yourself. > > For example, I have a book that uses dozens of files. When I encounter > an issue, I concatenate the files and then start chopping out chunks > that don't affect the output. Eventually I get down to a minimal > example that allows me to further research the issue. If I get stuck, > then I post the problem. > > It's time-consuming but you can't assume people will dedicate the time > to replicate issues based on descriptions... :-) Try to whittle down a > minimal example that illustrates the problem. > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ > -- Chris Kennedy ___________________________________________________________________________________ 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 ___________________________________________________________________________________