Re: starmath, ObjectReplacements, export, word2003
Lionel Elie Mamane lionel at mamane.lu writes: On Wed, May 20, 2015 at 07:50:09AM +, Yury wrote: (...) exporting a text with formulas (starmath equations) to word2003 .DOC format. Anyone using LO to prepare scientific papers, esp. in physics, mathematics etc., would be inherently interested in such export going right. Lots of publishers accept manuscripts in word2003 .DOC format only (...). Quite incidentally to the main issue at point (which is get a good MathType export from LibreOffice Writer), I'm quite surprised by that statement. My experience, in the little corners of academia I used to ... This is getting really off topic, but I've used to think in the similar vein: we noble physicists (mathematicians, what have you) don't have to touch that word abomination. We do our precious work in pure and noble latex. Well, d'oh! In Russia, you'd be hard pressed to find a journal on physics accepting latex. But the West isn't much better on this account, mind you. The world changed, or it never was like this. We talk major journals, of course, not obscure universities' heralds. Anyway, good interoperability in mixed environment is a must. -Yury ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: starmath, ObjectReplacements, export, word2003
On Wed, May 20, 2015 at 07:50:09AM +, Yury wrote: (...) exporting a text with formulas (starmath equations) to word2003 .DOC format. Anyone using LO to prepare scientific papers, esp. in physics, mathematics etc., would be inherently interested in such export going right. Lots of publishers accept manuscripts in word2003 .DOC format only (...). Quite incidentally to the main issue at point (which is get a good MathType export from LibreOffice Writer), I'm quite surprised by that statement. My experience, in the little corners of academia I used to interact with, was that esp. in physics, mathematics etc use of (La)TeX was ubiquitous, although I've met some older people that wrote their (PhD) thesis in troff. It is only in fields like biology that I've seen people belabour with Microsoft Word. Quite strongly, in the university where I did my first and second undergraduate degrees, the possibility to open a (remote / Cytrix / Terminal Server) Microsoft Windows session from the student labs' workstations was informally known as the biologists' work tool. Mathematics, physics, computer/ing science, geology, ... were all working on Unix and (La)TeX. -- Lionel ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: starmath, ObjectReplacements, export, word2003
Thank you for answering! Now, Caolán McNamara caolanm at redhat.com writes: Sometimes no one just knows off the top of their head where the various bits and pieces so someone has to invest time to have enough information to assist. It can help to pare down text to the absolute bare minimum to describe the problem. All right. But surely there is someone sort of in charge of the code in question? Or is there? We're typically taking code submissions via gerrit (https://wiki.documentfoundation.org/Development/gerrit) Okay. 2.1) Immediately on open in word2003, the bitmap 'sits' too high in the text paragraph line in which its frame is placed. one would need to know where the processing of starmath metafile used in formula/equation conversion is located in source. What file, what subroutine? You can start in sw/source/filter/ww8/wrtww8gr.cxx SwWW8WrGrf::WriteGraphicNode, see case sw::Frame::eOle and GetGraphicFromObject and the code around there. Thanks very much. Looks much closer to what I've been talking about, and I guess it's the best direction I'll get. If I want to know the call sequences around, I absolutely must use gdb? There is no secret documentation around or anything? -Yury ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: starmath, ObjectReplacements, export, word2003
Miklos Vajna vmiklos at collabora.co.uk writes: On Wed, May 20, 2015 at 07:50:09AM +, Yury yury.tarasievich at gmail.com wrote: So, to deal with this, at least with point 2.1, one would need to know where the processing of starmath metafile used in formula/equation conversion is located in source. What file, what subroutine? Word 2003 uses Mathtype to describe the math equations and they are embedded as OLE objects into the file. The entry point of the Mathtype import is starmath/source/mathtype.cxx:557, MathType::Parse(). I *think* the Mathtype export is MathType::ConvertFromStarMath() in the same file. Many, many thanks for answering. This is not the code I'm looking for, however. :) What you're talking about is the source directory for the translation of 'eqn-mathtype' direction and back. I know this much. :) I need the place in source (call sequence, possibly?) where the bitmap attached to equation by starmath as 'ObjectReplacement' is converted to the bitmap in format word uses (Microsoft metafile?). This thing would be sort of put 'on top' of the converted starmath object. I can't easily find where this is done. If you are more interested about how this native data is embedded to the document, put a breakpoint on the export method in gdb, and have a look at the backtrace to see how you get there. Using gdb is right out for me. :) -Yury ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: starmath, ObjectReplacements, export, word2003
Hi, On Wed, May 20, 2015 at 07:50:09AM +, Yury yury.tarasiev...@gmail.com wrote: So, to deal with this, at least with point 2.1, one would need to know where the processing of starmath metafile used in formula/equation conversion is located in source. What file, what subroutine? Word 2003 uses Mathtype to describe the math equations and they are embedded as OLE objects into the file. The entry point of the Mathtype import is starmath/source/mathtype.cxx:557, MathType::Parse(). I *think* the Mathtype export is MathType::ConvertFromStarMath() in the same file. If you are more interested about how this native data is embedded to the document, put a breakpoint on the export method in gdb, and have a look at the backtrace to see how you get there. Regards, Miklos signature.asc Description: Digital signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: starmath, ObjectReplacements, export, word2003
On Wed, 2015-05-20 at 07:50 +, Yury wrote: Hey guys, It's somehow quite difficult to get any attention here. Sometimes no one just knows off the top of their head where the various bits and pieces so someone has to invest time to have enough information to assist. It can help to pare down text to the absolute bare minimum to describe the problem. 1) Bibliography entries and index are exported incorrectly, word2003 opens the exported .DOC with blanks in place of those. It's issue 88697, and I have proposed a solution already (can use it in my local build, in fact). By the way, nobody commented on my patch attached to issue – was that some wrong thing to do on my part or something? We're typically taking code submissions via gerrit (https://wiki.documentfoundation.org/Development/gerrit) 2.1) Immediately on open in word2003, the bitmap 'sits' too high in the text paragraph line in which its frame is placed. one would need to know where the processing of starmath metafile used in formula/equation conversion is located in source. What file, what subroutine? You can start in sw/source/filter/ww8/wrtww8gr.cxx SwWW8WrGrf::WriteGraphicNode, see case sw::Frame::eOle and GetGraphicFromObject and the code around there. C. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: starmath, ObjectReplacements, export, word2003
Caolán McNamara caolanm at redhat.com writes: All right. But surely there is someone sort of in charge of the code in question? Or is there? For the .doc filters basically Miklos and I probably have the most experience with it. There are reasonably good docs for that file format these days. But in general you have to be prepared to slog through the code a bit and are hopefully protected from making disastrous change by All right, things much clearer now, thanks a lot, guys! Will try that slogging around ASAP. :) -Yury ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: starmath, ObjectReplacements, export, word2003
On Wed, 2015-05-20 at 10:31 +, Yury wrote: Thank you for answering! Now, Caolán McNamara caolanm at redhat.com writes: Sometimes no one just knows off the top of their head where the various bits and pieces so someone has to invest time to have enough information to assist. It can help to pare down text to the absolute bare minimum to describe the problem. All right. But surely there is someone sort of in charge of the code in question? Or is there? For the .doc filters basically Miklos and I probably have the most experience with it. There are reasonably good docs for that file format these days. But in general you have to be prepared to slog through the code a bit and are hopefully protected from making disastrous change by our ever expanding suite of regression tests which often act as after-the-fact documentation as to what some mysterious piece of code does :-) If I want to know the call sequences around, I absolutely must use gdb? There is no secret documentation around or anything? Typically there aren't any extra docs outside of what comments are in-source or occasionally in module top-level README files and some overviews (https://wiki.documentfoundation.org/Development/Code_Overview) C. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice