From: Michael Saunders <odradek5@gmail.com>
To: ntg-context@ntg.nl
Subject: Re: tooltips and glossary
Date: Thu, 6 May 2010 06:20:40 -0500 [thread overview]
Message-ID: <t2g54d7f5601005060420y8355ebe9t814e71bf077b36dc@mail.gmail.com> (raw)
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
___________________________________________________________________________________
next reply other threads:[~2010-05-06 11:20 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-06 11:20 Michael Saunders [this message]
2010-05-06 11:49 ` luigi scarso
-- strict thread matches above, loose matches on Subject: below --
2010-05-05 4:36 Michael Saunders
2010-05-05 7:02 ` Philipp Gesang
2010-05-05 7:04 ` Philipp Gesang
2010-05-05 7:04 ` Marius
2010-05-06 10:31 ` luigi scarso
2010-05-04 9:44 Michael Saunders
2010-05-04 12:28 ` Philipp Gesang
[not found] ` <o2i54d7f5601005040628p90c28ea6s47eab9d212acce20@mail.gmail.com>
2010-05-04 13:32 ` Michael Saunders
2010-05-04 19:04 ` Philipp Gesang
2010-05-04 19:42 ` Corsair
2010-05-04 13:07 ` Willi Egger
2010-05-04 13:34 ` Marius
2010-05-06 9:45 ` Hans Hagen
2010-05-06 10:00 ` Taco Hoekwater
2010-05-03 19:18 Michael Saunders
2010-05-03 19:21 ` Wolfgang Schuster
2010-05-04 1:40 ` Michael Saunders
2010-05-04 8:18 ` Marius
2010-05-05 6:28 ` Taco Hoekwater
2010-05-02 22:51 Michael Saunders
2010-05-03 12:26 ` Wolfgang Schuster
2010-05-03 19:09 ` Wolfgang Schuster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=t2g54d7f5601005060420y8355ebe9t814e71bf077b36dc@mail.gmail.com \
--to=odradek5@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).