A use case is simple, say you write a computer science text book for pirates. Then, each time you mention a term, you may need to mention its English equivalent. So, instead of writing,

 Ye first proggie today will be ``Ahoy, World!''

You would like to write:

 Ye first \term{proggie} today will be ``\term{Ahoy}, World}!''

where, in a separate file, you make a list of all terms, and their English equivalent, e.g. \termdef{ahoy}{hello}, and \termdef{proggie}{program}.

The \term macro (use of the word in context) should do the following:

  1. Add a footnote of the English equivalent.
  2. Add itself to a Pirates-to-English dictionary
  3. Add itself to an English-to-pirate dictionary.

Now, it seems as if the glossaries package can almost do that. The main difficulty is in dealing with word forms. glossaries can do plurals, but the Pirates language has many more word forms, e.g., you could write in your term definitions file,


Or better yet, instead of defining all possible word forms, have the text mention the principal formthe text, refer to the principal form of the word.

After writing the \term[progie]{progee}, you have to compile it.

What I would like is that the the first footnote includes the principal word form, not the current variant.

Also, I am not sure as to how I should use the package to produce two glossaries instead of one, each with its own sorting.

(A previous question dealt with a similar topic (Icelandic vs. Pirates), but the difficulties remain: first footnote should mention the principal form of the word, and the issue of producing two glossaries instead of one.)


Here is a partial answer, redefine glossaries internal (?) control sequence \glsdisplayfirst to (a) display the current word form, and (b) to place a footnote with the root form. Here is how:


Note that the \glslabel control sequence provides the root form of the word. The following definition will make it easy to use any word form in your text:


Here is a full example:



\section{Programming for \term[picaroon]{Picaroons}}
   Ye first \term[progee]{proggie} today will be ``\term[ahoy]{Ahoy}, World!''.
Nice \term{progee}, ain't it?



I still do not know how to automatically create the inverse dictionary.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.