Merge pull request #1481 from danielyxie/improve

fix mathjax
This commit is contained in:
hydroflame 2021-10-13 15:58:19 -04:00 committed by GitHub
commit 921a1517df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 6 deletions

@ -20,9 +20,7 @@ export function IndustryProductEquation(props: IProps): React.ReactElement {
return ( return (
<MathJaxContext> <MathJaxContext>
<MathJax> <MathJax>{"\\(" + reqs.join("+") + `\\Rightarrow` + prod.map((p) => `1\\text{ }${p}`).join("+") + "\\)"}</MathJax>
{reqs.join("+") + String.raw`\Rightarrow` + prod.map((p) => String.raw`1\text{ }${p}`).join("+")}
</MathJax>
</MathJaxContext> </MathJaxContext>
); );
} }

@ -99,7 +99,7 @@ export function DonateOption(props: IProps): React.ReactElement {
/> />
<Typography> <Typography>
<MathJaxContext> <MathJaxContext>
<MathJax>{String.raw`reputation = \frac{\text{donation amount} \times \text{reputation multiplier}}{10^{${digits}}}`}</MathJax> <MathJax>{`\\(reputation = \\frac{\\text{donation amount} \\cdot \\text{reputation multiplier}}{10^{${digits}}}\\)`}</MathJax>
</MathJaxContext> </MathJaxContext>
</Typography> </Typography>
</> </>

@ -33,7 +33,7 @@ export function CoresButton(props: IProps): React.ReactElement {
<Tooltip <Tooltip
title={ title={
<MathJaxContext> <MathJaxContext>
<MathJax>{String.raw`\large{cost = 10^9 \times 7.5 ^{\text{cores}}}`}</MathJax> <MathJax>{`\\(\\large{cost = 10^9 \\cdot 7.5 ^{\\text{cores}}}\\)`}</MathJax>
</MathJaxContext> </MathJaxContext>
} }
> >

@ -32,7 +32,7 @@ export function RamButton(props: IProps): React.ReactElement {
<Tooltip <Tooltip
title={ title={
<MathJaxContext> <MathJaxContext>
<MathJax>{String.raw`\large{cost = 3.2 \times 10^3 \times 1.58^{log_2{(ram)}}}`}</MathJax> <MathJax>{`\\(\\large{cost = 3.2 \\cdot 10^3 \\cdot 1.58^{log_2{(ram)}}}\\)`}</MathJax>
</MathJaxContext> </MathJaxContext>
} }
> >