Math Notation Examples
Examples of how to use the MathBlock component for displaying mathematical formulas.
CLIP Loss Formula
The default MathBlock component renders the CLIP loss formula with special formatting:
Loss = − 1⁄N Σi=1N log
esim(Ii,Ti)
Σj=1N esim(Ii,Tj)
Custom Formulas
You can also render custom LaTeX-style formulas:
Σi=0n i2 =
n(n+1)(2n+1)
6
The Euler's identity formula can be rendered as:
eiπ + 1 = 0
Inline Math
The InlineMath component can be used for inline notation, likeα and β.
When discussing image-text pairs, we can refer to the image Iiand the text Tj, and their similarity functionsim(·).
Custom Styling
The MathBlock component supports custom styling through the className prop:
∫ab f(x) \, dx = F(b) - F(a)
Dark mode is also supported:
d
dx