• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Authorea/latexml-ruby: A Ruby wrapper for LaTeXML

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

Authorea/latexml-ruby

开源软件地址(OpenSource Url):

https://github.com/Authorea/latexml-ruby

开源编程语言(OpenSource Language):

Ruby 100.0%

开源软件介绍(OpenSource Introduction):

LaTeXML-Ruby

Build Status license Gem Version

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

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.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap