Template:Subfield
Jump to navigation
Jump to search
|{{{1}}}
Usage
Automatically formats subfield delimiters and codes. It is especially useful in tables and nested in other templates (such as Template:Example), where the pipe character has a special value.
The default color is #7F00FF (violet). Note that you cannot specify the background color without also specifying the foreground color.
The default delimiter style is a pipe and no leading or trailing spaces. The only other defined style is "oclc", which uses a double dagger for the delimiter and has both leading and traling spaces.
Examples
- /{{subfield|c}}by gives: /|cby
- /{{subfield|color=orange|c}}by gives: /|cby
- /{{subfield|color=purple|background=orange|c}}by gives: /|cby
- /{{subfield|style=oclc|c}}by gives: / ‡c by
- /{{subfield|color=orange|style=oclc|c}}by gives: / ‡c by
- /{{subfield|color=purple|background=orange|style=oclc|c}}by gives: / ‡c by
Example in a MARC field:
{{example|text=300 32 p. :{{subfield|b}}col. ill. ;{{subfield|c}}24 cm.}} gives:
300 32 p. :|bcol. ill. ;|c24 cm.