Re: [NTG-context] tooltips and glossary
Marius:
Try this one: http://www.tex.ac.uk/tex-archive/info/context-top-ten/cmds.pdf -> page 14
Thanks, but that looks like it's just some extracts from cont-eni translated from Engijsh into Engrish along with a distracting background that makes it hard to read. The stuff about the not very useful abbreviation command is there again, but I'm drawn to the section about building a dictionary that says it's not about building a dictionary. It says: "All you have to do is inserting a \index at whatever the phrase you want to index is, and placeing a \placeindex where you want the glossary to be." and then goes on to describe and index, not a glossary, which seems to require commands that need a lot of redundant arguments. It also contains this gem: "Like many other ConTeXt command, users can define their own series of indexing, which pluses the default \index series are called register." That's the most remarkable thing I've read today. Maybe I need to be more clear. A glossary is like a little dictionary in the back of a book that defines the specialized words and phrases that the book uses that might not be known to the general reader. Here is a definition of "glossary": A collection of glosses; a list with explanations of abstruse, antiquated, dialectal, or technical terms; a partial dictionary. ("Glosses" were little explanatory notes written in the margins of medieval texts---the kind of thing I would do if Context's marginal notes weren't incompatible with its columns.) Ideally, I'd like a system where I could keep the entries in a bib database or in a special .tex file. The records would include the headword and the gloss, and maybe a cross reference to the point in the text that dealt with the headword definitively---the point where the term was explained. (A document that defines and explains the new words and phrases it coins---imagine such a thing!) It would be nice if there were a command that would automatically link this point in the text with the glossary entry. LaTeX has several packages (glosstex, gloss, glossary, glossaries) that do things like this. To do this in Context, I will probably have to do it all manually, defining a command to set an entry and then doing all the alphabetization and cross-referencing by hand. What I would really, really, like is to add short definitions to each glossary record that could pop up as tooltips when the reader hovers over an unfamiliar word. Since there is no mechanism for glossaries in Context, there is no mechanism to build this into, but I'm still interested in doing it. The idea is, I could write something like: \gloss{strange word}{short definition} The text would read "strange word". When you hover over it with the cursor, a tooltip would appear saying "short definition". It would be great if this were linked to a glossary mechanism so I wouldn't have to keep writing the short definition---I could say something like: \gloss{strange word} and its short definition would be looked up automatically for the tooltip. The automatic reference to the word might look like this, in the text: \gref{strange word} which would cause the page number at that point to be printed at the end of the glossary entry for "strange word".
(Preliminary remark to M.S.: please, please, configure your MUA to correctly reply to the current thread!) Hi Michael, I'm cc'ing you in case the list eats the attachments. On 2010-05-04 <04:44:21>, Michael Saunders wrote:
Marius:
Try this one: http://www.tex.ac.uk/tex-archive/info/context-top-ten/cmds.pdf -> page 14
Thanks, but that looks like it's just some extracts from cont-eni translated from Engijsh into Engrish along with a distracting
No, it's plain English. Unfamiliar phrases are just one consequence of a language becoming the world standard. Do you want to flame Italians or French for not adhering to the norms of classical Latin? You don't. There's no point at all in even mentioning somebody's stylistic idiosyncrasies on the internets. Just face it: the world won't adopt English as a global means of communication without interfering with its norms. If you don't understand something why don't you contact the author, his email adress is right there on the first page.
more clear. A glossary is like a little dictionary in the back of a book that defines the specialized words and phrases that the book uses that might not be known to the general reader. Here is a definition of "glossary":
Ideally, I'd like a system where I could keep the entries in a bib database or in a special .tex file. The records would include the headword and the gloss, and maybe a cross reference to the point in the text that dealt with the headword definitively---the point where the term was explained. (A document that defines and explains the new words and phrases it coins---imagine such a thing!) It would be nice if there were a command that would automatically link this point in the text with the glossary entry. LaTeX has several packages (glosstex, gloss, glossary, glossaries) that do things like this.
I append a snippet that should allow basic glossaries. It doesn't provide much functionality (capitalization might have to be implemented …) but you may fit it to your needs. As for the tooltips, unfortunately I don't know how to create them. The functionality would be nice, though, as long as no javascript is involved. (As for the code, it's certainly not context style, I'm aware of that but don't have the time to care.) Awaiting your feedback, Philipp
To do this in Context, I will probably have to do it all manually, defining a command to set an entry and then doing all the alphabetization and cross-referencing by hand.
What I would really, really, like is to add short definitions to each glossary record that could pop up as tooltips when the reader hovers over an unfamiliar word. Since there is no mechanism for glossaries in Context, there is no mechanism to build this into, but I'm still interested in doing it. The idea is, I could write something like:
\gloss{strange word}{short definition}
The text would read "strange word". When you hover over it with the cursor, a tooltip would appear saying "short definition". It would be great if this were linked to a glossary mechanism so I wouldn't have to keep writing the short definition---I could say something like:
\gloss{strange word}
and its short definition would be looked up automatically for the tooltip. The automatic reference to the word might look like this, in the text:
\gref{strange word}
which would cause the page number at that point to be printed at the end of the glossary entry for "strange word". ___________________________________________________________________________________ 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 ___________________________________________________________________________________
-- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
Hi, Why do you complain about other user's English? - Let us be happy, that people of another mother tong including my self do participate on the list and share their experience with others! According to what I tested the basic functionality is already available in Context: \definesynonyms[Gloss][Glosses][\infull][\inshort] \Gloss{cooltip}{HEI! This is a longer text in a tooltip} \def\Hint#1{\tooltip[middle]{#1}{\infull{#1}}} \starttext This is a text. This sentence contains a \tooltip[middle]{cooltip}{HEI! This is a longer text in a tooltip} \blank This is a text. This sentence contains a \inshort{cooltip}: say: \infull{cooltip} \blank This is a text. This sentence contains a \Hint{cooltip}. \blank[2cm] \placelistofGlosses \stoptext Willi On 4 May 2010, at 11:44, Michael Saunders wrote:
Marius:
Try this one: http://www.tex.ac.uk/tex-archive/info/context-top-ten/cmds.pdf -> page 14
Thanks, but that looks like it's just some extracts from cont-eni translated from Engijsh into Engrish along with a distracting background that makes it hard to read. The stuff about the not very useful abbreviation command is there again, but I'm drawn to the section about building a dictionary that says it's not about building a dictionary. It says:
"All you have to do is inserting a \index at whatever the phrase you want to index is, and placeing a \placeindex where you want the glossary to be."
and then goes on to describe and index, not a glossary, which seems to require commands that need a lot of redundant arguments. It also contains this gem:
"Like many other ConTeXt command, users can define their own series of indexing, which pluses the default \index series are called register."
That's the most remarkable thing I've read today. Maybe I need to be more clear. A glossary is like a little dictionary in the back of a book that defines the specialized words and phrases that the book uses that might not be known to the general reader. Here is a definition of "glossary":
A collection of glosses; a list with explanations of abstruse, antiquated, dialectal, or technical terms; a partial dictionary.
("Glosses" were little explanatory notes written in the margins of medieval texts---the kind of thing I would do if Context's marginal notes weren't incompatible with its columns.)
Ideally, I'd like a system where I could keep the entries in a bib database or in a special .tex file. The records would include the headword and the gloss, and maybe a cross reference to the point in the text that dealt with the headword definitively---the point where the term was explained. (A document that defines and explains the new words and phrases it coins---imagine such a thing!) It would be nice if there were a command that would automatically link this point in the text with the glossary entry. LaTeX has several packages (glosstex, gloss, glossary, glossaries) that do things like this.
To do this in Context, I will probably have to do it all manually, defining a command to set an entry and then doing all the alphabetization and cross-referencing by hand.
What I would really, really, like is to add short definitions to each glossary record that could pop up as tooltips when the reader hovers over an unfamiliar word. Since there is no mechanism for glossaries in Context, there is no mechanism to build this into, but I'm still interested in doing it. The idea is, I could write something like:
\gloss{strange word}{short definition}
The text would read "strange word". When you hover over it with the cursor, a tooltip would appear saying "short definition". It would be great if this were linked to a glossary mechanism so I wouldn't have to keep writing the short definition---I could say something like:
\gloss{strange word}
and its short definition would be looked up automatically for the tooltip. The automatic reference to the word might look like this, in the text:
\gref{strange word}
which would cause the page number at that point to be printed at the end of the glossary entry for "strange word". ___________________________________________________________________________________ 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 ___________________________________________________________________________________
On Tue, May 4, 2010 at 12:44 PM, Michael Saunders
What I would really, really, like is to add short definitions to each glossary record that could pop up as tooltips when the reader hovers over an unfamiliar word. Since there is no mechanism for glossaries in Context, there is no mechanism to build this into, but I'm still interested in doing it. The idea is, I could write something like:
\gloss{strange word}{short definition}
The text would read "strange word". When you hover over it with the cursor, a tooltip would appear saying "short definition". It would be great if this were linked to a glossary mechanism so I wouldn't have to keep writing the short definition---I could say something like:
\gloss{strange word}
and its short definition would be looked up automatically for the tooltip. The automatic reference to the word might look like this, in the text:
\gref{strange word}
which would cause the page number at that point to be printed at the end of the glossary entry for "strange word".
I don't know how to make tooltips, but everything else is in the file attached.
On 4-5-2010 11:44, Michael Saunders wrote:
Thanks, but that looks like it's just some extracts from cont-eni translated from Engijsh into Engrish along with a distracting background that makes it hard to read. The stuff about the not very useful abbreviation command is there again, but I'm drawn to the section about building a dictionary that says it's not about building a dictionary. It says:
Aangezien een antwoord in het engels voor jou meer vragen oproept dan antwoorden, reageer ik maar even in het Nederlands. Wellicht dat de google translator je een perfecte vertaling oplevert. Omdat iedere gebruiker wel wat anders wil, is het onmogelijk om alles in te bouwen zonder dat het ontaard in een veelheid aan commandos. Het is dan ook vaak beter bestaande mechanismes te combineren. Veel mechanismes hebben een 'command hook' en het is niet zo lastig om bijvoorbeeld het synoniem mechanisme op die manier uit te breiden met een tooltip. Er zijn inmiddels verschillende suggesties gedaan en ik ga daar niets aan toevoegen. Het is niet mijn probleem als een gebruiker gebrek heeft aan fantasie danwel suggesties niet gebruikt cq. zijn mails zodanig formuleert dat er niemand zin heeft om te reageren. Het verbaast me zowieso dat er gereageerd wordt, zeker als de toonzetting ronduit beledigend is, maar dat kan aan mijn gebrekkige engels liggen. Overigens, in een perl of lua handleiding zie je ook geen kant en klare antwoorden. Men mag er zelf wel wat voor doen.
"All you have to do is inserting a \index at whatever the phrase you want to index is, and placeing a \placeindex where you want the glossary to be."
and then goes on to describe and index, not a glossary, which seems to require commands that need a lot of redundant arguments. It also contains this gem:
Lijkt me logisch, waarom zou ik een glossary beschrijven als het over een index gaat. Je bent de eerste die hier deze twee door elkaar haalt. Overigens, in mkiv kun je user data laten meereizen en gebruiken maar dat leg ik nog wel eens uit (of misschien ook nooit, want ik waag me niet meer aan Engels).
"Like many other ConTeXt command, users can define their own series of indexing, which pluses the default \index series are called register."
That's the most remarkable thing I've read today. Maybe I need to be more clear. A glossary is like a little dictionary in the back of a book that defines the specialized words and phrases that the book uses that might not be known to the general reader. Here is a definition of "glossary":
Ach ja, gsub(manual,"index","glossary") zal je niet geven wat je zoekt vrees ik. Overigens, we hebben dat soort 'begrippenlijsten in vrijwel elk van onze projekten dus het kan echt wel. Etc etc. Overigens, als ik zoveel commentaar had op een programma en de manuals, dan was ik al lang afgehaakt dus een doorzetter ben je wel. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Just being helpful here: Hans Hagen wrote:
Aangezien een antwoord in het engels voor jou meer vragen oproept dan antwoorden, reageer ik maar even in het Nederlands. Wellicht dat de google translator je een perfecte vertaling oplevert.
Since an answer in English you calls more questions than answers, I react but just as in Dutch. Possibly that the google translator you produce a perfect translation.
Omdat iedere gebruiker wel wat anders wil, is het onmogelijk om alles in te bouwen zonder dat het ontaard in een veelheid aan commandos. Het is dan ook vaak beter bestaande mechanismes te combineren. Veel mechanismes hebben een 'command hook' en het is niet zo lastig om bijvoorbeeld het synoniem mechanisme op die manier uit te breiden met een tooltip.
Because every user, however, what differently wants, it is impossible everything build in without it degenerated in a multiplicity to commandos. It is thus frequently better existing combine mechanisms. Many mechanisms have ' command hook' and it is not this way cumbersome for example the synonymous extend mechanism this way with a tool tip.
Er zijn inmiddels verschillende suggesties gedaan en ik ga daar niets aan toevoegen. Het is niet mijn probleem als een gebruiker gebrek heeft aan fantasie danwel suggesties niet gebruikt cq. zijn mails zodanig formuleert dat er niemand zin heeft om te reageren. Het verbaast me zowieso dat er gereageerd wordt, zeker als de toonzetting ronduit beledigend is, maar dat kan aan mijn gebrekkige engels liggen.
Several suggestions have been meanwhile done and I will add to that nothing. It is not my problem if a user to fantasia or suggestions have not used lack cq. to be mails as such formulate that there nobody has to react sense. It astonishes me zowieso that there is reacted, the more so if the toonzetting is simply offending, but that can lie to my poor English.
Overigens, in een perl of lua handleiding zie je ook geen kant en klare antwoorden. Men mag er zelf wel wat voor doen.
Moreover, in perl or lua guide to see you side also no and klare answering. One can do there himself, however, what kind of.
Lijkt me logisch, waarom zou ik een glossary beschrijven als het over een index gaat. Je bent de eerste die hier deze twee door elkaar haalt.
Me seems logical, for which I would describe glossary if it concerns an index. You are the first which obtains here these two by each other.
Overigens, in mkiv kun je user data laten meereizen en gebruiken maar dat leg ik nog wel eens uit (of misschien ook nooit, want ik waag me niet meer aan Engels).
Moreover, in mkiv can to user let travel with you to data and use but that explanation I still once (or perhaps also never, because I venture myself no longer to English).
Ach ja, gsub(manual,"index","glossary") zal je niet geven wat je zoekt vrees ik. Overigens, we hebben dat soort 'begrippenlijsten in vrijwel elk van onze projekten dus het kan echt wel.
At last, gsub (manual, " index" , " glossary") you will not give what zoekt you apprehension I. Moreover, we have that type ' term lists in nearly each of our projects therefore are possible it really, however.
Etc etc.
Etc etc.
Overigens, als ik zoveel commentaar had op een programma en de manuals, dan was ik al lang afgehaakt dus een doorzetter ben je wel.
Moreover, if I had so much comment on a programme and the manuals, then I had been for a long time pulled out therefore a doorzetter am you, however.
participants (6)
-
Hans Hagen
-
Marius
-
Michael Saunders
-
Philipp Gesang
-
Taco Hoekwater
-
Willi Egger