Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Create an account below if you want to be able to make edits.

Template:Scrollable Math: Difference between revisions

Template page
No edit summary
No edit summary
Line 2: Line 2:


<div class="scrollable-math">
<div class="scrollable-math">
   {{{1}}}
   <math>
    {{{1}}}
  </math>
</div></includeonly>
</div></includeonly>


Line 9: Line 11:


Usage:
Usage:
  {{Scrollable Math|<math>x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}</math>}}


<templatedata>
{{Scrollable Math|
{
<math>E = mc^2</math>
  "description": "Wraps a math formula in a horizontally scrollable container for mobile devices",
}}
  "params": {
 
    "1": {
{{Scrollable Math|
      "label": "Math formula",
<math>
      "type": "string",
\text{attackerTroopLoss(tileOwner)} =
      "required": true,
\begin{cases}
      "description": "The math formula to display (include <math>…</math> tags)"
0.8 \cdot \text{terrainDef} \cdot \text{defensePost} \cdot \text{botDebuff} \cdot \text{largeAttackerBuff} \cdot \text{largeDefenderDebuff} \cdot \text{traitorDebuff} \cdot \text{clampedTroopRatio} & \text{if player or nation or bot} \\
    }
\frac{\text{terrainDef} \cdot \text{falloutDef}}{\text{attackerTypeBuff}} & \text{if wilderness}
  }
\end{cases}
}
</math>
</templatedata>
}}
</noinclude>
</noinclude>

Revision as of 14:55, 17 November 2025


This template wraps math formulas in a horizontally scrollable container for mobile devices.

Usage:

 1


 1