Content deleted Content added
m caP |
Category:Direction-related icon templates |
||
(35 intermediate revisions by 7 users not shown) | |||
Line 1:
{{Documentation subpage}}
==Usage==
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.
* <
<!--===
===Values for direction field===
'''Direction''' and the named fields '''''traditional''''', '''''historic''''', or '''''modern''''', should be one of the following values:
{| class="wikitable"
!colspan="2"|Text directions !!colspan="5"|Input codes (case insensitive) and associated graphic
|-
| '''
|-
|colspan="2"| Right-to-left || '''''RL-TB'' *''' {{
|-
|colspan="2"| Left-to-right || '''''LR-TB'' *''' {{
|-
|colspan="2"| Top-to-bottom ||
|-
|colspan="2"| Bottom-to-top ||
|-
|colspan="2"| Boustrophedon (RL,LR) || '''''RLR-TB'' *''' {{
|-
|colspan="2"| Boustrophedon (LR,RL) || '''''LRL-TB''''' {{
|-
|colspan="2"| Vertical boustrophedon (TB,BT) ||
|-
|colspan="2"| Vertical boustrophedon (BT,TB) ||
|-
|colspan="2"| Variable direction || '''''H-TB''''' {{
|-
!colspan="2"| !! colspan="
|-
|colspan="2"| || colspan="2" align=center| Outwards || colspan="2" align=center| Inwards ||
|-
|colspan="2"| Clockwise || colspan="2" align=center| '''''Ck-Out'' *''' {{
|-
|colspan="2"| Withershins || colspan="2" align=center| '''''WS-Out'' *''' {{
|-
!colspan="2"| !! colspan="5" align=center | Other codes and display
|-
|colspan="2"| Other || colspan="5"| Up-Right-Down: '''''BTRB''''' {{
|-
|colspan="2"| Unsupported (ex. "Wave") || colspan="5"| {{
|}
<nowiki>*</nowiki> Codes marked with an asterisk have alternate codes, displayed in the last column.
* Note that many of the alternate codes resolve to
===Values for DirText and LabelText fields===
Line 55 ⟶ 60:
{| class="wikitable"
!Style!!direction!!DirText produces!!<nowiki>
|-
|Full||
|<code><nowiki>
|<code><nowiki>
|<code><nowiki>
|-
|Expanded||
|<code><nowiki>
|<code><nowiki>
|<code><nowiki>
|-
|''Short''||
|<code><nowiki>
|<code><nowiki>
|<code><nowiki>
|-
|''In-Line''||
|<code><nowiki>
|<code><nowiki>
|<code><nowiki>
|-
|''Default''||
|<code><nowiki>
|<code><nowiki>
|<code><nowiki>
|-
|Custom||
|<code><nowiki>
|<code><nowiki>
|<code><nowiki>
|-
|Blank||
|<code><nowiki>
|<code><nowiki>
|<code><nowiki>
|-
|'''Multiples'''||colspan=8|
|}
* Note that only the
===Size field===
Line 101 ⟶ 106:
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:
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:
===Historic, Traditional, and Modern fields===
Line 111 ⟶ 116:
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:<br /><code><nowiki>{{
:produces<br /> {{ ==Templates and files used==
The workhorse of this template is a dependent file, [[template:
;Images:
<div class="skin-invert-image">
[[File:text_direction_WitherOut.svg|30px]]
[[File:text_direction_RorLdown.svg|30px]]
[[File:text_direction_RorLup.svg|30px]]
[[File:text_direction_UorDleft.svg|30px]]
[[File:text_direction_UorDright.svg|30px]]
[[File:text_direction_WitherIn.svg|30px]]
[[File:text_direction_BUleft.svg|30px]]
[[File:text_direction_BUright.svg|30px]]
[[File:text_direction_BousBleft.svg|30px]]
[[File:text_direction_BousBright.svg|30px]]
[[File:text_direction_BousLdown.svg|30px]]
[[File:text_direction_BousLup.svg|30px]]
[[File:text_direction_BousRdown.svg|30px]]
[[File:text_direction_BousRup.svg|30px]]
[[File:text_direction_BousTleft.svg|30px]]
[[File:text_direction_BousTright.svg|30px]]
[[File:text_direction_ClockIn.svg|30px]]
[[File:text_direction_ClockOut.svg|30px]]
[[File:text_direction_LTRdown.svg|30px]]
[[File:text_direction_LTRup.svg|30px]]
[[File:text_direction_RTLdown.svg|30px]]
[[File:text_direction_RTLup.svg|30px]]
[[File:text_direction_TDleft.svg|30px]]
[[File:text_direction_TDright.svg|30px]]
[[File:text_direction_URD.svg|30px]]
</div>
{{TemplateData}}
==See also==
:[[:c:Category:Script directionality]] -- has all these images
<includeonly>{{Sandbox other||
<!-- Categories below this line -->
▲The workhorse of this template is a dependent file, [[template:TextDir/main|/main]], and most alterations to the function of the template need to be made there.
[[Category:Direction-related icon templates]]
}}</includeonly>
|