####This gem has been merged with https://github.com/pmq20/mathjax-rails. Kindly follow the latter for updates.
MathjaxRails
A Ruby gem for including mathjax for Rails 3.x or above apps
Installation
Add this line to your application's Gemfile:
gem 'mathjax_rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install mathjax_rails
Usage
add the following to config/routes.rb (you can change the name of course)
mathjax 'mathjax'
add the script tag inside app/views/layouts/application.html.erb
<%= mathjax_tag %>
and it is done!
To try it, write a simple formula, for example,
[\int_a^b f(x) dx=F(b)-F(a)]
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request