开发者

TeX compiler in ruby

开发者 https://www.devze.com 2023-04-02 02:25 出处:网络
I\'m looking for a gem that allows to compile tex files (TeLaTeX or just LaTeX) into pdf. I don\'t need any templating or partial rendering, 开发者_如何学编程just simple compiler. Is there any binding

I'm looking for a gem that allows to compile tex files (TeLaTeX or just LaTeX) into pdf. I don't need any templating or partial rendering, 开发者_如何学编程just simple compiler. Is there any bindings for latex2pdf or something.


Are you looking for a TeX-Compiler written in ruby or a ruby script, that calls LaTeX?

If you look for the 2nd one: http://rubygems.org/gems/rake4latex

Defines a rake-task to generate a pdf, based on tex-sources. It checks, how many TeX-runs are needed, makeindex, bibtex... is done if required. Supports splitindex, gloss... Can be used with LaTeX, pdfLaTeX, XeLaTeX...


Can't you just call the command line directly with backtick notation?

`latex2pdf <options>`


It shows that TeX's syntax is so horrible flexible, that you actually will need TeX or any of its variants to interpret TeX files in general.
So actually calling the command line pdflatex or xelatex (or any wrapper around this, like in peakxu's answer) is the best bet here.

I have no idea if someone packaged a TeX distribution (like TeX Live) into a Ruby Gem, I suppose not.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号