Template:Sum: Difference between revisions

From LifeWiki
Jump to navigation Jump to search
m add brac parameter (and explanation of reason thereof, for sums involving single {{choose}}s)
Confocal (talk | contribs)
m {{dtlc1}} (should be equivalent, but shorter)
Line 8: Line 8:
If you find this workaround inelegant, go <s>pester</s> politely ask Nathaniel Johnston to give us the MediaWiki LaTeX extension.
If you find this workaround inelegant, go <s>pester</s> politely ask Nathaniel Johnston to give us the MediaWiki LaTeX extension.


:<tt></tt>{{DISPLAYTITLE:Template:sum}}</noinclude>
:{{dtlc1}}</noinclude>

Revision as of 18:26, 19 September 2023

{{sum}} is a template 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
  • brac: If specified as blank (ie. ...|brac=}}), removes the bracket pair enclosing the summand. To be used in the event of a summation involving things like {{choose}}, which have their own brackets, ∑n-1k=0(k2).

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.