Description
A Ruby wrapper for the LaTeXML LaTeX to XML/HTML/ePub converter.
Includes support for daemonized conversion runs, for additional performance, via the latexmls socket server.
LaTeXML-Ruby alternatives and similar gems
Based on the "Template Engine" category.
Alternatively, view LaTeXML-Ruby alternatives based on common mentions on social networks and blogs.
-
Liquid
Liquid markup language. Safe, customer facing template language for flexible web apps. -
Slim
Slim is a template language whose goal is to reduce the syntax to the essential parts without becoming cryptic. -
Curly
The Curly template language allows separating your logic from the structure of your HTML templates. -
Fortitude
Views Are Code: use all the power of Ruby to build views in your own language. -
Glimmer DSL for XML (& HTML)
Glimmer DSL for XML (& HTML)
Access the most powerful time series database as a service
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of LaTeXML-Ruby or a related project?
README
LaTeXML-Ruby
A Ruby wrapper for the LaTeXML LaTeX to XML/HTML/ePub converter.
Includes support for daemonized conversion runs, for additional performance, via the latexmls socket server.
Why LaTeXML?
You may be familiar with other LaTeX conversion tools such as Pandoc or tex4ht. LaTeXML attempts to be a complete TeX interpreter, and covers a vastly larger range of the TeX/LaTeX ecosystem than Pandoc. At the same time it allows for just-in-time binding of structural and semantic macros, which allows it to create higher quality HTML5 than tex4ht, and makes bridging the impedance mismatch between PDF and HTML an achievable goal.
We use LaTeXML extensively at Authorea (http://www.authorea.com) for enabling Power latex editing for our authors.
Installation
Install the stand-alone LaTeXML application using [your preferred method](dlmf.nist.gov/LaTeXML/get.html)
Add this line to your application's Gemfile:
gem 'latexml-ruby'
And then execute:
$ bundle
Or install it yourself as:
$ gem install latexml-ruby
Caveat
The current default setup of the wrapper options uses some advanced LaTeX packages, for which you also need a working LaTeX installation on the machine, as LaTeXML resorts to the native LaTeX definitions. It's usually best to install texlive
, or a similar comprehensive TeX distro. For a minimal setup set of options, see the basic test setup
Usage
A hello world conversion job looks like:
require 'latexml'
@latexml = LaTeXML.new
response = @latexml.convert(literal: "hello world")
result = response[:result]
messages = response[:messages]
status_code = response[:status_code]
You can find more information on the LaTeXML message codes in the official manual.Status codes range from 0 (OK), 1 (warning), 2 (error) to 3 (fatal error).
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/Authorea/latexml-ruby.
The 0.0.1 release of the wrapper brings support for easy conversion of latex fragments, which only scratches the surface of LaTeXML's versatile conversion use cases. If you are interested in a different workflow that is not yet supported, we will be very happy to hear from you.
License
The gem is available as open source under the terms of the MIT License.
*Note that all licence references and agreements mentioned in the LaTeXML-Ruby README section above
are relevant to that project's source code only.