Back Table of contents Index Next   BibTool Manual
Reference Manual
Format Specification
Grouping

Grouping

Any number of constructs can be enclosed in braces ({}) for grouping. Thus the precedence of operators can be bypassed.

Coming back to our example from the previous subsection. To complicate the example we want to append an optional title, or a constant string. This is accomplished as follows.

The grouping allows to restrict the range of the alternative operator # in this example.

Another example shows how the alternative together with grouping can be used to share a format specification for certain types of entries:

The %0s specifier is used to check for the existence of a certain field without actually adding anything to the output. Other constructs may serve for the same purpose. This construct is applied to the pseudo-fields @book and @proceedings. The access to the pseudo-field fails if requested in another type of entry. Those two checks are combined to form a disjunction. Thus the following code---the constant in this example---is reached only if we are in a book or in a proceedings entry. It is not reached in an article.



Back Table of contents Index Next   BibTool Manual
Reference Manual
Format Specification
Grouping
© 1999 Gerd Neugebauer