Template:Simple formula: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
Line 20: Line 20:
! Result
! Result
|-
|-
| <code><nowiki>{{simple formula| (17 + (Level * 5)) / 7 }}</nowiki></code>
| <code><nowiki>{{simple formula | (17 + (Level * 5)) / 7 }}</nowiki></code>
| {{simple formula| (17 + (Level * 5)) / 7 }}
| {{simple formula | (17 + (Level * 5)) / 7 }}
|-
|-
| <code><nowiki>{{simple formula| (17 + (Level * 5)) / 7 | size=100 | color=white}}</nowiki></code>
| <code><nowiki>{{simple formula | (17 + (Level * 5)) / 7 | size=100 | color=white}}</nowiki></code>
| {{simple formula| (17 + (Level * 5)) / 7 | size=100 | color=white}}
| {{simple formula | (17 + (Level * 5)) / 7 | size=100 | color=white}}
|}
|}


[[Category:Formatting templates]]
[[Category:Formatting templates]]
</noinclude>
</noinclude>

Latest revision as of 22:02, 4 October 2020

Overview

Creates a simple, formatted, formula from the input string.

  • Adds common colors and formatting
  • Bolds the entire formula except for variables (words)
  • Replaces * with ×
  • Replaces caret power notation (like Level^2) with superscript power notation (like Level2)

Can be adjusted later if we want to change the format.

Parameters

  • formula: default parameter
  • size: font size percentage - 130 by default
  • color: color - #009403 by default (green)

Examples

Code Result
{{simple formula | (17 + (Level * 5)) / 7 }}
(17 + (Level × 5)) / 7
{{simple formula | (17 + (Level * 5)) / 7 | size=100 | color=white}}
(17 + (Level × 5)) / 7