From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/58561 Path: news.gmane.org!not-for-mail From: Michael Saunders Newsgroups: gmane.comp.tex.context Subject: Re: tooltips and glossary Date: Thu, 6 May 2010 06:20:40 -0500 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1273144855 13577 80.91.229.12 (6 May 2010 11:20:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 6 May 2010 11:20:55 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu May 06 13:20:51 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1O9z8N-0007iu-BV for gctc-ntg-context-518@m.gmane.org; Thu, 06 May 2010 13:20:51 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 13442C9C58; Thu, 6 May 2010 13:20:51 +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 SY3vpT8pSgVP; Thu, 6 May 2010 13:20:46 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 99F3BC9C68; Thu, 6 May 2010 13:20:46 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 62BA8C9C68 for ; Thu, 6 May 2010 13:20:45 +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 fY+sd7lGn5Ad for ; Thu, 6 May 2010 13:20:43 +0200 (CEST) Original-Received: from mail-gx0-f221.google.com (mail-gx0-f221.google.com [209.85.217.221]) by balder.ntg.nl (Postfix) with ESMTP id C9ECDC9C58 for ; Thu, 6 May 2010 13:20:42 +0200 (CEST) Original-Received: by gxk21 with SMTP id 21so436194gxk.14 for ; Thu, 06 May 2010 04:20:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=fwomKKdlYfipFJpvtnAKsGfH6iFtQbBghVoLoJWRL68=; b=P/M7DOwVp8HwFEMkLscxWBaoyoRElzkNR0N6wVWZw2/PJ6v9fFThokW9drrZz27ocq vwoWQob0cftuWHUKNO6LM/SI1TJsqZ76ni11In6JPRgu/ONUeMkixSN3GtbVgsn2mUbl XK8mW0ktWDHiCk/iK+0nxb5MUbM0GGvG6Qfsw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=lE7bkeUSoat7vMz5cmvwkaQfubiSEkLU6mAjBOyyZH2M/3J9m2D4o/cqMdrrPlf7Ul On/Svu2z1aYv8cP0BiGvDBftUtE+w4JsAQ605DY4VJxj95HWoOGwOnG45qXJdA+pwMB6 OE214Huu9eEhzQ+aTXrYd2XMPudhSMNXh25P4= Original-Received: by 10.101.60.12 with SMTP id n12mr8245683ank.256.1273144841604; Thu, 06 May 2010 04:20:41 -0700 (PDT) Original-Received: by 10.100.197.16 with HTTP; Thu, 6 May 2010 04:20:40 -0700 (PDT) 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:58561 Archived-At: Philipp: Thank you---I appreciate your effort on glossarium.lua very much, but I don't want to be dependent on you every time I want to tweek my glossary. I find it difficult to change the appearance and behavior of anything in Context, but I think my chances are better with it than with trying to work in lua. So, I have pursued the problem via the \definesynonyms approach. What I have so far can do all the basic things I imagined, and only seems to need some cosmetic work now. This is what I have: In the preamble: \definesynonyms[gentry][gentries][\infull][\inshort] %to connect headwords to entries \definesynonyms[gloss][glosses][\tttext][\ttkey] %to make short glosses available for tooltips \def\gldef#1#2#3{\gloss{#1}{#2}\gentry{#1}{#3 {(p.\at[g:#1])}}} \def\hint#1{\tooltip[middle]{#1}{\tttext{#1}}} \def\glref#1{\reference[g:#1]{}} %to place at a substantive reference in the text %then you have a file of definitions like this one: \gldef{vibrato}{a periodic fluctuation in pitch}{A periodic fluctuation of pitch, typically in the range 6--12~Hz.} Then, in the text, when you use an unfamiliar word and the reader could benefit from a quick, pop-up gloss: \hint{vibrato} (I just need a more sophisticated version of this that can deal with variants of the word). And, when you are about to engage in a substantive discussion of a word or phrase that appears in the glossary (for a given headword, there might be zero, one, or several such points in the text): \glref{vibrato} (This causes a page reference after the glossary entry.) I have two questions remaining: 1. I was somehow able to guess that \definesynonyms[gentry][gentries] creates a new command called "\setupgentries[]", and I imagine this command must inherit its possible keys and values from another command, but I don't know what. Where can I look it up? 2. How can I modify the appearance/location/behavior of tooltips? I tried \setuptooltips, but apparently that's not it. I'll tinker with this and test it for a while. Eventually I hope to contribute a glossaries "my way" to the garden. Hans: No problem! I'm sure whatever I put in the Google translator was just as articulate as what came out of it. Really, I think the mistake is mine. All along I have been assuming that Context was like LaTeX: a system for end-users, a language where an author could easily manipulate the appearance of his document. Apparently, it's more like a supporting infrastructure for that. Maybe it needs a layer of macros sitting on top of it to make it accessible and friendly to users/writers. I'm hoping Idris's book will shed light on this. Thanks, everyone. ___________________________________________________________________________________ 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 ___________________________________________________________________________________