Difference between revisions of "Template:Bc subst/doc"

From blackwiki
Jump to navigation Jump to search
imported>Vanisaac
imported>GoingBatty
m (→‎Usage: typo(s) fixed: eg → e.g. using AWB (11376))
 
Line 12: Line 12:
 
<code><nowiki>{{</nowiki>subst:bc subst|'''pattern'''|'''type'''=''image''|'''size'''=<nowiki>}}</nowiki></code>
 
<code><nowiki>{{</nowiki>subst:bc subst|'''pattern'''|'''type'''=''image''|'''size'''=<nowiki>}}</nowiki></code>
  
* '''pattern''' is the numbers of the raised dots in numeric order, eg 1348 for {{bc|1348|type=image|size=12px}}. Default is no dots (pattern 0).
+
* '''pattern''' is the numbers of the raised dots in numeric order, e.g. 1348 for {{bc|1348|type=image|size=12px}}. Default is no dots (pattern 0).
 
* '''type''' can be set to ''image'' to return an 8-dot braille cell image. Any other input returns a unicode character.
 
* '''type''' can be set to ''image'' to return an 8-dot braille cell image. Any other input returns a unicode character.
 
* '''size''' can be used to specify the size of an 8-dot braill cell image. Default 12px.
 
* '''size''' can be used to specify the size of an 8-dot braill cell image. Default 12px.

Latest revision as of 18:40, 5 September 2015

Usage

This template is a subst:-able version of the {{braille cell}} template that returns a single plain text unicode character or 8-dot braille cell image.

{{subst:bc subst|pattern|type=image|size=}}

  • pattern is the numbers of the raised dots in numeric order, e.g. 1348 for ⢍ (braille pattern dots-1348) U+288D. Default is no dots (pattern 0).
  • type can be set to image to return an 8-dot braille cell image. Any other input returns a unicode character.
  • size can be used to specify the size of an 8-dot braill cell image. Default 12px.

Technical details

This template directly calls subpages of the {{braille cell}} template, and does not contain any data files of its own.

The braille pattern input is evaluated and processed using either:

These data files contain several one-off and error codes, and any invalid braille patterns entered may produce a non-standard result, an error, or no output at all.