模板:TextDir/doc

维基百科,自由的百科全书

使用

本模板用来生成与文字系统方向的相关内容,其中包括了一段关于文字方向的叙述以及一个与叙述相对应的图标。它也提供了给定方向的标准缩写或描述。

  • {{TextDir|direction|historic=direction|traditional=direction|modern=direction|DirText|LableText|size=?px}}


Direction(方向)字段的值

Direction(方向)以及其他三个字段 traditional(传统)historic(历史),或 modern(现代)的值,应是以下之一:

文字方向 输入代码(不区分大小写)与相关的图形
Word: Line: 向下 向上 向左 向右 备用代码 (匹配*代码)
由右至左 RL-TB * RL-BT RTLR2Lright-to-leftleftwards
由左至右 LR-TB * LR-BT LTRL2Rleft-to-rightrightwards
由上至下 TB-RL * TB-LR Vertical
由下至上 BT-RL BT-LR
牛耕式转行书写法(右至左、左至右…) RLR-TB * RLR-BT Boustrophedon
牛耕式转行书写法(左至右、右至左…) LRL-TB LRL-BT
垂直牛耕式(上至下、下至上…) TBT-RL TBT-LR
垂直牛耕式(下至上、上至下…) BTB-RL BTB-LR
可变方向 H-TB H-BT V-RL V-LR
旋转
  向外旋 向内旋 Alternate codes (matches * code)
顺时针 Ck-Out * Ck-In * CW-Out, and CW-In
逆时针 WS-Out * WS-In * AC-Out or CC-Out, and AC-In or CC-In
其他代码和显示
其他 Up-Right-Down: BTRB
不支持(如 "Wave") ? Wave
  • 标有星号*的代码具有替代代码,显示于最后一列。
  • 请注意,许多替代代码解析为最常见的书写方向,可能并不普遍适用(例如,并非所有的垂直书写系统都是从右至左,而从上至下书写的)。

DirText和LabelText字段的值

DirTextLabelText 可以使用标准值,亦可以使用用户定义的文本:

形式 方向 DirText产生的结果 TextDir|historic=LTR LabelText产生的结果 TextDir|traditional=LTR LabelText产生的结果 TextDir|modern=LTR LabelText产生的结果
完整 {{TextDir|LTR|full}} 由左至右,并由上至下 ||none|full Historic: ||none|full Traditional: ||none|full Modern:
扩展 {{TextDir|LTR|exp}} 左至右,上至下 ||none|exp Historic: ||none|exp Traditional: ||none|exp Modern:
短式 {{TextDir|LTR|short}} LTR (down) ||none|short (Hist)- ||none|short (Trad)- ||none|short (Mod)-
In-Line {{TextDir|LTR|words}} 左至右 ||none|words historically, ||none|words traditionally, ||none|words modern,
预设 {{TextDir|LTR}} LTR ||none| Hist: ||none| Trad: ||none| Mod:
{{TextDir|LTR|Your text}} Your text ||none|Your text Your text ||none|Your text Your text ||none|Your text Your text
空白 {{TextDir|LTR|none}} ||none|none ||none|none ||none|none
多重 {{TextDir|RLR-TB|historic=LTR|modern=TB-LR|traditional=Ck-Out|words|words}} 产生出 右至左、左至右、…,historically, 左至右, traditionally, 顺时针旋转, modern, 上至下
  • 请注意,只有完整扩展两种形式才能完全区分书写方向的所有细节。

size(大小)字段

图形的大小可以使用size字段进行控制。 与directiontext不同,大小字段必须用“size =”呼叫。由于图标是正方形的,图像尺寸可以被设置为与宽度和高度都对应的一维像素值。 大小参数不影响未定义的文本方向的"?",除了size= 0时(见下文)。其默认值是size = 20px,用于一般文本。

举例:{{TextDir|RLR-TB|full}} produces 牛耕式转行书写法(右至左、左至右,往复循环),并由上至下

size也可以设置为“0”或"0px",这样做就可以不显示图标。这也将使未定义文本方向的"?"变成空白。

举例:{{TextDir|RTL|full}}产生出由右至左,并由上至下

traditional(传统)、historic(历史)与 modern(现代)字段

historictraditionalmodern可用来产生产生多重标记的方向性。此三者与上方Direction字段有相同的值。A blank direction field should be included if the Values for DirText field and 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: {{TextDir|exp}} produces Trad: 下至上,左至右, Mod: 左至右,上至下

相关文件

这个模板依赖着其子模板:/main,可以对模板的功能进行大部分的改变。