ผลต่างระหว่างรุ่นของ "แม่แบบ:ชื่อเอียง/doc"

เนื้อหาที่ลบ เนื้อหาที่เพิ่ม
ไม่มีความย่อการแก้ไข
ไม่มีความย่อการแก้ไข
บรรทัด 1:
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
{{high-risk}}
 
{{high-risk|500,000+}}
{{lua|Module:Italic title}}
 
This template can be used to italicise page titles. It should only be used in articles that meet the criteria for italic titles given in the [[Wikipedia:Article titles#Italics and other formatting|Article titles]] policy.
 
Normally the template is placed at the top of the article.
===Usage===
*<tt><nowiki>{{Italic title}}</nowiki></tt> italicises the title automatically under certain circumstances. If the title is less than 50 characters in length, italicisation is always performed automatically:
**Titles with no brackets <tt>()</tt> are fully italicised:
***{{Nowrap|<tt>Foo</tt>}} &rarr; {{Nowrap|'''''Foo'''''}}
***{{Nowrap|<tt>Talk:Foo</tt>}} &rarr; {{Nowrap|'''Talk:''Foo'''''}}
**Titles which contain brackets are italicised before the first open bracket:
***{{Nowrap|<tt>Foo (bar)</tt>}} &rarr; {{Nowrap|'''''Foo'' (bar)'''}}
***{{Nowrap|<tt>Talk:Foo (bar)</tt>}} &rarr; {{Nowrap|'''Talk:''Foo'' (bar)'''}}
<tt><nowiki>{{Italic title|force=}}</nowiki></tt>
*Titles longer than 50 characters are not automatically italicised. However, you can pass parameters for the template to test the title against: if a match is found, italicisation is performed:
**{{Nowrap|<tt><nowiki>{{Italic title| name | bracket1 | bracket2 | ... }}</nowiki></tt>}}, where "name" is the first part of the title (before any brackets) and the "bracket#" are a list of up to five possible brackets:{{Break}}{{Nowrap|<tt><nowiki>{{Italic title| Foo | bar | baz }}</nowiki></tt>}} will italicise as follows:
***{{Nowrap|<tt>Foo</tt>}} &rarr; {{Nowrap|'''''Foo'''''}}
***{{Nowrap|<tt>Foo (bar)</tt>}} &rarr; {{Nowrap|'''''Foo'' (bar)'''}}
***{{Nowrap|<tt>Foo (baz)</tt>}} &rarr; {{Nowrap|'''''Foo'' (baz)'''}}
***{{Nowrap|<tt>Foo (quok)</tt>}} &rarr; {{Nowrap|'''Foo (quok)'''}}
*<tt><nowiki>{{Italic title|force=true}}</nowiki></tt> italicises the entire title including brackets, and will also italicise titles with more than 50 characters.
 
'''''IF IT DOESN'T WORK:''''' ''Try putting the template after the infobox. If it still doesn't work, use [[WP:DISPLAYTITLE|DISPLAYTITLE]] instead of this template; again, this may need to go after the infobox.''
===See also===
 
===Usage===
 
;Basic usage
<pre>{{italic title}}</pre>
 
;All italicized
<pre>{{italic title|all=yes}}</pre>
 
Article titles cannot contain wiki-formatting, such as <nowiki>''</nowiki>, so cannot be made italic in the normal way. Instead, place this template in the article, normally at the very top. It will then have the following effect:
**Titles with no brackets[[parentheses]] <tt>()</tt> are fully italicised:
***{{Nowrap|<tt>Foo</tt>}} &rarr; {{Nowrap|'''''Foo'''''}}
***{{Nowrap|<tt>Talk:Foo</tt>}} &rarr; {{Nowrap|'''Talk:''Foo'''''}}
**Titles which contain bracketsparentheses are italicised before the first openopening bracketparenthesis:
***{{Nowrap|<tt>Foo (bar)</tt>}} &rarr; {{Nowrap|'''''Foo'' (bar)'''}}
***{{Nowrap|<tt>Talk:Foo (bar)</tt>}} &rarr; {{Nowrap|'''Talk:''Foo'' (bar)'''}}
*Italicization can be forced on parenthesized text with the {{para|all|yes}} parameter.
 
Some infoboxes automatically attempt to italicise the title of the article in which they are included. When this works correctly, this template is not needed. When it doesn't work correctly, try putting the <tt><nowiki>{{Italic title}}</nowiki></tt> ''after'' the infobox.
 
== TemplateData ==
{{TemplateDataHeader}}
<templatedata>
{
"description": "A template to italicize article titles",
"params": {
"yes": {
"label": "All",
"description": "Italicization forced on parenthesized text",
"type": "string",
"required": false
}
}
}
</templatedata>
 
===See also===
*[[WP:ITALICTITLE]]
*{{Tlx|Italic title prefixed}}
{{WrongTitleExamples}}
Templates which use this template should display the following notice:
*{{Tl|Auto italic title}}
 
{{basepage subpage
|<!-- ADD CATEGORIES BELOW THIS LINE -->
[[Category:Correct title templates]]
[[Category:Lua-based templates]]
 
}}
<includeonly>
[[หมวดหมู่:แม่แบบแก้ไขชื่อให้ถูกต้อง|{{PAGENAME}}]]
</includeonly>