Template:Glossary of contract bridge/doc

Purpose
The template gcb generates a link to a specific entry in the Glossary of contract bridge terms.

Usage
The template is normally placed in-line where the running text uses a term in the glossary. It may be listed in the "See also" section, same as an article title in double brackets would be listed.

Parameters
The template uses two parameters id and display with ordinary syntax.

Parameter id identifies a location within the glossary. It is practically mandatory; if id is not defined, the template generates a link to the "Glossary of contract bridge terms" as a whole.

To find the id value for a glossary entry, open the glossary in edit mode and examine the code for that entry.

See entry 'Deal' for example:

Here  gives the parameter value that should be used without quotation marks in gcb.

If there are no span tags  and   in the glossary code, see Glossary entry without anchor for instruction.

Parameter display specifies the linkname: the text to be displayed and highlighted at that point in the article where the template is used. If display is not defined, the linkname is the same as the id value. In turn, the id value given in the glossary code is likely to be the glossary term itself if that is short. For example, the glossary uses id=deal for 'Deal' but id=doubledummy for 'Double dummy'.

Examples

 * Correct use

Parameter labels 'id=' and 'display=' make the code unambiguous but they are not mandatory.

Incorrect parameter labels may result in operational links but incorrect displays.
 * Incorrect use

Glossary entry without anchor
No link is possible, using the template or otherwise, to a glossary entry without an anchor (glossary id value). Our glossary sets id values using span tags, as in the code for entry 'Deal' (quoted above). Without that, the glossary code begins with a term between a semicolon and a colon:

To enable linking such an entry, the editor should set id with span tags as for 'Deal'. (For the entry 'Defensive bidding', current style is id="defensivebidding".)

Term without glossary entry
Either write a new entry with an appropriate anchor (id defined using span tags) or do not use gcb in the base article.