Tex Support

Mr.Hope ...
  • Feature
  • Markdown
Less than 1 minute

# Tex Support

Let the Markdown file in your VuePress site support the TeX\TeX syntax.

# Configuration




 




module.exports = {
  themeConfig: {
    mdEnhance: {
      tex: true,
    },
  },
};
1
2
3
4
5
6
7

# Grammar

# Inline syntax

Use $codes$.

Demo
Euler’s identity $e^{i\pi}+1=0$ is a beautiful formula in $\mathbb{R}^2$.
1

Euler’s identity eiπ+1=0e^{i\pi}+1=0 is a beautiful formula in R2\mathbb{R}^2.

# Block syntax

Use $$codes$$.

Demo
$$
\frac {\partial^r} {\partial \omega^r} \left(\frac {y^{\omega}} {\omega}\right)
= \left(\frac {y^{\omega}} {\omega}\right) \left\{(\log y)^r + \sum_{i=1}^r \frac {(-1)^ Ir \cdots (r-i+1) (\log y)^{ri}} {\omega^i} \right\}
$$
1
2
3
4

rωr(yωω)=(yωω){(logy)r+i=1r(1)Ir(ri+1)(logy)riωi}\frac {\partial^r} {\partial \omega^r} \left(\frac {y^{\omega}} {\omega}\right) = \left(\frac {y^{\omega}} {\omega}\right) \left\{(\log y)^r + \sum_{i=1}^r \frac {(-1)^ Ir \cdots (r-i+1) (\log y)^{ri}} {\omega^i} \right\}

# More

For specific Tex syntax, see Katex tutorial (opens new window)