Here's a solution from Jonathan Visick that might cut it for you. To
see it work, check out [1] and hover over any of the textbits
(abbreviations, strange terms) that look as though they might have a
definition to them.
In order to get something similar working, here's what you need to
do...
1) install Saq's AnnotationsPlugin [2]
2) Create a tiddler, call it "Macros" or use a "zzConfig", tagged
"systemConfig". Put at least the following into it...
config.macros.g = {
handler:function(place,macroName,params){
var dText = params[0].replace(/\'/,"");
if (dText.substring(0,1) == "$") {
var noHead = 1;
dText = dText.substring(1);
}
var gText ="<"+"<tiddler [[Glossary::"+params[1]+"]]>>)))";
if (!noHead){gText = "^" + gText;}
var gEntry="(("+dText+"("+gText;
wikify(gEntry,place,null,null);
return false;
}
}
This is taken from Jonathan Visick's Macros [3].
3) Create a tiddler called "Glossary" containing your glossary terms
in slice:value pairs whereas the slicename would be the identifier for
the glossary entry and the slice value the glossary entry. For an
example, look at [3].
4) In your text add references to your glossary like this...
Here is a sentence referencing to <<g "term xyz" xyz>>.
...which will render as "term xyz", yet when you mouseover it, you
will get an annotation containing the glossary entry for the slice
called "xyz", see [1].
5) You can even add images to the popup by adding the corresponding
wiki syntax. If you don't want to see those images when you view your
Glossary tiddler, simply wrap the whole glossary with a class like so:
{{glossary{
term1:entry for term1 [img[imgTerm1.jpg]]
term2:entry for term2 [img[imgTerm2.jpg]]
}}}
Then add the following to your StyleSheet:
.glossary img {display:none;}
6) An improvement to this system might be to use sections instead of
slices in your glossary tiddler: This would provide a simple means to
use multiple lines, tables, etc. in your annotations. To do that you
would have to change the 'g' macro accordingly, by replacing...
var gText ="<"+"<tiddler [[Glossary::"+params[1]+"]]>>)))";
with...
var gText ="<"+"<tiddler [[Glossary##"+params[1]+"]]>>)))";
Cheers, Tobias.
[1]
http://jonathan.visick.faculty.noctrl.edu/research/wiki/#Overview
[2]
http://tiddlywiki.squize.org/#AnnotationsPlugin
[3]
http://jonathan.visick.faculty.noctrl.edu/research/wiki/#Macros
[4]
http://jonathan.visick.faculty.noctrl.edu/research/wiki/#Glossary