Difference between revisions of "Template:Maths rating/doc"

From blackwiki
Jump to navigation Jump to search
imported>MSGJ
(update new syntax)
imported>SuperMarioMan
m (Reverted edits by Inventor24 (talk) to last version by MSGJ)
 
(9 intermediate revisions by 2 users 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 -->
 
== Usage ==
 
== Usage ==
This template is used to categorize and assess articles within WikiProject Mathematics. To classify an article, place the template {{tl|maths rating}} on the article's talk page and fill in the <code>class</code>, <code>priority</code>, and <code>field</code> parameters.  
+
This template is used to categorize and assess articles within WikiProject Mathematics. To classify an article, place the template {{tl|maths rating}} on the article's talk page and fill in the <code>class</code> and <code>priority</code> parameters.
  
 
'''Please do not simply add this template without filling in the parameters.''' The purpose of this template is to carry article assessment data.
 
'''Please do not simply add this template without filling in the parameters.''' The purpose of this template is to carry article assessment data.
  
Anyone can add a maths rating or change an existing rating. These parameters will place the article in the appropriate subcategories of [[:Category:Mathematics articles by priority]], [[:Category:Mathematics articles by quality]] and [[:Category:Mathematics articles by field]].
+
Anyone can add a maths rating or change an existing rating. These parameters will place the article in the appropriate subcategories of [[:Category:Mathematics articles by priority]] and [[:Category:Mathematics articles by quality]].
  
 
===Syntax overview===
 
===Syntax overview===
 
 
When using the maths rating template, please set each of the three following parameters:  
 
When using the maths rating template, please set each of the three following parameters:  
* <code>class</code>: choose one: FA, FL, GA, A, B, C, Start, Stub, List
+
* Class: choose one: FA, FL, GA, A, B, C, Start, Stub, List, e.g. {{para|class|B}}
* <code>priority</code>: choose one: Top, High, Mid, Low
+
* Priority: choose one: Top, High, Mid, Low, e.g. {{para|priority|high}}
* Field: choose one or more of the following paramaters:
 
**{{para|general|Y}} for an article related to general mathematics.
 
**{{para|basics|Y}} for an article related to basic mathematics.
 
**{{para|analysis|Y}} for an article related to analysis.
 
**{{para|algebra|Y}} for an article related to algebra.
 
**{{para|geometry|Y}} for an article related to geometry.
 
**{{para|applied|Y}} for an article related to applied mathematics.
 
**{{para|statistics|Y}} for an article related to probability or statistics.
 
**{{para|number|Y}} for an article related to number theory.
 
**{{para|discrete|Y}} for an article related to discrete mathematics.
 
**{{para|foundations|Y}} for an article related to foundations, logic, and set theory.
 
**{{para|physics|Y}} for an article related to mathematical physics.
 
**{{para|toplogy|Y}} for an article related to topology.
 
**{{para|history|Y}} for an article related to the history of mathematics.
 
**{{para|mathematician|Y}} for an article related to a mathematician.
 
* The legacy code {{para|field}} is also supported, but this will only allow you to select one field, e.g. {{para|field|topology}}.
 
  
 
The following parameters are also available. In general, if you don't know what they mean then you don't need them.  
 
The following parameters are also available. In general, if you don't know what they mean then you don't need them.  
* <code>historical</code>: set to Y for articles on a topic with historical interest.
+
* {{para|vital|Y}} for an article that is in the Vital articles collection.
* <code>ACD</code>: set to Y if the article is undergoing an A-class discussion.
+
* {{para|portal|Y}} for an article that is a [[Portal:Mathematics/Selected article archive|selected article]] on [[Portal:Mathematics]].
* <code>vital</code>: set to Y for articles that are in the Vital articles collection.
+
* {{para|category|no}} if the template is being used as a demonstration and you do not want the page it is on to be added to any categories.
* <code>portal</code>: set to Y to place the article in [[:Category:Featured articles on Mathematics Portal]] if it is a [[Portal:Mathematics/Selected article archive|selected article]].
 
* <code>frequentlyviewed</code>: use to mark articles that are among the most frequently viewed. This parameter is set by [[User:VeblenBot|VeblenBot]], please do not use it manually.
 
* <code>small</code>: set to "yes" to make the box small. Does not appear to be used much, if at all.
 
* <code>category</code>: set to "no" if the template is being used as a demonstration and you do not want the page it is on to be added to the mathematics categories associated with the class, priority, and field.
 
  
 
===Standard template syntax===
 
===Standard template syntax===
Line 44: Line 23:
 
| class=            <!--FA, FL, GA, A, B, Start, Stub, List-->
 
| class=            <!--FA, FL, GA, A, B, Start, Stub, List-->
 
| priority =        <!--Top, High, Mid, Low-->
 
| priority =        <!--Top, High, Mid, Low-->
| field=            <!--General, Basics, Analysis, Algebra, Geometry, Applied mathematics, Probability and statistics, Number theory, Discrete, Foundations, Mathematical physics, Topology, History, Mathematicians-->
 
 
 
<!--optional or special purpose-->
 
<!--optional or special purpose-->
| historical=      <!--set to Y for articles on a topic with historical interest-->
 
| ACD=              <!--set to Y if the article is undergoing an A-class discussion-->
 
 
| vital=            <!--set to Y for articles that are in the Vital articles collection; be sure of consensus before setting-->
 
| vital=            <!--set to Y for articles that are in the Vital articles collection; be sure of consensus before setting-->
 
| portal=          <!--set to Y to place the article in Category:Featured articles on Mathematics Portal-->
 
| portal=          <!--set to Y to place the article in Category:Featured articles on Mathematics Portal-->
| frequentlyviewed= <!--This parameter is set by a bot, not manually to mark articles that are among the most frequently viewed.-->
 
| small=            <!--set to "yes" when necessary to make the box small-->
 
 
| category=        <!--set to "no" to prevent the template from adding categories to a page-->
 
| category=        <!--set to "no" to prevent the template from adding categories to a page-->
 
}}
 
}}
Line 59: Line 32:
 
===Syntax details===
 
===Syntax details===
 
The main purpose of this template is to show the classifications of articles on their talk pages, as well as to place talk pages in the appropriate categories. Only the first three parameters are required for this. However, other flags can be used to show additional information and categorize the page further.
 
The main purpose of this template is to show the classifications of articles on their talk pages, as well as to place talk pages in the appropriate categories. Only the first three parameters are required for this. However, other flags can be used to show additional information and categorize the page further.
 
====Case sensitivity and valid input====
 
The <code>class</code>, <code>priority</code>, <code>field</code>, and <code>category</code> parameters are all case-insensitive, but <code>frequentlyviewed</code> and <code>small</code> both require the case-sensitive parameter <code>yes</code> to take effect. Setting these parameters to values besides <code>yes</code> or <code>no</code> does nothing, but setting unrecognized parameters for <code>class</code> or <code>priority</code> can cause errors. At present, all valid inputs for <code>field</code> are: <br />
 
<code>algebra; analysis; applied; applied mathematics; basics; discrete; discrete mathematics; foundations; foundations, logic, and set theory; general; geometry; history; logic; mathematical physics; mathematician; mathematicians; number theory; probability; probability and statistics; set theory; statistics; topology.</code><br />
 
These are semicolon-delimited; both commas and semicolons are allowed in parameters, but no semicolons are used in any valid <code>field</code> inputs, while commas are. Not all values listed above cause distinct results. <code>Applied</code> and <code>applied mathematics</code> refer to the same category; so do <code>discrete</code> and <code>discrete mathematics</code>, and <code>foundations, logic, and set theory</code> can be abbreviated to <code>foundations</code>, <code>logic</code>, or <code>set theory</code> as <code>probability and statistics</code> is identical to either <code>probability</code> or <code>statistics</code>. Also, <code>mathematician</code> is identical to <code>mathematicians</code>.
 
 
For any of the fields who should be set to <code>Y</code> (<code>ACD</code>, <code>historical</code>, <code>portal</code>, and <code>vital</code>), providing any value for the parameter will trigger the same response. If one of these is no longer applicable to an article, the parameter should be removed or only include whitespace, not set to <code>N</code>. Each of these flags displays a link and/or message and adds the page to a category.
 
 
The <code>priority</code> parameter also has an <code>NA</code> option, but since this template is only designed to be placed on article talk pages, there should never be a reason to use it.
 
 
====Other properties====
 
Setting <code>|historical=Y</code> if there is no <code>field</code> given produces almost the same result as setting <code>|field=history</code>, except it adds [[:Category:History of subject mathematics articles]] as well as [[:Category:Mathematics articles related to history of mathematics]]. The <code>historical</code> flag always adds both categories, while <code>|field=history</code> produces only the latter. Their link in the field display, [[Wikipedia:WikiProject_Mathematics/Wikipedia 1.0/History|History]], is identical. Setting both the flag and the field would be redundant and confusing unless the article is about the history of the changing views in the history of mathematics. In fact, even then it would still be confusing, so don't do it.
 
  
 
The template also supports a <code>importance</code> parameter which functions identically to <code>priority</code> except for where the template displays the word 'priority' it will instead say 'importance.' Beyond that, there is no reason to use one over the other and no reason to use both together. If they are both used, the <code>importance</code> parameter will be ignored. If the <code>priority</code> parameter is set to blank - if <code>{{!}}priority=</code> appears with no argument - then the code considers this a use of <code>priority</code> and ignores <code>importance</code>, except when assigning categories.
 
The template also supports a <code>importance</code> parameter which functions identically to <code>priority</code> except for where the template displays the word 'priority' it will instead say 'importance.' Beyond that, there is no reason to use one over the other and no reason to use both together. If they are both used, the <code>importance</code> parameter will be ignored. If the <code>priority</code> parameter is set to blank - if <code>{{!}}priority=</code> appears with no argument - then the code considers this a use of <code>priority</code> and ignores <code>importance</code>, except when assigning categories.
 
The field parameter depends partly on the existence of other pages. While some legal values for field are added directly to the template code, others are recognized based on the categories and pages existing elsewhere. For example, if [[Wikipedia:WikiProject_Mathematics|WikiProject Mathematics]] decides to add a math field called, say, Magic squares, and thus creates a page at [[Wikipedia:WikiProject Mathematics/Wikipedia 1.0/Magic squares]] ''and'' a category, [[:Category:Mathematics articles related to magic squares]], (these names must be in this exact form and are case-sensitive) then the addition of <code>|field=magic squares</code> will be legal and produce a link to that page, displayed as [[Wikipedia:WikiProject Mathematics/Wikipedia 1.0/Magic squares|Magic squares]], in the field display as well as adding the talk page to the category. If they use different forms for the names, the template will have to be edited to add the new field as an option; many of the field parameters currently in use fall into this category.
 
 
Like similar templates, if a Comments subpage existed, the template used to include a link to it. Since these subpages are now deprecated, it instead adds categories to help automatically classify those pages for which the Comments subpage still needs to be removed. See [[WP:DCS]] for more details.
 
 
==Notes for editors==
 
===Categories===
 
The <code>|category=no</code> parameter works by surrounding each category with code so that it is only added if the parameter is not set. To add a category somewhere, use <br />
 
<code><nowiki>{{#ifeq:{{lc:{{{category|}}} }}|no||<!-- Category added here -->}}</nowiki></code><br />
 
or add it inside the large, already existing section wrapped in the <code>ifeq</code> parser function near the end, where the code for the <code>vital</code>, <code>portal</code>, and <code>historical</code> categories is.
 
 
===Case-sensitivity===
 
The case-insensitivity for the <code>class</code> and <code>priority</code> is somewhat sensitive. For <code>class</code>, it is assumed that any parameter two or fewer characters long is "intended" to be in all caps (<code>FA</code>, <code>FL</code>, <code>GA</code>), or that the relevant pages and categories linked to have these in their names - for example, [[:Category:FA-Class mathematics articles]]. It assumes that any longer values are intended to have only the first letter capitalized. For <code>priority</code>, any value except for 'NA' is supposed to have the first letter only capitalized. If adding other values for these parameters, make sure they fit into this scheme or edit the code as needed.
 
 
===Tables, whitespace, and newlines===
 
The tables in the template have been mostly converted to html-style since the readability benefits of wiki table style are lost when there is so much complexity inside and around the cells, especially since pipes (|) must be replaced with {{tl|!}} inside parser functions and templates. However, two cells require wiki tables inside them. Please be aware that introducing or removing newlines in those areas can break the template, so be careful and test your edits somewhere else first. Also, introducing newlines within <code>&lt;td&gt;</code> tags or outside the <code>&lt;table&gt;</code> tags can change spacing as well. If a particular newline is causing a problem but removing it would make the code much less readable, the newline can be commented out by placing <code>&lt;!--</code> at the end of the upper line and <code>--&gt;</code> at the beginning of the lower one. You may also wish to view [[Help:Table]] and [[Wikipedia:Line-break handling|Wikipedia:Line&#8209;break handling]] for more information.
 
 
== Categories ==
 
 
The following categories are populated by the <code>field</code> parameter:
 
*[[:Category:Mathematics articles related to analysis]]
 
*[[:Category:Mathematics articles related to algebra]] 
 
*[[:Category:Mathematics articles related to applied mathematics]]
 
*[[:Category:Mathematics articles related to basic mathematics]]
 
*[[:Category:Mathematics articles related to discrete mathematics]] 
 
*[[:Category:Mathematics articles related to foundations, logic, and set theory]]
 
*[[:Category:Mathematics articles related to general mathematics]]
 
*[[:Category:Mathematics articles related to geometry]]
 
*[[:Category:Mathematics articles related to history of mathematics]]
 
*[[:Category:Mathematics articles related to mathematical physics]]
 
*[[:Category:Mathematics articles related to mathematicians]]
 
*[[:Category:Mathematics articles related to number theory]]
 
*[[:Category:Mathematics articles related to probability and statistics]]
 
*[[:Category:Mathematics articles related to topology]]
 
  
 
==See also==
 
==See also==

Latest revision as of 00:52, 12 February 2021

Usage

This template is used to categorize and assess articles within WikiProject Mathematics. To classify an article, place the template {{maths rating}} on the article's talk page and fill in the class and priority parameters.

Please do not simply add this template without filling in the parameters. The purpose of this template is to carry article assessment data.

Anyone can add a maths rating or change an existing rating. These parameters will place the article in the appropriate subcategories of Category:Mathematics articles by priority and Category:Mathematics articles by quality.

Syntax overview

When using the maths rating template, please set each of the three following parameters:

  • Class: choose one: FA, FL, GA, A, B, C, Start, Stub, List, e.g. |class=B
  • Priority: choose one: Top, High, Mid, Low, e.g. |priority=high

The following parameters are also available. In general, if you don't know what they mean then you don't need them.

  • |vital=Y for an article that is in the Vital articles collection.
  • |portal=Y for an article that is a selected article on Portal:Mathematics.
  • |category=no if the template is being used as a demonstration and you do not want the page it is on to be added to any categories.

Standard template syntax

{{maths rating
| class=            <!--FA, FL, GA, A, B, Start, Stub, List-->
| priority =        <!--Top, High, Mid, Low-->
<!--optional or special purpose-->
| vital=            <!--set to Y for articles that are in the Vital articles collection; be sure of consensus before setting-->
| portal=           <!--set to Y to place the article in Category:Featured articles on Mathematics Portal-->
| category=         <!--set to "no" to prevent the template from adding categories to a page-->
}}

Syntax details

The main purpose of this template is to show the classifications of articles on their talk pages, as well as to place talk pages in the appropriate categories. Only the first three parameters are required for this. However, other flags can be used to show additional information and categorize the page further.

The template also supports a importance parameter which functions identically to priority except for where the template displays the word 'priority' it will instead say 'importance.' Beyond that, there is no reason to use one over the other and no reason to use both together. If they are both used, the importance parameter will be ignored. If the priority parameter is set to blank - if |priority= appears with no argument - then the code considers this a use of priority and ignores importance, except when assigning categories.

See also