Template:Unicode chart/sandbox/doc

{{Lua|Module:Unicode chart/sandbox}}

{{Uses TemplateStyles|Template:Unicode chart/sandbox/styles.css}}

{{Unicode chart/sandbox

|blockname =

|link =

|wrapper =

|abbr_sub =

|link_sub =

|note =

}}

Types of cells

  • Assigned
  • # "Normal" Unicode character: Displays character
  • # Abbreviation: Displays an abbreviation of the character's name in a dashed box.
  • ## Control character
  • ## Format character
  • Unassigned
  • # Reserved: Empty grey cell
  • # Noncharacter: Empty black cell

{{Unicode chart/sandbox

|blockname = Specials

}}

Optional parameters

=Foreign-script fonts=

Many Unicode blocks deal with foreign-language scripts, which look best with font support. The parameter {{para|wrapper}} can be used to designate another template to wrap each character cell of the table in, such as {{txl|Script/Arabic}} or {{txl|Bo-textonly}}

{{demo|br=0|{{Unicode chart/sandbox

|blockname = Ogham

|wrapper = Script/Ogam

}}}}

If there's no template for the language in question, you can use {{para|font}}

{{demo|br=0|{{Unicode chart/sandbox

|blockname = Mayan Numerals

|font = Noto Sans Mayan Numerals

}}}}

=Links=

To create links from Unicode characters to their Wikipedia pages, use {{para|link|wiki}}

{{demo|br=0|{{Unicode chart/sandbox

|blockname = Latin Extended-C

|link = wiki

}}}}

To link to Wiktionary pages, use {{para|link|wikt}}

{{demo|br=0|{{Unicode chart/sandbox

|blockname = CJK Radicals Supplement

|link = wikt

}}}}

You can use {{para|link_sub}} to:

  • manually set links for only certain cells
  • override the target of links if {{para|link}} is being used

{{demo|br=0|{{Unicode chart/sandbox

|blockname = Devanagari

|link_sub = 0901:Chandrabindu; 0902:Anusvara; 0903:Visarga; 093D:Avagraha; 0950:Om; 0964:Danda; 0965:Danda; 0970:Laghava

}}}}

=Abbreviations=

By default, the following cells are abbreviated:

  1. Anything that has an abbreviation listed at Module:Unicode data/aliases
  2. If it's a "control" or "display" character, but it does not have an abbreviation listed, an abbreviation is created by taking the first letter of each word of the character's name.

You can manually set a cell as abbreviated with {{para|abbr_sub}}

{{demo|br=0|{{Unicode chart/sandbox

|blockname = Hangul Jamo

|abbr_sub = 115F:HC
F; 1160:HJ
F

}}}}

TemplateData

{{Format TemplateData|1=

{

"params": {

"blockname": {

"type": "string",

"required": true,

"description": "Name of Unicode block, as listed here or here"

},

"link": {

"type": "string",

"description": "Should the characters in the table be links? To Wikipedia pages, or Wiktionary pages?",

"suggestedvalues": [

"wiki",

"wikt"

]

},

"wrapper": {

"description": "A template (such as Script/Arabic) to wrap each Unicode character in",

"type": "string"

},

"abbr_sub": {

"label": "abbreviation substitutes",

"description": "A list of abbreviations to substitute",

"type": "string"

},

"link_sub": {

"label": "link substitutes",

"description": "A list of links to substitute",

"type": "string"

},

"note": {

"description": "Additional note for footer",

"type": "string"

}

},

"description": "This template creates a table of the Unicode characters within a Unicode block."

}

}}