eclipse-texlipse / texlipse

Eclipse Texlipse
https://projects.eclipse.org/projects/science.texlipse
Eclipse Public License 1.0
61 stars 20 forks source link

A fast and reliable build system for latex could be easy #22

Open LeonardMichlmayr opened 7 years ago

LeonardMichlmayr commented 7 years ago

The problem

I am currently using the texlipse 1.5. I have not looked into the texlipse build code yet, but from my experience it seems to follow the traditional aproach: recompile as long as there are undefined references or undefined citation keys in the error log or a limit is reached.

This may be better than the static "compile twice" approach, but still there are some problems:

A better build system

Some years ago I used a different approach for my own documents that I would love to see implemented in a way that can be used by all latex-authors. My build system was based on GNU make. The idea follows the same principles as a Makefile for c code: generate dependencies and rebuild every file that is older than any of its input files. A latex file will be rebuilt until all the page numbers / references / bookmarks have reached a stable value. It will not be built more often than necessary.

Here is how I addressed some of the tex specific problems that occur in this approach:

Replace timestamps with checksums

There is a cyclic dependency on auxiliary files like .aux, .toc, .out, .bbl. To generate these files we take these files as input. Therefore we cannot use a timestamp to check for a change. I used a checksum, saved the checksum in a file and updated the checksum file only when the checksum changed. This way I had timestamp of the last change of the auxiliary files.

Analyse dependencies

In my system I just parsed the .tex files for \input, \include and \includegraphics. This worked for me, but more general system should not fail just because someone defines \myinput. Instead you should parse the tex console output for the names of input files and also for input files that yet don't exist (No file example.aux).

What can go wrong?

Conclusio

Since there is active development on texlipse now, I hope that the developers consider my suggestions for a new build system.

fiee commented 4 years ago

Why not use latexmk or arara?

I managed to setup latexmk as an external tool, but the errors don’t get interpreted. It would be an easy option to have it as build process.