[NTG-context] Synonyms - feature request?

Robin.Kirkham at csiro.au Robin.Kirkham at csiro.au
Wed Mar 25 11:24:14 CET 2015


Folks,

I use the synonym feature heavily as technical documents can have hundreds of them. It’s great I can produce a list of synonyms I actually use in a document. Proper style however requires that each synonym be “explained” (shown in full) the first time it is used — usually in a document, but sometimes in a smaller scope, like a part or chapter. This is something I frequently get wrong, and is something document reviewers are quick to complain about.

So it would be great if Context could do this automatically. The attached MWE shows what I mean — with such a feature, the two paragraphs should come out the same.

I’ve placed some (commented) guesses as to how this might be configured in \setupsynonyms. Maybe better key names can be imagined.

Typically I would want synonym \XX\ to be expanded to XX (Xxx Xxx) the first time it is used (alternative a), but the reverse (alternative b), Xxx Xxx (XX) might be preferred. However a command could be used for a custom “explanation”.

Internally to Context, I guess this means each group of synonyms actually used has to be complemented with a list of the synonyms that have been “explained” (i.e., \infull{}) would add them to this second list). The second list would be cleared each new scope (chapter, section). The \XX\ macro would explain the synonym if it wasn’t on the second list (using \infull{}, which would then add it).

None of this would change the behaviour of \placelistof… where you would continue to select the criterium for the list you want output, independently of 

The only further tweak might be a scheme so that certain common synonyms (a third list) are never explained automatically (perhaps by example, UK in a document written in and for a UK audience). This list would silently added to the second list immediately after it was cleared, I guess. Synonyms for this this list would be added by a slightly different version of the
synonym definition macro (perhaps \commonabbreviation instead of \abbreviation, in the MWE).

Anyone think this would be a useful feature addition?

Robin


\definesynonyms[abbreviation][abbreviations][\infull]
\setupsynonyms[abbreviation][
    state=start,
%    explain=first,                % first,always,never
%    explainscope=text,            % text,part,chapter,section...
%    explainalternative=a,         % a: XX (Xxx Xxx), b: Xxx Xxx (XX), command
%    explaincommand=COMMAND#1#2,   % to format it yourself
    textstyle=normal,
    synonymstyle=\cap]

\abbreviation [UN]  {UN}  {United Nations}
\abbreviation [UK]  {UK}  {United Kingdom}
\abbreviation [USA] {USA} {United States of America}
\abbreviation [UAE] {UAE} {United Arab Emirates}

%\commonabbreviation [OK] {OK} {okay}
\abbreviation [OK] {OK} {okay}

\setupwhitespace[medium]

\starttext
The \UK\ and the \USA\ are both founding members of the \UN.
And I'm told the \UK\ and \USA\ are both English speaking countries.
But that’s \OK.

The \UK\ (\infull{UK}) and the \USA\ (\infull{USA}) are both founding
members of the \UN\ (\infull{UN}).
And I'm told the \UK\ and \USA\ are both English speaking countries.
But that’s \OK.

\placelistofabbreviations
\stoptext


More information about the ntg-context mailing list