Skip to content

walkerchi/math2pix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Math2Pix

Covert katex math into any kind of images


  • by walkerchi

Visit the Website

https://walkerchi.github.io/math2pix

Example

\begin{aligned}
\nabla \cdot \boldsymbol E &= \frac{\rho}{\varepsilon_0}
\\
\nabla \cdot \boldsymbol B &= 0
\\
\nabla \times \boldsymbol E &= -\frac{\partial \boldsymbol B}{\partial t}
\\
\nabla \times \boldsymbol B &= \mu_0 (\boldsymbol J + \varepsilon_0\frac{\partial \boldsymbol E}{\partial t})
\end{aligned}
  • $\boldsymbol E$ : Electric Field (vector field)
  • $\boldsymbol B$ : Magnetic Field (pseudovector field)
  • $\boldsymbol J$ : current density
  • $\rho$ : charge density
  • $\varepsilon_0$ : permittivity of free space
  • $\mu_0$: permeability of free

img

\begin{aligned}
\frac{\partial \boldsymbol u}{\partial t}+
(\boldsymbol u\cdot \nabla)\boldsymbol u - 
\nu \nabla^2 \boldsymbol u = 
- \frac{1}{\rho}\nabla p + \boldsymbol g
\end{aligned}
  • $\boldsymbol{ u}$ : flow velocity
  • $\rho$ : mass density
  • $p$ : pressure
  • $\boldsymbol{ g}$: body accerlation on the continuum like gravity

img

\begin{aligned}
i\hbar\frac{\partial \Psi(x,t)}{\partial t} = 
\left[-\frac{\hbar^2\partial^2}{2m\partial x^2} + V(x,t) \right] \Psi(x,t)
\end{aligned}
  • $\Psi(x,t)$ : wave function in $\mathbb C$
  • $V(x,t)$ : potential
  • $\hbar$ : plank constant
  • $i$ : imaginary unit

img

\begin{aligned}
P(S_t,t) &= N(-d_2)Ke^{-r(T-t)} - N(-d_1)S_T
\\
C(S_t, t) &= N(d_1)S_t - N(d_2)Ke^{-r(T-t)}
\\
d_1 &= \frac{1}{\sigma\sqrt{T-t}}\left[ln\left(\frac{S_t}{K}\right)+\left(r+\frac{\sigma^2}{2}\right)(T-t)\right]
\\
d_2 &= d_1 - \sigma\sqrt{T-t}
\end{aligned}
  • $P(S_t,t)$ : price of a European put(sell) option
  • $C(S_t,t)$ : price of a European call(buy) option
  • $N(x)$: gaussian cumulative distribution function(cdf)
  • $T$ : time of option expiration
  • $S_t$ : price of the underlying asset at time $t$
  • $r$ : annualized risk-free interest rate
  • $K$ : strike price(fixed price) of the option
  • $\sigma$ : standard deviation of the stock's returns

img

TODO

  • add highlight syntax
  • more example

About

Math Formula to Image Converter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors