Skip to content

lopezjurip/tex-element

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tex-element

Render TeX live on the web using KaTeX.

Live Demo using a text-input in Polymer.

Usage

Install via Bower:

bower install --save tex-element

Import it directly:

<link rel="import" href="bower_components/tex-element/tex-element.html">

This may change if you are using a tools like Gulp, Grunt or Webpack.

Use it

<tex-element display formula="
  \int u \frac{dv}{dx}\,dx=uv-\int \frac{du}{dx}v\,dx
"></tex-element>

Inline use

This <tex-element formula="\int_{a}^{b} x^2 dx"></tex-element> is a inline formula.

Dependencies

Element dependencies are managed via Bower. You can install that via:

npm install -g bower

Then, go ahead and download the element's dependencies:

bower install

Playing With Your Element

If you wish to work on your element in isolation, we recommend that you use Polyserve to keep your element's bower dependencies in line. You can install it via:

npm install -g polyserve

And you can run it via:

polyserve

Once running, you can preview your element at http://localhost:8080/components/tex-element/, where tex-element is the name of the directory containing it.