Template:Simple formula

From Caves of Qud Wiki
Jump to navigation Jump to search

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