A Project of the Center for Advanced Study in the Visual Arts, National Gallery of Art
History of Early American Landscape Design

Difference between revisions of "Template:Italic title/doc"

[http://www.nga.gov/content/ngaweb/research/casva/research-projects.html A Project of the National Gallery of Art, Center for Advanced Study in the Visual Arts ]
m (1 revision)
 
m (1 revision)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
<!-- 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.
 
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.
  
 
'''''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.''
 
'''''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.''
  
===Usage===
+
==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:
+
;Basic usage
***{{Nowrap|<tt>Foo</tt>}} &rarr; {{Nowrap|'''''Foo'''''}}
+
<pre>{{italic title}}</pre>
***{{Nowrap|<tt>Talk:Foo</tt>}} &rarr; {{Nowrap|'''Talk:''Foo'''''}}
+
 
**Titles which contain brackets are italicised before the first open bracket:
+
;All italicized
***{{Nowrap|<tt>Foo (bar)</tt>}} &rarr; {{Nowrap|'''''Foo'' (bar)'''}}
+
<pre>{{italic title|all=yes}}</pre>
***{{Nowrap|<tt>Talk:Foo (bar)</tt>}} &rarr; {{Nowrap|'''Talk:''Foo'' (bar)'''}}
 
*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 an infobox is used that has an italic-title autofunction, then the <tt><nowiki>{{Italic title}}</nowiki></tt> template must be positioned ''after'' the infobox.
 
  
===See also===
+
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 [[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 parentheses are italicised before the first opening parenthesis:
 +
**{{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]]
 
*[[WP:ITALICTITLE]]
 
*{{Tlx|Italic title prefixed}}
 
*{{Tlx|Italic title prefixed}}
 
{{WrongTitleExamples}}
 
{{WrongTitleExamples}}
Templates which use this template should display one the following notices:
+
Templates which use this template should display the following notice:
 
*{{Tl|Auto italic title}}
 
*{{Tl|Auto italic title}}
*{{Tl|Auto italic title 2}}
 
*{{Tl|Auto italic title 3}}
 
  
<includeonly>
+
{{basepage subpage
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
+
|<!-- ADD CATEGORIES BELOW THIS LINE -->
[[Category:Correct title templates|{{PAGENAME}}]]
+
[[Category:Correct title templates]]
[[cy:Nodyn:Italic title]]
+
[[Category:Lua-based templates]]
[[es:Plantilla:Título en cursiva]]
+
 
[[fa:الگو:عنوان مورب]]
+
}}
[[hr:Predložak:Naslov u kurzivu]]
 
[[id:Templat:Italic title]]
 
[[ka:თარგი:კურსივისახელი]]
 
[[mk:Шаблон:Закосен наслов]]
 
[[ms:Templat:Tajuk condong]]
 
[[no:Mal:Kursiv tittel]]
 
[[pt:Predefinição:Título em itálico]]
 
[[ro:Format:Titlu cursiv]]
 
[[si:සැකිල්ල:ඇලකුරු ශීර්ෂකය]]
 
[[simple:Template:Italic title]]
 
[[sr:Шаблон:Курзивни наслов]]
 
[[sq:Stampa:Titull i pjerrët]]
 
[[th:แม่แบบ:ชื่อเอียง]]
 
[[tr:Şablon:İtalik başlık]]
 
[[zh:Template:Italic title]]
 
</includeonly>
 

Latest revision as of 20:34, September 10, 2013

{{#invoke:Fallback | autotranslate

      |base = Documentation subpage
      |lang = 
      |page = Template:Italic title
    }}

{{

 {{#invoke:Namespace detect|main}}

| type = | image = 42px | imageright = | class = | style = | textstyle = | text = This template uses Module:Italic title, a script written in the Lua programming language. Please see Wikipedia:Lua if you want to learn more about Lua or help convert other templates. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}

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 Article titles policy.

Normally the template is placed at the top of the article.

IF IT DOESN'T WORK: Try putting the template after the infobox. If it still doesn't work, use DISPLAYTITLE instead of this template; again, this may need to go after the infobox.

Usage

Basic usage
{{italic title}}
All italicized
{{italic title|all=yes}}

Article titles cannot contain wiki-formatting, such as '', 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 parentheses () are fully italicised:
    • FooFoo
    • Talk:FooTalk:Foo
  • Titles which contain parentheses are italicised before the first opening parenthesis:
    • Foo (bar)Foo (bar)
    • Talk:Foo (bar)Talk:Foo (bar)
  • Italicization can be forced on parenthesized text with the |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 {{Italic title}} after the infobox.

TemplateData

This is the TemplateData documentation for the template used by the new VisualEditor.

Italic title <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

Template Involves Correct name Actual article name
{{Italic title}} Title in italics Batman (1989 film) Batman (1989 film)
{{Lowercase title}} Lowercase first character eBay EBay
{{Correct title|reason=bracket}} < > [ ] { } Benzo[a]pyrene Benzo(a)pyrene
{{Correct title|reason=#}} # Pilot #5 Pilot No. 5
{{Correct title|reason=:}} / : DK: King of Swing DK King of Swing
{{DISPLAYTITLE}} Various

Templates which use this template should display the following notice:


Retrieved from "https://heald.nga.gov/mediawiki/index.php?title=Template:Italic_title/doc&oldid=2663"

History of Early American Landscape Design contributors, "Template:Italic title/doc," History of Early American Landscape Design, , https://heald.nga.gov/mediawiki/index.php?title=Template:Italic_title/doc&oldid=2663 (accessed May 18, 2022).

A Project of the Center for Advanced Study in the Visual Arts

National Gallery of Art, Washington