Help:Formatting Templates: Difference between revisions
Better looking templates. |
|||
Line 5: | Line 5: | ||
These templates create the offset boxes that describe an article in some way. They are: | These templates create the offset boxes that describe an article in some way. They are: | ||
* [[Template:Infobox feature]]: These denote articles that describe an OpenGL feature, | * [[Template:Infobox feature|<nowiki>{{infobox feature}}</nowiki>]]: These denote articles or sections that describe an OpenGL feature bound to a specific version, OpenGL extension, or other such. It has options for an entire array of history for that extension, from vendor-specific extensions to the version where it was adopted into core. You can even discuss features that were removed and remove the "core in version" line, to let people know when they were removed. | ||
== Admonitions == | == Admonitions == | ||
Line 11: | Line 11: | ||
Admonitions are paragraphs that are offset from the main flow of the text, usually to indicate a notification of some kind. There are several admonition templates. They all take one unnamed (positional) parameter: the paragraphs of text to offset. | Admonitions are paragraphs that are offset from the main flow of the text, usually to indicate a notification of some kind. There are several admonition templates. They all take one unnamed (positional) parameter: the paragraphs of text to offset. | ||
* [[Template:Note]]: Used for general notes. | * [[Template:Note|<nowiki>{{note}}</nowiki>]]: Used for general notes. | ||
** [[Template:Legacy note]]: Used for notations that are specifically about deprecated and removed functionality, or simply old extensions or behaviors that may no longer be applicable for modern use. The text in these admonitions is not for current hardware or current core OpenGL versions. | ** [[Template:Legacy note|<nowiki>{{legacy note}}</nowiki>]]: Used for notations that are specifically about deprecated and removed functionality, or simply old extensions or behaviors that may no longer be applicable for modern use. The text in these admonitions is not for current hardware or current core OpenGL versions. | ||
* [[Template:Warning]]: Used for warnings; typically specific "gotchas" that a user may encounter. | * [[Template:Warning|<nowiki>{{warning}}</nowiki>]]: Used for warnings; typically specific "gotchas" that a user may encounter. | ||
== Inline Formatting == | == Inline Formatting == | ||
Line 19: | Line 19: | ||
These templates are useful for doing inline formatting of various code. | These templates are useful for doing inline formatting of various code. | ||
* [[Template:Apifunc]]: Use this when writing API functions. It will automatically link to the documentation for them. Only works for APIs already in the wiki ({{current version}} core). | * [[Template:Apifunc|<nowiki>{{apifunc}}</nowiki>]]: Use this when writing API functions. It will automatically link to the documentation for them. Only works for APIs already in the wiki ({{current version}} core). | ||
* [[Template:Enum]]: Use this instead of <nowiki><code></code></nowiki> tags for enumerators. | * [[Template:Enum|<nowiki>{{enum}}</nowiki>]]: Use this instead of <nowiki><code></code></nowiki> tags for enumerators. | ||
* [[Template:Param]]: Use this instead of <nowiki>'' ''</nowiki> for names of function parameters. | * [[Template:Param|<nowiki>{{param}}</nowiki>]]: Use this instead of <nowiki>'' ''</nowiki> for names of function parameters. | ||
* [[Template:Code]]: Use this instead of <nowiki><code></code></nowiki> tags for inline bits of code. This makes it easier to change the formatting of these tags as needed. | * [[Template:Code|<nowiki>{{code}}</nowiki>]]: Use this instead of <nowiki><code></code></nowiki> tags for inline bits of code. This makes it easier to change the formatting of these tags as needed. | ||
* [[Template:Extref]]: Use this to link to extensions. | * [[Template:Extref|<nowiki>{{extref}}</nowiki>]]: Use this to link to extensions. | ||
== Alerts == | == Alerts == | ||
Line 29: | Line 29: | ||
Alerts are templates that specify that something is wrong with a section or article. These should be used with care, and they should always be coupled with a discussion on the appropriate talk page. And you should only ever use them if you do not have the time/knowledge to fix the problem yourself. | Alerts are templates that specify that something is wrong with a section or article. These should be used with care, and they should always be coupled with a discussion on the appropriate talk page. And you should only ever use them if you do not have the time/knowledge to fix the problem yourself. | ||
* [[Template:Stub]]: Put this on a page that is short and incomplete. It denotes pages that need work. | * [[Template:Stub|<nowiki>{{stub}}</nowiki>]]: Put this on a page that is short and incomplete. It denotes pages that need work. | ||
* [[Template:Cleanup]]: Used when a section or article has formatting that is in need of repair. Do this only when you don't have the time/knowledge to repair it yourself. | * [[Template:Cleanup|<nowiki>{{cleanup}}</nowiki>]]: Used when a section or article has formatting that is in need of repair. Do this only when you don't have the time/knowledge to repair it yourself. | ||
* [[Template:Inaccurate]]: Used when a section or article contains substantial factual inaccuracies. Only use this if you don't have the time/knowledge to repair it yourself. | * [[Template:Inaccurate|<nowiki>{{inaccurate}}</nowiki>]]: Used when a section or article contains substantial factual inaccuracies. Only use this if you don't have the time/knowledge to repair it yourself. | ||
* [[Template:Missing]]: Used when a particular section or article contains substantial on-topic information that is missing, and without links to pages where that information is adequately described. Use this only if you don't have the time/knowledge to repair it yourself. | * [[Template:Missing|<nowiki>{{missing}}</nowiki>]]: Used when a particular section or article contains substantial on-topic information that is missing, and without links to pages where that information is adequately described. Use this only if you don't have the time/knowledge to repair it yourself. | ||
== Miscellaneous == | == Miscellaneous == | ||
Line 38: | Line 38: | ||
These are useful templates, but don't fall under a general category. | These are useful templates, but don't fall under a general category. | ||
* [[Template:Current version]]: The current OpenGL version number. Use this ''anywhere'' in place of the current version. | * [[Template:Current version|<nowiki>{{current version}}</nowiki>]]: The current OpenGL version number. Use this ''anywhere'' in place of the current version. | ||
* [[Template:Main]]: Use this at the top of a section if that section is a short description for something that has a longer, more indepth article. | * [[Template:Main|<nowiki>{{main}}</nowiki>]]: Use this at the top of a section if that section is a short description for something that has a longer, more indepth article. | ||
* [[Template:Deprecated]]: Used when a section or article is covering material that has been deprecated and removed in the current core version of OpenGL. It looks like an Alert, but it isn't. | * [[Template:Deprecated|<nowiki>{{deprecated}}</nowiki>]]: Used when a section or article is covering material that has been deprecated and removed in the current core version of OpenGL. It looks like an Alert, but it isn't. |
Revision as of 04:36, 23 September 2012
Formatting Templates are MediaWiki templates that have been created to make it easier to express certain things, or to describe features of an article or section. There are several categories of templates that you may wish to use:
Information Boxes
These templates create the offset boxes that describe an article in some way. They are:
- {{infobox feature}}: These denote articles or sections that describe an OpenGL feature bound to a specific version, OpenGL extension, or other such. It has options for an entire array of history for that extension, from vendor-specific extensions to the version where it was adopted into core. You can even discuss features that were removed and remove the "core in version" line, to let people know when they were removed.
Admonitions
Admonitions are paragraphs that are offset from the main flow of the text, usually to indicate a notification of some kind. There are several admonition templates. They all take one unnamed (positional) parameter: the paragraphs of text to offset.
- {{note}}: Used for general notes.
- {{legacy note}}: Used for notations that are specifically about deprecated and removed functionality, or simply old extensions or behaviors that may no longer be applicable for modern use. The text in these admonitions is not for current hardware or current core OpenGL versions.
- {{warning}}: Used for warnings; typically specific "gotchas" that a user may encounter.
Inline Formatting
These templates are useful for doing inline formatting of various code.
- {{apifunc}}: Use this when writing API functions. It will automatically link to the documentation for them. Only works for APIs already in the wiki (4.6 core).
- {{enum}}: Use this instead of <code></code> tags for enumerators.
- {{param}}: Use this instead of '' '' for names of function parameters.
- {{code}}: Use this instead of <code></code> tags for inline bits of code. This makes it easier to change the formatting of these tags as needed.
- {{extref}}: Use this to link to extensions.
Alerts
Alerts are templates that specify that something is wrong with a section or article. These should be used with care, and they should always be coupled with a discussion on the appropriate talk page. And you should only ever use them if you do not have the time/knowledge to fix the problem yourself.
- {{stub}}: Put this on a page that is short and incomplete. It denotes pages that need work.
- {{cleanup}}: Used when a section or article has formatting that is in need of repair. Do this only when you don't have the time/knowledge to repair it yourself.
- {{inaccurate}}: Used when a section or article contains substantial factual inaccuracies. Only use this if you don't have the time/knowledge to repair it yourself.
- {{missing}}: Used when a particular section or article contains substantial on-topic information that is missing, and without links to pages where that information is adequately described. Use this only if you don't have the time/knowledge to repair it yourself.
Miscellaneous
These are useful templates, but don't fall under a general category.
- {{current version}}: The current OpenGL version number. Use this anywhere in place of the current version.
- {{main}}: Use this at the top of a section if that section is a short description for something that has a longer, more indepth article.
- {{deprecated}}: Used when a section or article is covering material that has been deprecated and removed in the current core version of OpenGL. It looks like an Alert, but it isn't.