Template: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,可以對模板的功能進行大部分的改變。