Template:Brace
Jump to navigation
Jump to search
File:Brace segment, left, mid.svg
File:Test Template Info-Icon - Version (2).svg Template documentation[view] [edit] [history] [purge]
This template inserts a "brace segment": part of a brace (curly bracket) that can be put into a table to span multiple items.
Usage
- Parameter 1 determines the orientation of the brace: l (left - { ), r (right - } ), o (over - ⏞ ) or u (under - ⏟⏟ ).
- Parameter 2 determines the part of the brace:
- t: top end: File:Brace segment, right, end-top.svg
- b: bottom end: File:Brace segment, right, end-bot.svg
- m: middle (for braces with odd number of sections): File:Brace segment, right, mid.svg
- mt: middle, top (for braces with even numbers of segments): File:Brace segment, right, mid-top.svg
- mb: middle, bottom (for braces with even numbers of segments): File:Brace segment, right, mid-bot.svg
- s: span (between middle and end): File:Brace segment, right, span.svg
- ht: half-brace top (for 2-segment braces) File:Brace segment, right, half-top.svg
- hb: half-brace bottom (for 2-segment braces) File:Brace segment, right, half-bot.svg
- l: left end: File:Brace segment, over, end-left.svg
- r: right end: File:Brace segment, over, end-right.svg
- ml: middle, left (for braces with even numbers of segments): File:Brace segment, over, mid-left.svg
- mr: middle, right (for braces with even numbers of segments): File:Brace segment, over, mid-right.svg
- hl: half-brace left (for 2-segment braces) File:Brace segment, over, half-left.svg
- hr: half-brace right (for 2-segment braces) File:Brace segment, over, half-right.svg
- Parameter 3 is an optional width for the segment tiles (default is 25) in pixels. All tiles in one brace must be the same for alignment.
- Note that the table needs to have zero padding and cell spacing. The template {{brace table parameters}} will set these for you.
- In the case of horizontal (under and over) brace, left is the "top" and right the "bottom"
Example
| Foo | File:Brace segment, right, end-top.svg | {{brace|r|t}}
|
| Bar | File:Brace segment, right, span.svg | {{brace|r|s}}
|
| Spam | File:Brace segment, right, mid-top.svg | {{brace|r|mt}}
|
| Eggs | File:Brace segment, right, mid-bot.svg | {{brace|r|mb}}
|
| Bread | File:Brace segment, right, span.svg | {{brace|r|s}}
|
| Text | File:Brace segment, right, mid.svg | {{brace|r|m}}
|
| Text | File:Brace segment, right, end-bot.svg | {{brace|r|b}}
|
| Stuff | File:Brace segment, right, half-top.svg | {{brace|r|ht}}
|
| Things | File:Brace segment, right, half-bot.svg | {{brace|r|hb}}
|
See also
- {{brace table parameters}}
- {{brace2}} - Uses LaTeX math markup
- {{brace3}} - Uses CSS, allows positioning of the bracket point