19.0.0 • Published 8 months ago

ngx-katex v19.0.0

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

ngx-katex

A simple Angular wrapper for KaTeX. This project is a simplified fork of ng-katex with updated libraries.

Installation

Install the library and it's dependencies.

yarn add ngx-katex katex
yarn add --dev @types/katex

Load the Katex CSS in your styles.scss

@import 'katex/dist/katex.css';

Usage

Simple usage

import { Component } from '@angular/core';
import { NgxKatexComponent } from 'ngx-katex';

@Component({
  selector: 'my-app',
  template: `<ngx-katex [equation]="equation"></ngx-katex>`
})
export class AppComponent {
  equation: string = '\\sum_{i=1}^nx_i';

Simple usage with KaTeX options.

import { Component } from '@angular/core';

import { KatexOptions } from 'ng-katex';

@Component({
  selector: 'my-app',
  template: `<ngx-katex [equation]="equation" [options]="options"></ngx-katex>`
})
export class AppComponent {
  equation: string = '\\sum_{i=1}^nx_i';
  options: KatexOptions = {
    displayMode: true,
  };
}

Thanks

Thanks to Sergio García Prado @garciparedes for the original ng-katex.

19.0.0

8 months ago

19.0.0-alpha.0

8 months ago

18.0.0

10 months ago

0.1.0

1 year ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.1-1

3 years ago

0.0.1-0

3 years ago