TeX in Ruby on Rails

Hello,
I’m new to ruby on rails, but I’m looking for a possibility to
integrate TeX documents in my blog! I thought it might be possible to
convert a TeX document to Xml and then sent the file to the webpage.
On the server there should be a function that looks for new files and
automatically integrate them on the webpage, by just adding them
depending on the date and category (both mentioned in the file).
Do you know such a solution ? or can you tell me how to do it more
easy ?
Hope you can help me!
Snoop1990

On Thu, Sep 27, 2007 at 06:21:20AM -0700, Snoop1990 wrote:

Hello,
I’m new to ruby on rails, but I’m looking for a possibility to
integrate TeX documents in my blog! I thought it might be possible to
convert a TeX document to Xml and then sent the file to the webpage.
On the server there should be a function that looks for new files and
automatically integrate them on the webpage, by just adding them
depending on the date and category (both mentioned in the file).
Do you know such a solution ? or can you tell me how to do it more
easy ?

You have three independent problems here:

  1. converting TeX documents to a web-friendly format (if you mean PDF,
    this
    is easy; if you mean HTML, it’s also reasonably easy but you may be
    unhappy with the results)

  2. checking for new files periodically and invoking this conversion

  3. integrating the resulting files into a Rails-based blog

Once it’s broken down like this, attacking each part the problem is much
simpler than treating it as a single problem.

The first of these is unrelated to Ruby or Rails, and you should do a
Google search to find the conversion software you need. Don’t expect it
to
be written in Ruby.

The second is a cron job, presumably running a Ruby script, maybe using
the
Rails script/runner. You’ll need to use the File API to check for new
files
and call Kernel#system to invoke the conversion.

The third part is really part of the script from the second part. You’ll
need to do some text processing on the files themselves to determine
date
and category. You can then place the converted documents somewhere
suitable
for Rails to serve it, based on the date and category. This is likely to
involve some modification of your Rails database to include the posts,
and
will require updating content indices if you are providing a full-text
search on your site.

Hope you can help me!
Snoop1990
–Greg

Thank you for your support so far ! Depending the first part I found
“rfil-0.3 (Library for TeX font installation)” on
http://www.gemjack.com/.
Just to understand it write rfil is a TEX interpreter or ? (http://
rfil.rubyforge.org/rdoc/index.html) So this will view the TEX files on
my ruby web blog ?
Snoop 1990

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs