2.0.0 • Published 3 years ago

@diogotc/vuepress-plugin-katex v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

vuepress-plugin-katex

Katex plugin for VuePress (fork by Diogo Correia)

Installation

yarn add -D @diogotc/vuepress-plugin-katex
# or npm install -D @diogotc/vuepress-plugin-katex

Usage

config

module.exports = {
  // ...
  plugins: {
    "@diogotc/katex": {
      delimiters: "dollars",
    },
  },
  // or
  plugins: {
    "@diogotc/vuepress-plugin-katex": {
      delimiters: "dollars",
    },
  },
  // ...
};

// or

module.exports = [
  ["@diogotc/vuepress-plugin-katex", { delimiters: "dollars" }],
  // or
  ["@diogotc/katex", { delimiters: "dollars" }],
];

Options

Delimiters

  • type: string
  • default: dollars

More settings at the markdown-it-texmath repository.

dollars example

You can use render latex mathematical expressions KaTeX:

  • inline

$\Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,.$

$\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N$
  • display

$$ \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,. $$

$$
\Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,.
$$

Vue components

  • Eq.vue: used for inline KaTeX

  • Eqn.vue: used for block KaTeX

Projects used in @diogotc/vuepress-plugin-katex

Changelog

v2.0.0: Forked from @maginapp/vuepress-plugin-katex and upgraded dependencies.