When a .tex file contains \includegraphics{figure} it may mean for latex to include figure.eps, or figure.png, or maybe certain other things. Whereas if pdflatex sees the same line, it will try for figure.pdf preferentially - and what does latexml do?
Currently the .d makefile assumes a dependency on .eps (for latex) or .pdf (for pdflatex and xelatex) or nothing at all (latexml). It would be good to do better. JD suggests making a dependency on an intermediate - we could call it .figure.wwimage or something - that can be made from various things. That would be better, especially if we could get the precedence right.
I guess another possibility would be to look in latex's output to see what image files it includes, rather than looking at the input and trying to deduce what it'll do.
Anonymous
You could add documentation for the user suggesting that they should provide the extension when possible.
If the pdflatex/latex choice is mediated through the LATEX variable, I wonder if it's possible to choose pdf or eps based on the value of that variable.
Using latex output seems like a problematic choice.
it's not - it just depends on whether they request document.pdflatex.pdf or document.pdf [or document.latex.pdf].
looking to the output of *latex and latexml seems like a problem, because I currently create the .d file before processing, not after. though creating it at the same time as processing the file is the best practice for .c files, and it might actually be best for .tex files as well...
JD suggests that something like this would work:
document.latexml.xhtml : .figure.wwfig
%.wwfig : %.eps
%.wwfig : %.pdf
.INTERMEDIATE : %.wwfig
and that this would not require actually making any .wwfig files.
Unfortunately
.INTERMEDIATE: %.wwfig
doesn't work (and I deny saying that it would).
You need to actually list the figures that you have in mind, in this case:
.INTERMEDIATE: figure.wwfig
I guess that's not hard, given the existing .d machinery.
yes, my mistake.
Unfortunately currently we have a less than desirable situation here, where latexml output just doesn't depend on the figures, because I decided that failing to notice an updated dependency is better than being unable to make when it guesses wrong about the extension. But neither is really acceptable.
Right, but is it possible to separate the question of what to do without a figure extension from the question of what to do with a figure extension? Right now, I think latexml doesn't depend on anything even when the figure extension is provided.
Good point.
OK, got the latexml dependencies on figures with explicit extensions back in, in r1013.