Apache OpenOffice (AOO) Bugzilla – Issue 3403
Integration of Latex into OOo as formula editor possible?
Last modified: 2017-05-20 11:29:59 UTC
Just when you thought you had enough on your plates, as if M$ Word AND Corel WP support weren't enough, here's some loony asking for LaTeX support !!! We look like we are about to standardise on TeX for our technical documentation. Lyx as a front end is awfull, and I don't relish the thought of firing up emacs and manually embedding \documentclass and \name{yuck} etc. all over the place. I guess I'm just soft, but I like to see what I am producing, not compile it !!! Well, it's just an idea - oh, and of course I'd like it tomorrow please ;-)
Christian: What about "yesterday" ;-) Reassigned.
I'm in favour of this, but the most important aspect is to incorporate LaTeX's key strength: good looking equations. Would it be possible to make the equation editor use LaTeX as a back end to format its equations, so that they actually look good? (That would be a key benefit over Word for the whole technical community -- the ease of a word processor with the the output of a typesetter!) It would also seem sensible to use (or have an option to use) LaTeX-like notation in the equation editor. That would simplify import/export, and mean LaTeX users don't need to learn a new set of abbreviations, which largely synonyms (like %ALPHA vs \Alpha).
Reassigned to Bettina.
This would be great. I am sure that it would be well received by the scientific community. This is one area where Oo can really make the difference and gain wider user base.
Even a limited support, like an export filter to LaTex with a fixed style sheet would be a great first step.
Hello! it would be great if you could include the writer2latex export filter in the next release of OO : http://www.hj-gym.dk/~hj/writer2latex/ The efford is minimal, just add writer2latex.jar and TypeDetection.xcu and include some functions in xmerge.jar (already done with a xmergefix.jar). The manual fix now is a bit uncomfortable for the unexperienced users, better to integrate in the OO distribution. Also this add-on is still quite unknown. It even converts writer formulas to Latex formulas and optional also to Xhtml/MathML to be displayed in Mozilla, instead of ugly GIF raster images. In my Institute we have a MicrosoftSelect license, quite typical situation, so nobody sees a need at the moment to change to OpenOffice or StarOffice. With MS-Select which is anyway available, there is no cost argument for OO. Also PDF-Export is usually done with Adobe. So, OO would have to provide good extra features to be accepted here. I like the Draw component for schematic drawings more than Corel or Powerpoint. But the best argument would be the possibilty to export the document to LaTex. Everybody here has to write LaTex, to publish scientific papers or to write a PhD. But many people don't really like to write LaTex source code and the trial-and-error method of writing formulas. Long formulas are only understandable in graphical form and not in a long and ugly Latex source code. That's why people often have to compile/print out to see what they wrote. I like much more the method with the OpenOffice formula editor and have the graphical representation embedded in my text. Ok, Latex purists will always write source code and also Latex-Export has to be "beautified" before publication. Also the mathematical feature set of OO is not as huge as for LaTex, but sufficient for me at the moment. OO as a Latex front-end is really interesting and a big plus in our software equipment. The opposite direction Latex-to-Writer is handled here: http://www.cis.ohio-state.edu/~gurari/TeX4ht/mn3.html#QQ1-3-9 It's not a OO filter yet, so maybe to early for the next OO release. For OO it would be a great feature if it could just import the huge amount of existing Latex texts, papers, books etc. and switch from Latex to OO to continue writing. In my old University institute we even had a rule that all texts for educational or administrative use should be in LaTex. So, OpenOffice with the LaTex feature would have a good chance to become an institute-wide standard. As a back-end standard for OO math, LaTex is not a good choice, since MathML is better semantic-oriented and has the potential to be understood by mathematical software (CAS like Maple or Mathematica). Example of tight integration of a text processor and a mathematical software here: http://maxima.sourceforge.net/screenshots/maximatexmacs.png (just math to latex, for opposite direction, LaTex would be too hard to interpret) This could be a long-term super-feature of OO, similar to the "ScientificWord" software. A calculating text processor, great. Not only numerical calculation but truly analytical formula evaluation and calculus. I'm convinced that the Latex filter in short-term would give a certain boost for OO in the scientific community. Don't miss it. Good material for the OO marketing project. Frank
by the way, slightly off-topic, for MS-Word there is a commercial solution: http://www.word2tex.com/ We purchased it here, results are not bad. Of course, don't expect a 1:1 layout, but formulas and drawings are converted (MS vectorgraphic -> EPS). Some colleagues like their "MathType". MS Word includes a light-version of this software. The full version also knows Latex (just formula, not the whole document).
The free TexPoint for PowerPoint is a very cool idea: http://raw.cs.berkeley.edu/texpoint/ It allows writing formulas directly as LaTex source code, then rendered by a true LaTex machine (MikTeX). The result is stored back as object in both source and hires-bitmap format, so you can edit later. The math-oriented presentations will look really professional then. The builtin Microsoft and OpenOffice formula systems on the other side are really a nightmare if you want to do a bit more than school mathematics. TexPoint is realized with VisualBasic macros, so I think it will not be too difficult to port it to OpenOffice. I know that this can't be the ultimate math solution. The requirement of a separate LaTex installation is not reasonable for most of the OpenOffice users. Therefore, also the builtin math solution should be maintained. Furthermore, I think MathML is a more future-oriented data format than Latex. But at the moment, the MathML engines are far behind the quality of LaTeX. So for now, TexPoint is a good temporary solution. Please don't mix this idea with Issue 24813 "Latex export filter" (this works already with OO). These are two very different approaches. Both make sense. With the export filter you leave OO to another word processing system. With TexPoint you stay and only delegate the math part to LaTex. Independent of this macro-solution it would also be nice, if the OO formula input language would accept the Latex syntax as alternative.
Adding myself in CC list
Since MathML is improving to become a hot topic and OO is moving towards XML I ask myself if this wouldn`t be the right way to resolve this problem. A native MathML reendering would allow for LaTeX quality publishing. OO should perform as wel as SciWriter, Publicon and similar programs for technical content.
OO is using MathML already for formula storage. The rendering however is still far behind LaTex. Until then, support at least the Latex document format for import/export. Due to the weak math support of OO, I have to use another editor: http://www.toolscenter.org/
I think Issue 48699 should be marked as a duplicate of this :-)
*** Issue 48699 has been marked as a duplicate of this issue. ***
*** Issue 51877 has been marked as a duplicate of this issue. ***
Adding LaTeX support to OOo is a nice idea. How can we add that java files?
I have no knowedge about OOo build system... I extracted some data about Pocketword: 1) Copy writer2latex.jar writer2latex.xml <ooo src>filter\source\jars 2) Copy w2l_filters.xcu <ooo src>\filter\source\config\fragments\filters\ w2l_types.xcu <ooo src>\filter\source\config\fragments\types\ What's next? I will check it...
dv, is -> Can you help us to integrate into the installer?
dv, is -> Can you help us to integrate Latex support into the installer?
kami_ -> If you want ot integrate the files into the installation set, you have to make the necessary definition in cvs module "scp2". First I need to know, which are the required changes. Are there only additional files, that need to be installed? This would be very easy. Which files have to be installed in which directories? Can this files be found in the solver during packing process? Shall this be an optional module, that can be deselected during the custom installation? In this case we would require a module name and module description, that need to be translated.
is -> The information is about installation: Installation for OOo 1.9.x Note: If you have made a -net (multiuser) installation of OOo, you will normally need to log in as root/administrator to install Writer2LaTeX. Before you start, you need an installation of OOo where You have set up OOo to use Java. If you didn't do that during installation, you can configure java under Tools – Options. Of course this requires that you have installed Java on your system. You must have the Mobile Device Filters installed. If you didn't install these during installation (it's not part of a standard installation!), you can run OOo setup, choose Modify and add the filters. This will install a framework for Java based filters in OOo (known as xmerge), which is also used by Writer2LaTeX (despite the fact that it has nothing to do with mobile devices). Then the installation proceeds as follows: 1.Copy writer2latex.jar and writer2latex.xml into the classes directory <OOo install>/program/classes/ 2.Make sure that no OOo processes are running: Close all document windows and (under MS Windows) the Quick Starter. 3.From a command shell, navigate to the directory <OOo install>/program 4.and type unopkg gui 5.Select OpenOffice.org packages and select w2lfilters20.zip using the Browse button. 6.Now restart OOo. If you only want to install for a single user, select My packages instead – this is also possible from inside OOo, using the Tools – Packages menu. I we do not want to build during build time (source included in 0.4) we should copy four file - check my last post. I think we need one more subcomponent in the installer. It may apper under Mobile Device Filters because the installed tool depend it's Mobile Device Filters' envrioment. We may rename Mobile Device Filters component to show it current contetnt... This time we may set it as defaultly enabled component. The new group may be called LaTeX, BibTeX, xhtml Filters, of course it need a good description to.
kami_ : I have some more questions concerning your mail. Your item 1 to 6 are only relevant, if there is already an installed OpenOffice.org. (By the way: With the native installer there is no more "-net" installation.) But I think we are talking about the addition of your files to the OpenOffice.org installation set. If I understand you correct, we have to install 4 files: 1) Copy writer2latex.jar writer2latex.xml <ooo src>filter\source\jars 2) Copy w2l_filters.xcu <ooo src>\filter\source\config\fragments\filters\ w2l_types.xcu <ooo src>\filter\source\config\fragments\types\ Is it sufficient to install these four files? unopkg cannot be called during the installation process. The four files will be added to a submodule of "Mobile Device Filters" (and this module has to be renamed). From which cvs module are this files delivered to the solver? And for which platforms?
Is it sufficient to install these four files? AFAIK, yes! From which cvs module are this files delivered to the solver? I don't know And for which platforms? Every platform where mobile and latex filters can work. (Remmarks: Source is available, and packed into the donwloadable package -- so it may available on all platforms) Can someone help us in integration?
If you are not sure, whether it is sufficient to add these four files, you should first of all create an installation set, that includes this files at the root module. If it works fine, we can start to create the new module. Please add into scp2/source/ooo/file_ooo.scp the definitions for the four files. File gid_File_Jar_Writer2Latex TXT_FILE_BODY; Name = "writer2latex.jar"; Dir = gid_Dir_Classes; Styles = (PACKED); End File gid_File_Xml_Writer2Latex TXT_FILE_BODY; Name = "writer2latex.xml"; Dir = gid_Dir_Classes; Styles = (PACKED); End You also have to make such definitions for "w2l_filters.xcu" and "w2l_types.xcu" (I do not know their correct place after the installation). If required you have to define the directories for this files in "directory_ooo.scp." You have to do so, if this directories do not exist yet. Then you have to build scp2 and to deliver it. After this, the OpenOffice.org has the four new files at its root module. Therefore please do not commit this changes. If everything works fine, we can start to create the new module.
Hello, I would like to know if this feature will allow to directly write LaTeX equations in OpenOffice Math (instead of the OOo specific language). Because the OpenOffice Math language is not very easy to understand for people using LaTeX and there is a problem with i18n. See my problem with greek capital letters in a french environment http://qa.openoffice.org/issues/show_bug.cgi?id=29041 Regards
is: I will play with it. Can I wrote to you directly if I have a question about installation scripts?
kami_: yes, of course you can contact me directly. Good luck ;-)
I have added everything what we need to i24813. Can you someone check it, and put in one of CWS? Or try it in build enviroment? Added pjanik - he may interested in building
I think you should have a look at this too http://qa.openoffice.org/issues/show_bug.cgi?id=58187 It's about a PSTricks support in OpenOffice.org As PSTricks is very near from the LaTeX world I think it is important to talk about it here.
Created attachment 35669 [details] Illustration of the 'fi' ligature in TeX output
Most of this discussion is focused around the benefits of having a TeX output for math. And while this is perhaps the biggest place that we'd see a benefit, it's by no means the only. This is also in part a response to comments that OO.o should use MathML to hold mathmatical formula, because even if OO.o's *math* rendering was equal to TeX's, I would still use LaTeX for any substantial benefits due to other rendering quality issues. I'd just like to point out some of these benefits. (BTW, I'll usually just say TeX. The same applies to LaTeX.) First, I uploaded an illustration of ligatures as an attachment. This was constructed with a TeX file containing "fi {f}{i} \end". You'll notice in the sefthand fi the "branch" of the f is extended to above the following letter, where it takes the place of the dot over the i. The braces on the right fi force TeX to break up the ligature. The letter sequence "ff" also causes a ligature. In that case, the lefthand f has the same shape as it does in fi, and the branch intersects the righthand f. ("fj" causes something essentially the same as the "fi".) Compare both of the examples from TeX with what OO.o or Word gives you. Second, the spacing in TeX output is, I think, noticeably better than a traditional word processor. In a word processor, the MO for where to break a line is "when I fill up the current line, I will wrap to the next one." But it's possible to do better, and TeX does. The problem is that breaking one line just when it fills up might force a latter line break to be much worse. When TeX is laying out the words, it tests putting breaks between lines in several different places. For each option it assigns a numerical "badness" value that rates the quality of how it thinks it will look, then chooses the best option. The result is a more balanced layout. TeX does the same thing with page breaks. I'm sure I could come up with a few more examples if I did some investigation, but I just wanted to illustrate the typesetting advantages of TeX beyond just math layout. I hope that this provides a reason to support TeX rather than just say "MathML will take care of everything."
I agree that LaTeX produces much better line breaks. However, for narrow columns this may be balanced by Word's (and OO.o's?) ability to do automatic kerning between letters as well as between words. My main reason in 2002 for suggesting using LaTeX only for formualae is mainly speed and software bloat. The reason I eventually stopped using OO.o is that it is so slow compared to M$ Office. I am afraid that (a) WYSIWYG good line breaks would add CPU load, and more importantly (b) a full LaTeX implementation would add to memory (and hence disk) load. Perhaps OO.o could be split into "OO.o lite" and "full OO.o", with full LaTeX support in the full version (if someone has the time to implement it).
Removed self
As now Writer2Latex has been integrated to OOo: can we close this issue? Is that enough LaTeX support?
If you decide to close it, you should first change the summary content from "How about adding LaTeX support !!!" to "How about adding a LaTeX export filter !!!" because what is done is only about LaTeX export... Importing LaTeX files is still not possible Using the LaTeX commands for equations (in OpenOffice Math) is still not possible Moreover the problem of "good looking" equation is still not solved. Using PSTricks files is still not possible too
It is hard to follow this issue as it has drifted into several directions. Let me try to summarize: We now have a LATEX export filter We don't have LATEX import and let me say: we will never have one as the document concepts of both applications are too different to achieve a good importing quality and the effort would be incredibly high. We also don't have LATEX as formula editor - but that's something that looks doable to me if some preconditions were fulfilled. OOo has an interface that allows to plugin external files and activate external editors to edit them, just like OLE on Windows. To make use of this interface the external application must be able to provide a rendered image of the edited document that OOo can display or print. For quality reasons this should be a "vector style" graphics but unfortunately we still don't have SVG importing capabilities so ATM we have to use a pixel image. Using high resolutions and good compression should at least enable us to provide sufficient quality for a start. If anybody is interested to work with us to create a wrapper component that bridges to an installed LATEX application implementing the mentioned embedding interface we would be glad to support that. The wrapper component can be implemented in either C++ oder Java. Besides that I'm wondering if anything else is left in this issue. If not we could change the summary to "Embed LATEX as an external formula editor". Opinions, anyone?
After 2 months without an echoe I boldly changed the summary to what I consider the remaining work that could be done.
Meanwhile I think we should perhaps close this issue and open another one adressing the formula editor topic. It's totally unclear to me whether the votes assigned to this issue really target this topic or if they have been given to get LATEX export what basically is done now. Opinions, anyone?
Hi Mathias, I have changed the current owner to your owner. Please take the ownership of these enhancements.
Hello, indeed, it is not clear what points people are voting for in this issue. My opinion : - I would like to be able to write mathematical formulas with the Latex syntax (I just care about the syntax, not about a special rendering or a special export) - I would like to be able to write them more quickly, using the latex way (like : $\alpha + \beta = \gamma$) (I don't want to click and wait for the bottom window to open when I just need to write 3 symbols)
I'd like to second that last comment. It would be very useful to be able to create formulas using LaTeX syntax.
Reset assigne to the default "issues@openoffice.apache.org".