@diogotc/vuepress-plugin-katex

2.0.0 • Public • Published

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.

/@diogotc/vuepress-plugin-katex/

    Package Sidebar

    Install

    npm i @diogotc/vuepress-plugin-katex

    Weekly Downloads

    0

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    3.87 kB

    Total Files

    8

    Last publish

    Collaborators

    • diogotc