FANDOM



Author's Note: So currently, there's no standard for having math text displayed on this wiki. Using the preformatted boxes is ugly, LaTeX images can scale poorly on mobile resolutions, and the serif-laden texhtml clashes with the sans-serif Arial used for this wiki. I propose to use a template across the wiki for all equations. It should stand out from the normal text yet blend in with its style. To that end, I cannot decide on what looks most attractive, and if anyone makes changes to the font here, I welcome the attempts to make a prettier math for this wiki.

Currently, the MathText font is Roboto, font-weight is 600, font-size is 110%.


Description
MathText is a new standard being developed on this wiki in order to make writing attractive formulae and equations easy. At its most simple level, it's merely a template that changes the font of the passed text to Roboto and makes it a little larger and bolder. There also exist simple templates to replace your keyboard math symbols with more accurate ones.
Syntax
Type {{MathText|<...>}} somewhere, with parameters as shown below.
Within {{MathText|<...>}}, you must use {{eql}} instead of = because of transclusion syntax. Otherwise, the template fails.
You may use {{mul}} instead of x or * for multiplication.
You may use {{div}} instead of / for division.
You may use {{min}} instead of - for subtraction.
You may use {{exp|<...>}} instead of ^ or html <sup>...</sup> tags for exponentiation.
You may use {{sub|<...>}} instead of _ or html <sub>...</sub> tags for subscripts.
Recommendations
Type : before starting {{MathText|<...>}} to indent the formula. This is not being forced by the template because one might wish to use the template inline with paragraphs, or use MathText in a more piecemeal manner.
Current Issues
Ratio (or Fractional) bars are both complex and complicated to simulate via current markup. With the knowledge that it is undergoing changes and is otherwise unstable, it can be used if desired under a four-parameter template. Use {{rat|<pre>|<num>|<den>|<suc>}}, where...
pre = portion of the equation preceding the bar,
num = the numerator, or text above the bar,
den = the denominator, or text below the bar, and
suc = portion of the equation succeeding the bar.
Ratio bars fail (violently) if you make any attempt to nest a fraction inside a fraction.

Example 1
:{{MathText|Damage {{mul}} Crit Multiplier {{eql}} Crit Damage}}
Damage × Crit Multiplier = Crit Damage


Example 2
:{{MathText|Damage Reduction {{eql}} 1 {{min}} (1 {{div}} ( 1 + (Armor {{div}} 300)))}}
Damage Reduction = 1 − (1 ÷ ( 1 + (Armor ÷ 300)))
除非特別說明,社區內容使用CC-BY-SA 授權許可。