Template:Sum: Difference between revisions

From LifeWiki
Jump to navigation Jump to search
Create (a template for expressing summations with properly-aligned limits, that we shall love and cherish forevermore :-)
 
Confocal (talk | contribs)
m typo
Line 5: Line 5:
For instance, <tt><nowiki><tt>{{sum|k{{=}}0|n-1|k}}</tt></nowiki></tt> becomes <tt>{{sum|k{{=}}0|n-1|k}}</tt>. (Note that <tt>[[:Template:=|<nowiki>{{=}}</nowiki>]]</tt> must be used in place of <tt>=</tt>, which is otherwise accepted as a parameter and may cause problems.)
For instance, <tt><nowiki><tt>{{sum|k{{=}}0|n-1|k}}</tt></nowiki></tt> becomes <tt>{{sum|k{{=}}0|n-1|k}}</tt>. (Note that <tt>[[:Template:=|<nowiki>{{=}}</nowiki>]]</tt> must be used in place of <tt>=</tt>, which is otherwise accepted as a parameter and may cause problems.)


If you find this workaround inelegant, go <s>pester</s> poitely ask Nathaniel Johnston to give us the MediaWiki LaTeX extension.</noinclude>
If you find this workaround inelegant, go <s>pester</s> politely ask Nathaniel Johnston to give us the MediaWiki LaTeX extension.</noinclude>

Revision as of 17:14, 17 August 2023

This template is for expressing mathematical summations. It uses a vertical grid, so makes the line it inhabits slightly taller. Its parameters may be expressed with their names present or forgone (in which case their order is used).

  • lowe: The lower bound
  • uppe: The upper bound
  • term: The summand

For instance, <tt>{{sum|k{{=}}0|n-1|k}}</tt> becomes Σn-1k=0(k). (Note that {{=}} must be used in place of =, which is otherwise accepted as a parameter and may cause problems.)

If you find this workaround inelegant, go pester politely ask Nathaniel Johnston to give us the MediaWiki LaTeX extension.