Template:Script directionality/doc: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 2:
The template looks for a text-direction image that matches the directionality provided in the template call. It also provides standard abbreviations or descriptions for the given directionality.
 
* <code>{{tlx|TextDirScript directionality|<!--nocat{{=}}|-->direction|historic{{=}}direction|traditional{{=}}direction|modern{{=}}direction|DirText|LableText|size{{=}}?px}}</code>
 
<!--===Automatic script direction categories and ''nocat'' field===
Line 59:
 
{| class="wikitable"
!Style!!direction!!DirText produces!!<nowiki>TextDirScript directionality|historic=LTR</nowiki>!!LabelText produces!!<nowiki>TextDirScript directionality|traditional=LTR</nowiki>!!LabelText produces!!<nowiki>TextDirScript directionality|modern=LTR</nowiki>!!LabelText produces
|-
|Full||{{tlx|TextDirScript directionality|LTR|full}}||{{Script directionality|LTR|full}}
|<code><nowiki>||none|full</nowiki></code>||{{Script directionality|historic=LTR||none|full}}
|<code><nowiki>||none|full</nowiki></code>||{{Script directionality|traditional=LTR||none|full}}
|<code><nowiki>||none|full</nowiki></code>||{{Script directionality|modern=LTR||none|full}}
|-
|Expanded||{{tlx|TextDirScript directionality|LTR|exp}}||{{Script directionality|LTR|exp}}
|<code><nowiki>||none|exp</nowiki></code>||{{Script directionality|historic=LTR||none|exp}}
|<code><nowiki>||none|exp</nowiki></code>||{{Script directionality|traditional=LTR||none|exp}}
|<code><nowiki>||none|exp</nowiki></code>||{{Script directionality|modern=LTR||none|exp}}
|-
|''Short''||{{tlx|TextDirScript directionality|LTR|short}}||{{Script directionality|LTR|short}}
|<code><nowiki>||none|short</nowiki></code>||{{Script directionality|historic=LTR||none|short}}
|<code><nowiki>||none|short</nowiki></code>||{{Script directionality|traditional=LTR||none|short}}
|<code><nowiki>||none|short</nowiki></code>||{{Script directionality|modern=LTR||none|short}}
|-
|''In-Line''||{{tlx|TextDirScript directionality|LTR|words}}||{{Script directionality|LTR|words}}
|<code><nowiki>||none|words</nowiki></code>||{{Script directionality|historic=LTR||none|words}}
|<code><nowiki>||none|words</nowiki></code>||{{Script directionality|traditional=LTR||none|words}}
|<code><nowiki>||none|words</nowiki></code>||{{Script directionality|modern=LTR||none|words}}
|-
|''Default''||{{tlx|TextDirScript directionality|LTR|}}||{{Script directionality|LTR|}}
|<code><nowiki>||none|</nowiki></code>||{{Script directionality|historic=LTR||none|}}
|<code><nowiki>||none|</nowiki></code>||{{Script directionality|traditional=LTR||none|}}
|<code><nowiki>||none|</nowiki></code>||{{Script directionality|modern=LTR||none|}}
|-
|Custom||{{tlx|TextDirScript directionality|LTR|Your text}}||{{Script directionality|LTR|Your text}}
|<code><nowiki>||none|Your text</nowiki></code>||{{Script directionality|historic=LTR||none|Your text}}
|<code><nowiki>||none|Your text</nowiki></code>||{{Script directionality|traditional=LTR||none|Your text}}
|<code><nowiki>||none|Your text</nowiki></code>||{{Script directionality|modern=LTR||none|Your text}}
|-
|Blank||{{tlx|TextDirScript directionality|LTR|none}}||{{Script directionality|LTR|none}}
|<code><nowiki>||none|none</nowiki></code>||{{Script directionality|historic=LTR||none|none}}
|<code><nowiki>||none|none</nowiki></code>||{{Script directionality|traditional=LTR||none|none}}
|<code><nowiki>||none|none</nowiki></code>||{{Script directionality|modern=LTR||none|none}}
|-
|'''Multiples'''||colspan=8|{{tlx|TextDirScript directionality|RLR-TB|historic{{=}}LTR|modern{{=}}TB-LR|traditional{{=}}Ck-Out|words|words}} produces {{Script directionality|RLR-TB|historic=LTR|modern=TB-LR|traditional=Ck-Out|words|words}}
|}
 
Line 105:
The size of the graphic can be controlled using the ''size'' field. Unlike ''direction'' and ''text'', the size field must be explicitly called with "size=". Since the icons are square, the image size can be set to a one-dimensional pixel value that corresponds to both the width and height. The size parameter does not effect the "?" of undefined text directions, except size=0 (see below). The default value is size=20px, for use in running text.
 
Example: {{tlx|TextDirScript directionality||RLR-TB|full|size=50px}} produces {{Script directionality|RLR-TB|full|size=50px}}
 
The size field can also be set to "0" (zero) or "0px" in order to render only the directional text. This will also blank the "?" of an undefined text direction.
 
Example: {{tlx|TextDirScript directionality||RTL|full|size=0}} produces {{Script directionality|RTL|full|size=0}}
 
===Historic, Traditional, and Modern fields===
Line 115:
The fields ''historic, traditional,'' and ''modern'' can be used to generate multiple labeled directionalities in addition to a single unlabeled one. ''Historic, traditional,'' and ''modern'' take the same values as the [[#Values for Direction field|direction field, above]]. A blank direction field should be included if the [[#Values for DirText and LabelText fields|Values for DirText field]] and [[#Values for DirText and LabelText fields|Values for LabelText field]], above are used, as the first unlabeled field will not be interpreted as those fields. Unless the ''historic, traditional,'' and ''modern'' fields are defined, the third unlabeled field will not be interpreted.
 
Example: {{tlx|TextDirScript directionality|||traditional=BT-LR|modern=LR-TB|exp}} produces {{Script directionality||traditional=BT-LR|modern=LR-TB|exp}}
 
==Dependent files==
The workhorse of this template is a dependent file, [[template:TextDirScript directionality/main|/main]], and most alterations to the function of the template need to be made there.