Stefan Wachter wrote:
Steve Loughran wrote:
Stefan Wachter wrote:
Hi all,
I developed a simple task that can be used to process a fileset of TeX files. If you think that task is useful to others too, then you may include it in the Ant distribution. You may choose to change the package where I decided to place the task.
Cheers, --Stefan
<target name="pdf" depends="compile, context">
<tex dir="${stammPdfBuildDir}" includes="**/*.tex" verbose="false" mode="context"/>
</target>
It is useful, but I dont think its core enough to go into the Ant distro. We will happily link to wherever you host it, such as on sourceforge. A <bibtex> task with it would be nice too.
Couple of questions
1. how do you do dependency logic?
2. how do you know how many times to run tex?
3. what if I want LaTeX?
-steve
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Hi Steve,
unfortunately, I have no "public" place where I can make that task available. Do you know some place out there that could be used?
The ant-contrib project on sourceforge is the main repository of out-of-scope stuff. I
Regarding your questions:
1 (dependency check): I assume that for each source file (*.tex) a destination file is to be generated. The filename extension of the destination files can be configured and is defaulted to "pdf". I check for each source file if the corresponding destination file already exists and if it is newer. In that case TeX is not executed.
Interesting. PDF and not DVI. hmm, Maybe each executable chosen would have a different default.
2 (repetitions): TeX is only executed once. Maybe this should also be configurable.
that is one of the troubles with tex an dependency logic, you need to run it multiple times to get to fix things up. I dont think the executable provides feedback in the terms of a return code, so unless you parse output text, its hard. Alternatively, iterate until the output file doesnt change. It would overshoot by one, but, well, so what. TeX is fast. Given that knuth claims that tex has no knoen
3 (variants of TeX): I currently support two variants of TeX to be used: "pdflatex" and "context". Depending on the variants different commands are executed:
- for pdflatex: command = new String[] { "pdflatex", " &pdflatex \\nonstopmode\\input{" + srcFile.getName() + "}"};
- for context: command = new String[] {"texexec", "--silent " + srcFile.getName()};
maybe the command should also be configurable. For example naming the executable ("pdflatex", "texexec", ...) and the arguments. The arguments might contain a special token that is replaced by the filename of each file to be processed.
I think it should be configurable, maybe even with a full path option.
-steve
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]