模板:Overline/doc

維基百科,自由的百科全書
跳至導覽 跳至搜尋

產生文本上方橫線,例如{{overline|RESET}}會產生RESET。對單個字母,可能可以使用Unicode組合字符U+0305:x̅x̅產生x̅。對於多個字母,如果不需要上方橫線連貫,可以使用Unicode方法:{{overline|x}}{{overline|x}}{{overline|T}}{{overline|T}}產生xxTTx̅x̅T̅T̅產生x̅x̅T̅T̅。The wikitext may be rendered easier to read by using the Unicode method, previewing the page, and copying and pasting the overlined text into the wikitext.

參數[編輯]

第一個參數是必需的,第二個參數是可選的。如果使用了第二個參數,只有第二個參數會顯示在橫線下方。

  • {{overline|EXIT}}EXIT
  • {{overline|12.|3}} → 12.3

後者產生的結果和12.{{overline|3}}一樣,但在格式化西方習慣的循環小數時更為推薦,因為在wikitext中更容易看到數字。

模板數據[編輯]

以下是該模板的模板資料,適用於視覺化編輯器等工具。

Overline模板資料

<templatedata> { "params": { "1": { "label": "第一個參數", "description": "被添加橫線的文本(如果參數2為空),或者文本前不添加橫線的文本", "example": "142857", "type": "number", "required": true }, "2": { "description": "被添加橫線的文本", "example": "142857", "type": "number", "label": "第二個參數" } }, "description": "此模板用於在文本上方添加橫線。", "paramOrder": [ "1", "2" ] } </templatedata>

參見[編輯]