Project

pseudocode

0.0
No release in over 3 years
Render Pseudocode.js from Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 2.8
~> 0.8
 Project Readme

Pseudocode.js for Ruby

Gem Version

This rubygem enables you to render LaTeX pseudocode algorithms to HTML using pseudocode.js and KaTeX.

This code is heavily inspired by KaTeX for Ruby and it uses it and ExecJS under the hood.

Installation

Add this line to your application's Gemfile:

gem 'pseudocode', '~> 0.1.0'

And then execute:

$ bundle

Or install it yourself as:

$ gem install pseudocode

Usage

Render some algorithm:

Pseudocode.render algorithm
#=> "<span class=\"root\">..."

Learn more about all the available synyax in the documentation.

Assets

For this rendered algorithms to look nice, you will also need to include Pseudocode CSS into the webpage.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/FlorianFranzen/pseudocode-ruby.

License

The gem is available as open source under the terms of the MIT License.