Difference between revisions of "Template:Angle bracket/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>Nardog
(not illustrative)
blackwiki>Nardog
Line 6: Line 6:
 
Use this template to generate a pair of left (open) and right (close) [[Bracket#Angle brackets|angle brackets]] (also called ''chevrons'') that will display correctly, even on operating systems and browsers that normally cannot display these characters when they are used in text. The angle brackets will surround whatever you insert as a [[Parameter (computer programming)|parameter]] after the pipe (|) symbol. Examples:
 
Use this template to generate a pair of left (open) and right (close) [[Bracket#Angle brackets|angle brackets]] (also called ''chevrons'') that will display correctly, even on operating systems and browsers that normally cannot display these characters when they are used in text. The angle brackets will surround whatever you insert as a [[Parameter (computer programming)|parameter]] after the pipe (|) symbol. Examples:
  
*{{tlx|Angle bracket|ŋ}} displays as {{Angle bracket|ŋ}}
+
*<code><nowiki>{{angbr|ŋ}}</nowiki></code> displays as {{angbr|ŋ}}
*{{tlx|Angle bracket|foo}} displays as {{Angle bracket|foo}}
+
*<code><nowiki>{{angbr|foo}}</nowiki></code> displays as {{angbr|foo}}
*{{tlx|Angle bracket|<nowiki>ψ{{!}}Ĥ{{!}}ψ</nowiki>}} displays as {{Angle bracket|ψ{{!}}Ĥ{{!}}ψ}}
+
*<code><nowiki>{{angbr|ψ{{!}}Ĥ{{!}}ψ}}</nowiki></code> displays as {{angbr|ψ{{!}}Ĥ{{!}}ψ}}
  
 
You can also insert (nest) a text- or character-producing template as the parameter. Examples:
 
You can also insert (nest) a text- or character-producing template as the parameter. Examples:
  
*{{tlx|Angle bracket|{{IPA|ŋ}}}} displays as {{Angle bracket|{{IPA|ŋ}}}}
+
*<code><nowiki>{{angbr|{{IPA|ŋ}}}}</nowiki></code> displays as {{angbr|{{IPA|ŋ}}}}
*{{tlx|Angle bracket|{{date}}}} displays as {{Angle bracket|{{date}}}}
+
*<code><nowiki>{{angbr|{{date}}}}</nowiki></code> displays as {{angbr|{{date}}}}
 +
 
 +
{{tl|angbr IPA}} is a shorthand for the first example.
  
 
===Formatting (markup)===
 
===Formatting (markup)===
 
Place any HTML or Wiki markup either outside the template or after the pipe (|) symbol as part of the parameter. Examples:
 
Place any HTML or Wiki markup either outside the template or after the pipe (|) symbol as part of the parameter. Examples:
  
*<code>&lt;b&gt;<nowiki>{{angbr|foo}}</nowiki>&lt;/b&gt;</code> displays as <b>{{angbr|foo}}</b>
+
*<code><nowiki>'''{{angbr|foo}}'''</nowiki>&lt;/b&gt;</code> displays as '''{{angbr|foo}}'''
*<code><nowiki>{{angbr|&lt;u&gt;foo&lt;/u&gt;}}</nowiki></code> displays as {{angbr|<u>foo</u>}}
+
*<code><nowiki>{{angbr|<u>foo</u>}}</nowiki></code> displays as {{angbr|<u>foo</u>}}
*<code><nowiki>{{angbr|''foo''}}</nowiki></code> displays as {{angbr|''foo''}}
+
*<code><nowiki>{{angbr|''foo''}}</nowiki></code> displays as {{angbr|''foo''}}
  
 
The template does not work properly with an equals sign (=) in the parameter. Start the parameter with <code>1=</code> to circumvent this problem.
 
The template does not work properly with an equals sign (=) in the parameter. Start the parameter with <code>1=</code> to circumvent this problem.
Line 32: Line 34:
 
* {{tl|Braket}}, {{tl|Bra-ket}}, {{tl|Bra}}, {{tl|Ket}}: Dirac notation
 
* {{tl|Braket}}, {{tl|Bra-ket}}, {{tl|Bra}}, {{tl|Ket}}: Dirac notation
 
* {{tl|Langle}}, {{tl|Rangle}}: single brackets
 
* {{tl|Langle}}, {{tl|Rangle}}: single brackets
 
<includeonly>
 
<!-- Categories go here, and interwikis go in Wikidata -->
 
[[Category:Language formatting and function templates]]
 
[[Category:Character templates]]
 
[[Category:Mathematical formatting templates]]
 
</includeonly>
 
  
 
== TemplateData ==
 
== TemplateData ==
Line 56: Line 51:
 
}
 
}
 
</templatedata>
 
</templatedata>
 +
 +
<includeonly>
 +
<!-- Categories go here, and interwikis go in Wikidata -->
 +
[[Category:Language formatting and function templates]]
 +
[[Category:Character templates]]
 +
[[Category:Mathematical formatting templates]]
 +
</includeonly>

Revision as of 13:45, 4 May 2019

Template:Template shortcuts

Use this template to generate a pair of left (open) and right (close) angle brackets (also called chevrons) that will display correctly, even on operating systems and browsers that normally cannot display these characters when they are used in text. The angle brackets will surround whatever you insert as a parameter after the pipe (|) symbol. Examples:

  • {{angbr|ŋ}} displays as ⟨ŋ⟩
  • {{angbr|foo}} displays as ⟨foo⟩
  • {{angbr|ψ{{!}}Ĥ{{!}}ψ}} displays as ⟨ψ|Ĥ|ψ⟩

You can also insert (nest) a text- or character-producing template as the parameter. Examples:

  • {{angbr|{{IPA|ŋ}}}} displays as ⟨ŋ
  • {{angbr|{{date}}}} displays as ⟨2 January 2026⟩

{{angbr IPA}} is a shorthand for the first example.

Formatting (markup)

Place any HTML or Wiki markup either outside the template or after the pipe (|) symbol as part of the parameter. Examples:

  • '''{{angbr|foo}}'''</b> displays as ⟨foo⟩
  • {{angbr|<u>foo</u>}} displays as ⟨foo
  • {{angbr|''foo''}} displays as ⟨foo

The template does not work properly with an equals sign (=) in the parameter. Start the parameter with 1= to circumvent this problem.

Meaning

Angle brackets (chevrons) have many uses as punctuation marks and symbols. See Angle brackets.

See also

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Angle bracket

Places the text inside an angle bracket. Used to indicate graphemes.

Template parameters

ParameterDescriptionTypeStatus
text1

Text to embrace in angle brackets

Example
ψ|Ĥ|ψ
Linesuggested