Alle Monday 03 November 2008, Josef 'Jupp' Schugt ha scritto:
> On Mon, 03 Nov 2008 10:41:25 +0100, Stefano Crocco
>
> <stefano.crocco / alice.it> wrote:
> > Does anyone know whether there's a rake task to build latex files,
> > including taking care of whether latex should be run one or more times?
> > I searched google, this mailing list, rubyforge and RAA, but found
> > nothing.
>
> As far as I know there is no such rake task. Almost all people using LaTeX
> use an environment that takes care of this (AucTeX for example), launch
> the programs manually or use Makefiles for it
>
> > If  nobody has already written one, I can do it myself, but I wanted to
> > be sure before attempting it.
>
> Let me suggest that you do not write such a task from scratch but starting
> with a proven Makefile. While the implementation of the tasks is simple,
> the dependencies that need to be taken into account are not. Two Makefiles
> you may wish to look at:
>
> http://www.acoustics.hut.fi/u/mairas/UltimateLatexMakefile/
> http://code.google.com/p/latex-makefile/
>
> And please consider taking a look at AucTeX. In my humble opinion it is
> the best available environment to write LaTeX and it is available for
> every operating system that has GNU Emacs or XEmacs and a LaTeX
> implementation (i.e. on virtually every operating system currently in use).
>
> http://www.gnu.org/software/auctex/
>
> Even though I use vim most of the time I prefer writing LaTeX with Emacs
> and AucTeX.
>
> Josef 'Jupp' Schugt

Thanks for the answer and for the pointers to the two makefiles. I looked at 
them and I must admit that they look much more complex than I'd have expected. 

I know about AucTeX and other tools like it (I've used them in the past), but 
for what I'm doing now, they're useless. I got the idea of writing the 
documentation for the ruby program I'm developing using literate programming 
and rubyweb (http://www.eng.dmu.ac.uk/~hgs/ruby/rubyweb) and to use latex to 
format the output of rubyweb. This has two consequences:
1) AucTeX and similar tools expect to have to deal with latex-only files and 
would be utterly confused by a mix of ruby and latex. I could indeed use them 
on the files produced by rubyweb, which are pure latex, but that couldn't be 
easily automated
2) Not only I, but also the users of my program should be able to build the 
documentation, without the need of installing extra tools.

Thanks again

Stefano