AW: MathML and barcode support for FOP
Sorry to interrupt you all. But I have so concerns using JEuclid for MathML. I'm not sure if I have the permission to post here, but maybe you will excuse my post if so. I am not sure if using JEuclid is the right way to deal with MathML. As far as I understand JEuclid transforms a MathML expression into an image. If this is correct, than I would found this the wrong way in principle. Wouldn't it be nicer if the MathML expression is converted into XSL:FO it self? I am not very in this field, but as far as I understand MathML (pm) this should be the way to go. Or do I completely misinterpret something? Regards Norman Markgraf
Re: AW: MathML and barcode support for FOP
The MathML extension uses JEuclid to convert the MathML to SVG internally so we get quite good quality. I don't think it is possible to create XSL-FO code from MathML because you can't properly place all the elements. Doing that with SVG is a lot better. On 27.07.2005 10:54:45 Norman Markgraf wrote: Sorry to interrupt you all. But I have so concerns using JEuclid for MathML. I'm not sure if I have the permission to post here, but maybe you will excuse my post if so. I am not sure if using JEuclid is the right way to deal with MathML. As far as I understand JEuclid transforms a MathML expression into an image. If this is correct, than I would found this the wrong way in principle. Wouldn't it be nicer if the MathML expression is converted into XSL:FO it self? I am not very in this field, but as far as I understand MathML (pm) this should be the way to go. Or do I completely misinterpret something? Jeremias Maerki
Re: MathML and barcode support for FOP
Sorry to interrupt you all. But I have so concerns using JEuclid for MathML. I'm not sure if I have the permission to post here, but maybe you will excuse my post if so. I am not sure if using JEuclid is the right way to deal with MathML. As far as I understand JEuclid transforms a MathML expression into an image. Not exactly. JEuclid renders MathML on Graphics2D object. Depending on the Graphics2D nature you can output MathML as image or svn graphics or something else. There is a custom PDFGraphics2D class in the FOP. We use especially this PDFGraphics2D to output MathML directly into PDF. The important moment here is that we insert MathML into PDF not as an image but we render MathML by means of font glyphs. Sure, with JEuclid MathML could be inserted into PDF as an image as well: MathML could be rendered as SVG image and then inserted into PDF. But such transformation is redundant. If this is correct, than I would found this the wrong way in principle. Wouldn't it be nicer if the MathML expression is converted into XSL:FO it self? It is impossible. XSL:FO does not support MathML spec. In other words, you can't render MathML by means of XSL:FO elements only. I am not very in this field, but as far as I understand MathML (pm) this should be the way to go. Or do I completely misinterpret something? Regards Norman Markgraf -- Cheers, Siarhei Baidun
Re: AW: MathML and barcode support for FOP
While we are speaking of that, If I may give my opinion: I agree with Norman that using images to render maths isn't a good solution in the long-term. The fact that it is SVG improves the situation a bit because fonts will be rendered fine, but there are other problems to address: for example it is difficult to align the baseline of an inline-rendered equation with the text's baseline. It also is not possible to break an equation into multiple lines. A native MathML renderer will be necessary to beat TeX in this area. I was thinking of writing one for Fop but I'm missing time and for now I'm in the font subsystem stuff. The work referred by Siarhei Baidun may definitely be interesting. Vincent Jeremias Maerki a écrit : The MathML extension uses JEuclid to convert the MathML to SVG internally so we get quite good quality. I don't think it is possible to create XSL-FO code from MathML because you can't properly place all the elements. Doing that with SVG is a lot better. On 27.07.2005 10:54:45 Norman Markgraf wrote: Sorry to interrupt you all. But I have so concerns using JEuclid for MathML. I'm not sure if I have the permission to post here, but maybe you will excuse my post if so. I am not sure if using JEuclid is the right way to deal with MathML. As far as I understand JEuclid transforms a MathML expression into an image. If this is correct, than I would found this the wrong way in principle. Wouldn't it be nicer if the MathML expression is converted into XSL:FO it self? I am not very in this field, but as far as I understand MathML (pm) this should be the way to go. Or do I completely misinterpret something? Jeremias Maerki
AW: MathML and barcode support for FOP
Thank you, Siarhei, for the explanation of the interrelationship between JEuclid and FOP. In fact that was roughly what I mean by image. As I explained, I am not in the details. The words by Jeremias, that you can not place all element properly, might be the point that sounds the most important to me. Does anybody know if there is an approach like that one Vincent wanted to try, but has not find the time for? You are most likely right, Jeremias, but ... I think the way to convert MathML to XSL:FO is more natural. Maybe here are some people who give this a try. If so, please contact me via private email. Regards, Norman Markgraf
Re: AW: MathML and barcode support for FOP
Please don't work on private channels. You can use the fop-dev mailing list to discuss stuff around MathML as long as there is some relation to FOP. I wasn't aware of the advanced requirements like baseline alignment and such. At any rate, the new FOP has the ideal infrastructure to handle cases like that. You also have to see that the MathML extension was probably never used in production since it was hidden for years inside the examples directory. If you guys have additional needs bring them here, band together. The FOP committers will certainly assist where they can. If bringing in JEuclid into the Apache Software Foundation helps this process I'm glad to help start talks with the original authors of JEuclid and to serve as sponsoring member when it has to go through the Incubator. Still, Norman, converting MathML to XSL-FO is almost certainly not doable but that's not even necessary because as Siarhei Baidun mentioned it is possible to paint the formulae directly to a Graphics2D interface (all inside FOP). The way through SVG is most probably not necessary for output formats like PDF, PostScript and Java2D. On 27.07.2005 13:07:59 Norman Markgraf wrote: Thank you, Siarhei, for the explanation of the interrelationship between JEuclid and FOP. In fact that was roughly what I mean by image. As I explained, I am not in the details. The words by Jeremias, that you can not place all element properly, might be the point that sounds the most important to me. Does anybody know if there is an approach like that one Vincent wanted to try, but has not find the time for? You are most likely right, Jeremias, but ... I think the way to convert MathML to XSL:FO is more natural. Maybe here are some people who give this a try. If so, please contact me via private email. Regards, Norman Markgraf Jeremias Maerki
Re: MathML and barcode support for FOP
It all sounds good to me. I was one of those asking for batik-less FOP, since I needed to output PDF from a headless system (I think we ended up using the Postscript renderer, and cat'ing it to the printer...). I also welcome the thought of additional XML Graphics projects. Not so much for the sake of quantity, but because I hope that additional projects might bring additional users (folks interested in MathML or Barcode4J, but not necessarily brought in because of XSL-FO/PDF or SVG), and eventually additional committers (mmm... fresh blood ;-)). Web Maestro Clay On Jul 26, 2005, at 7:26 AM, Jeremias Maerki wrote: Devs, I'd like to have your thoughts about the following proposal. MathML and barcodes are frequently asked for and I would consider it a service to our users if we provided support for both out-of-the-box without people having to scratch together the little pieces to make this stuff work. JEuclid is AL1.1 and Barcode4J is AL2.0 licensed. So no worries about redistribution. I'd like to promote the MathML extension out of the examples directory where it seems to be a little hidden. We still have the plan extension as a good example for FOP extensions. But I wouldn't really want to integrate the MathML extension sources into the main source tree where it adds to the existing blob of code. I'd rather make SVG support separate and therefore optional and put both (SVG and MathML) alongside each other in a separate place next to the main sources. FOP without Batik-dependency has also been asked for a few times which we could get almost for free if we did this. Barcode4J 1.0 as my proposed barcode package (what a surprise!) has its own FOP extension and would simply be added as a JAR file in the lib directory. I could do the necessary changes while doing the whole XML Graphics Commons stuff which I really really really want to do really really soon now. :-) Jeremias Maerki Regards, Web Maestro Clay -- [EMAIL PROTECTED] - http://homepage.mac.com/webmaestro/ My religion is simple. My religion is kindness. - HH The 14th Dalai Lama of Tibet
Re: MathML and barcode support for FOP
I was not so much thinking about additional XML Graphics projects. Bringing Barcode4J here was on my mind, but not lately. I'm not sure if it would be a good fit as it doesn't exclusively have to do the converting XML to graphical output. That's only one use case. Generating barcodes as bitmap images, for example, has absolutely nothing to do with XML stuff. Bringing JEuclid into the ASF and XML Graphics, however, could be quite interesting and would be fully in line with the project charter. On 26.07.2005 16:34:08 The Web Maestro wrote: It all sounds good to me. I was one of those asking for batik-less FOP, since I needed to output PDF from a headless system (I think we ended up using the Postscript renderer, and cat'ing it to the printer...). I also welcome the thought of additional XML Graphics projects. Not so much for the sake of quantity, but because I hope that additional projects might bring additional users (folks interested in MathML or Barcode4J, but not necessarily brought in because of XSL-FO/PDF or SVG), and eventually additional committers (mmm... fresh blood ;-)). Web Maestro Clay On Jul 26, 2005, at 7:26 AM, Jeremias Maerki wrote: Devs, I'd like to have your thoughts about the following proposal. MathML and barcodes are frequently asked for and I would consider it a service to our users if we provided support for both out-of-the-box without people having to scratch together the little pieces to make this stuff work. JEuclid is AL1.1 and Barcode4J is AL2.0 licensed. So no worries about redistribution. I'd like to promote the MathML extension out of the examples directory where it seems to be a little hidden. We still have the plan extension as a good example for FOP extensions. But I wouldn't really want to integrate the MathML extension sources into the main source tree where it adds to the existing blob of code. I'd rather make SVG support separate and therefore optional and put both (SVG and MathML) alongside each other in a separate place next to the main sources. FOP without Batik-dependency has also been asked for a few times which we could get almost for free if we did this. Barcode4J 1.0 as my proposed barcode package (what a surprise!) has its own FOP extension and would simply be added as a JAR file in the lib directory. I could do the necessary changes while doing the whole XML Graphics Commons stuff which I really really really want to do really really soon now. :-) Jeremias Maerki Regards, Web Maestro Clay -- [EMAIL PROTECTED] - http://homepage.mac.com/webmaestro/ My religion is simple. My religion is kindness. - HH The 14th Dalai Lama of Tibet Jeremias Maerki
Re: MathML and barcode support for FOP
Jeremias Maerki wrote: Devs, I'd like to have your thoughts about the following proposal. MathML and barcodes are frequently asked for and I would consider it a service to our users if we provided support for both out-of-the-box without people having to scratch together the little pieces to make this stuff work. JEuclid is AL1.1 and Barcode4J is AL2.0 licensed. So no worries about redistribution. I'd like to promote the MathML extension out of the examples directory where it seems to be a little hidden. We still have the plan extension as a good example for FOP extensions. But I wouldn't really want to integrate the MathML extension sources into the main source tree where it adds to the existing blob of code. I'd rather make SVG support separate and therefore optional and put both (SVG and MathML) alongside each other in a separate place next to the main sources. FOP without Batik-dependency has also been asked for a few times which we could get almost for free if we did this. Barcode4J 1.0 as my proposed barcode package (what a surprise!) has its own FOP extension and would simply be added as a JAR file in the lib directory. I could do the necessary changes while doing the whole XML Graphics Commons stuff which I really really really want to do really really soon now. :-) I am in favour of seeing MathML and barcode support out of the box in FOP. Most people using XSL-FO for printed documents have a requirement to add Barcodes and there are a small number of people asking for Mathematic Formula representions. As you already mentioned it might be a good idea to move the JEuclid code into a sub project of Xml Graphics. Possibly the code that Siarhei Baidun is proposing to commit to Apache in another thread. Chris
Re: MathML and barcode support for FOP
I understand your concerns but we should make it as easy as possible for beginners. There are a lot of them, many knowing almost nothing about Java and classpaths. The beauty with these extensions is that they can easily be deleted when not used. No rebuild necessary. On 26.07.2005 21:45:33 Simon Pepping wrote: Having MathML and barcode support is a good thing. But I am not very enthousiastic about the goal of providing support for both out-of-the-box. Scratching pieces of functionality together and integrating them is a different role than developing an application. I am a Debian Linux user, and an advocate of the model of Debian (and other distributions): development is one role, integration is another role. I am horrified of the Apache packages, which make me have Xerces and other libs many times on my computer. I am in favour of promoting the MathML extension to a more visible place. I have no opinion on JEuclid in XMLGraphics. Separating SVG support from FOP core is OK with me. Jeremias Maerki