<commit_before># angular-katex

[![npm version](http://img.shields.io/npm/v/angular-katex.svg)](https://npmjs.org/package/angular-katex) ![bower version](https://img.shields.io/bower/v/angular-katex.svg) [![build status](https://img.shields.io/travis/tfoxy/angular-katex.svg)](https://travis-ci.org/tfoxy/angular-katex)

Display math with KaTex and AngularJS by using directives.


## Requirements

  - [AngularJS](https://github.com/angular/angular.js)
  - [KaTeX](https://github.com/Khan/KaTeX)


## Load into your app

You can get it from [Bower](http://bower.io/)

```sh
bower install angular-katex
```

Load the script files in your application:

```html
<script type="text/javascript" src="bower_components/angular/angular.js"></script>
<script type="text/javascript" src="bower_components/katex/dist/katex.min.js"></script>
<script type="text/javascript" src="bower_components/angular-katex/angular-katex.js"></script>
```

Add the specific module to your dependencies:

```javascript
angular.module('myApp', ['katex', ...])
```


## Usage examples

```html
<!-- Tag element -->
<katex>x^2</katex>
<commit_msg>Add npm and demo to readme<commit_after># angular-katex

[![npm version](http://img.shields.io/npm/v/angular-katex.svg)](https://npmjs.org/package/angular-katex) ![bower version](https://img.shields.io/bower/v/angular-katex.svg) [![build status](https://img.shields.io/travis/tfoxy/angular-katex.svg)](https://travis-ci.org/tfoxy/angular-katex)

Display math with KaTex and AngularJS by using directives.


## Requirements

  - [AngularJS](https://github.com/angular/angular.js)
  - [KaTeX](https://github.com/Khan/KaTeX)


## Load into your app

You can get it from [Bower](http://bower.io/)

```sh
bower install angular-katex
```

or [npm](http://npmjs.com/)

```sh
npm install angular-katex
```

Load the script files in your application:

```html
<script type="text/javascript" src="bower_components/angular/angular.js"></script>
<script type="text/javascript" src="bower_components/katex/dist/katex.min.js"></script>
<script type="text/javascript" src="bower_components/angular-katex/angular-katex.js"></script>
```

Add the specific module to your dependencies:

```javascript
angular.module('myApp', ['katex', ...])
```


## Usage examples

[Live demo](http://jsbin.com/bidici/edit?html,output)

```html
<!-- Tag element -->
<katex>x^2</katex>

{'fraction_non_alphanumeric': 0.19087837837837837, 'fraction_numerical': 0.0008445945945945946, 'mean_word_length': 4.9225, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2510229', 'n_tokens_mistral': 906, 'n_tokens_neox': 840, 'n_words': 147}