This is not really a change as it was always de facto like that (at least for apt). The reason is basically given in the discussion of DOXIA-99. Figures are just links, and so should be valid and unique in a source document. Imagine for some obscure reason you would want to use doxia to transform a document from xdoc to latex to xhtml and back to xdoc. The final result should be identical to the original, which would not be possible if doxia changed some input on the way.

Another argument is that the automatic selection of format only works if the output format supports only one figure extension (eg latex only supports eps), but how do you choose the image in html, where you can have jpg, png, gif... ?

Doxia-1.1 outputs a WARNING level message if figure extensions are encountered that are not compatible with the current sink. For cases like latex I could imagine to change that since anything except eps doesn't make sense and we don't have a latex parser anyway. But this is on the Sink-level, you would still have to specify the extension in your apt source.

-Lukas


Trevor Harmon wrote:
Okay, so Doxia now requires figure references to specify an extension. Is there a particular reason why this change was necessary?

I really like the old way because it allowed me to have two versions of the same figure, one PNG and one PDF, that would be selected automatically depending on the output format. Now I have to force everything to be PNG.

Trevor

On Jan 13, 2009, at 5:14 AM, Lukas Theussl wrote:


It's already documented in SVN [1], we just can't publish the site until 1.1 is released.

-Lukas

[1] https://svn.apache.org/repos/asf/maven/doxia/site/src/site/apt/references/doxia-apt.apt


Trevor Harmon wrote:

I'm running into bug DOXIA-99:
 http://jira.codehaus.org/browse/DOXIA-99
If I don't specify an extension, then the HTML is generated without one, causing the image to fail to load. If I do specify an extension, then the HTML has the extension, and the image loads properly. However, this prevents the image format auto- selection feature from working described in the APT format documentation. The issue was resolved as "Won't Fix" but I don't understand why. I'm guessing that the APT format documentation is now incorrect. Specifically, this line is wrong: "An APT processor will first try to load /home/joe/docs/mylogo.eps . When the desired format is not found, a APT processor tries to convert one of the existing formats."
Should I file an issue to have the documentation corrected?
Trevor



Reply via email to