Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FOP / DITA Open Toolkit install instructions #13

Closed
Enigma644 opened this issue Jul 5, 2023 · 3 comments
Closed

FOP / DITA Open Toolkit install instructions #13

Enigma644 opened this issue Jul 5, 2023 · 3 comments

Comments

@Enigma644
Copy link

I see in comments that in order to use the FOP plugin I need to call:
JEuclidFopFactoryConfigurator.configure()
But how do I do that if I'm trying to use the FOP plugin with the DITA Open Toolkit?

OT v3.6.1 has Batik v1.13, so I assume that version should work ok.
I've copied the core and fop jar into with DITA-OT /lib, but I'm getting an Unknown formatting object error, presumably because I've not yet enabled the FOP plugin?

Any help would be much appreciated!

@rototor
Copy link
Owner

rototor commented Jul 5, 2023

Sorry, I have no idea about FOP. Please look here #5, maybe that helps. The FOP support existed originally in the project, I removed it but @dubinsky brought it back.

Regarding Batik, you can always use and depend on the latest version. Batik is in pure "serve security fixes" only mode, so there is not really any difference in Batik 1.16 beside some security fixes.

@rototor rototor closed this as completed Jul 5, 2023
@Enigma644
Copy link
Author

@dubinsky any insights?

@dubinsky
Copy link
Contributor

@Enigma644

But how do I do that if I'm trying to use the FOP plugin with the DITA Open Toolkit?

I have no idea what DITA Open Toolkit is, but in order for the JEuclid FOP plugin to be available during a FOP run,
whatever code runs FOP - and obtains an instance of org.apache.fop.apps.FopFactory to do so - needs to register the plugin with FOP, for instance, by calling JEuclidFopFactoryConfigurator.configure().

Original FOP plugin auto-registered with FOP, but when restoring it, I switched to manual registration in order to be able to experiment with alternative ways of typesetting mathematics with FOP but without JEuclid. Approach with spawning an external Node process running MathJax for each piece of mathematics, even though not very elegant and probably slower than using JEuclid, turned out preferable for me, because of the abysmal quality of the typesetting delivered by the long-abandoned JEuclid compared to the quality delivered by the actively-developed MathJax.

I ended up not having JEuclid on my classpath, so if restoring the self-registration approach of the original FOP plugin works for you better than adding explicit programmatic registration, feel free to restore the META-INF/services files that were removed when FOP plugin was removed and that I did not bring back when I brought the plugin back...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants