Difference between revisions of "Template:Bc subst"
Jump to navigation
Jump to search
imported>Vanisaac (size) |
imported>Vanisaac (fix image logic) |
||
| Line 1: | Line 1: | ||
{{{{{|safesubst:}}}#switch:{{{type|}}} | {{{{{|safesubst:}}}#switch:{{{type|}}} | ||
| − | |image = [[ | + | |image = [[Image:{{{{{|safesubst:}}}Braille cell/dot-id2filename-8dot|dot-id={{{1|0}}}}}|{{{size|}}}|alt={{{{{|safesubst:}}}Braille cell/dot-id2character|dot-id={{{1|0}}}}}]] |
|#default = {{{{{|safesubst:}}}Braille cell/dot-id2character|dot-id={{{1|0}}}}} | |#default = {{{{{|safesubst:}}}Braille cell/dot-id2character|dot-id={{{1|0}}}}} | ||
}}<!-- | }}<!-- | ||
--><noinclude>{{documentation}}</noinclude> | --><noinclude>{{documentation}}</noinclude> | ||
Revision as of 12:14, 31 January 2014
⠀
Usage
| This template should always be substituted (i.e., use {{subst:Bc subst}}). For transcluding, use {{Braille cell}} instead. |
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
. 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:
- {{Braille cell/dot-id2character}}: braille pattern into text character (Unicode)
- {{Braille cell/dot-id2filename-8dot}}: braille pattern into a default 8-dot filename
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.
| The above documentation is transcluded from Template:Bc subst/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |