Issue 24813 - include tex-filter in OOo2.0
Summary: include tex-filter in OOo2.0
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 1.1
Hardware: All All
: P3 Trivial with 11 votes (vote)
Target Milestone: ---
Assignee: jack.warchold
QA Contact: issues@sw
: 53920 62280 (view as issue list)
Depends on: 3403 28561
  Show dependency tree
Reported: 2004-01-25 19:32 UTC by frank7
Modified: 2013-08-07 14:42 UTC (History)
18 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---

Writer sample document for export (43.23 KB, application/octet-stream)
2004-02-13 13:04 UTC, thomas.lange
no flags Details
Resulting postscript file after export and conversion from dvi (93.07 KB, application/octet-stream)
2004-02-13 13:06 UTC, thomas.lange
no flags Details
New writer2latex.jar (256.54 KB, application/octet-stream)
2004-12-08 13:36 UTC, henrikjust
no flags Details
Patched xmergefix.jar (168.38 KB, application/octet-stream)
2004-12-08 13:36 UTC, henrikjust
no flags Details
example doc (35.43 KB, application/x-compressed)
2004-12-13 17:40 UTC, jack.warchold
no flags Details
New writer2latex.jar which does not discard formulas (257.11 KB, application/octet-stream)
2004-12-15 09:37 UTC, henrikjust
no flags Details
Configuration: Types (1.26 KB, text/xml)
2005-11-23 13:57 UTC, henrikjust
no flags Details
Configuration: Filters (1.96 KB, text/xml)
2005-11-23 13:57 UTC, henrikjust
no flags Details
W2L integration info Javafilter installation file (1.17 KB, patch)
2005-11-28 11:51 UTC, kami911
no flags Details | Diff
W2L integration into Javafilter module (1.06 KB, patch)
2005-11-28 11:52 UTC, kami911
no flags Details | Diff
Writer2LaTeX version 0.4.1a - required files (301.41 KB, application/x-compressed)
2005-11-28 11:57 UTC, kami911
no flags Details
javafilter module ulf patch (712 bytes, patch)
2005-11-29 13:34 UTC, kami911
no flags Details | Diff
Latex filter basic integration - not tested... (304.29 KB, application/x-compressed)
2006-01-16 20:57 UTC, kami911
no flags Details
Latex buildsystem integration patch+source (1.02 MB, application/x-compressed)
2006-01-20 19:03 UTC, kami911
no flags Details
Sources to be added to's XMerge module. (191.82 KB, application/x-compressed)
2006-02-13 20:01 UTC, svante.schubert
no flags Details
UNO package to test the LaTeX filters (incomplete, as the JAR have to be copied manually to program/classes) (192.71 KB, application/x-compressed)
2006-02-13 20:02 UTC, svante.schubert
no flags Details
simple testcase (40.92 KB, application/x-compressed)
2006-07-11 12:57 UTC, jack.warchold
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description frank7 2004-01-25 19:32:39 UTC
Is it possible to include the LaTex export filter from Henrik Just in the next
release of OO ?

It is not a programming effort, just inclusion of some jar files. In Bug 3403
the Latex support is discussed:

I know that further LaTex support needs more development, but at least for the
export filter I don't see any problem to quickly include it. I suggest to check
this possibility before releasing the next version. This would be a wonderful
additional feature compared to Microsoft Word. Remember that also the PDF-export
was often mentioned as an argument of OO's superiority over MS. Good publicity.
Comment 1 pavel 2004-01-26 17:03:07 UTC
We can not include it right now. We close to the release and it is not possible
to integrate new functionality without further testing. Retarget to 2.0.
Comment 2 frank7 2004-01-26 21:24:06 UTC
Ok, if 1.1.1 is already close, I understand.

So what about 1.1.2 ?
The patch is working fine on my OO 1.1 (both Lin+Win). It's just adding files to
an existing distribution, I didn't have to change any source code or recompile.
Furthermore, this is just an export filter (a very important one) that does not
collide with the other code of OO. Side-effects ? Guess not. When I see the
ambitious goals for 2.0 it looks like it could take very long time to realize
them all. Much longer than from 1.1.0 to 1.1.1. Why should the Latex export
filter wait so long? It's working already.

This filter is a critical factor for success in the scientific community. Many
people there have to deliver Latex code for their publications. Whis this, you
have a good argument to start your document in OpenOffice (instead of pure Latex
plaintext or Winword/Mathtype). As many of them don't like to hack the Latex
source code, OO has a good chance to be the 1st choice.

Comment 3 h.ilter 2004-01-27 15:21:54 UTC

*** This issue has been marked as a duplicate of 3404 ***
Comment 4 frank7 2004-01-28 08:14:58 UTC
It's not a duplicate of Bug 3404 (flat XML) ! This is a Latex export filter
(including XHMTL+MathML 2.0 support). Also different from a complete Latex
support with an input filter (not integrated to OO yet).

The big difference is complexity. This patch is ready and functional. The import
filter on contrary not.

If you're unhappy to release it now, Ok. Just I think that 2.0 is too late,
because it's working already. The time between 1.1.1 and 1.1.2 should be enough
for a test, or not? I can offer my support for testing (using it already on my
productive system).
Comment 5 h.ilter 2004-01-28 16:47:21 UTC
HI->AMA: Please take a look.
Comment 6 andreas.martens 2004-01-30 15:02:01 UTC
AMA->TL: Please, have a look.
Comment 7 thomas.lange 2004-02-13 13:04:52 UTC
Created attachment 13106 [details]
Writer sample document for export
Comment 8 thomas.lange 2004-02-13 13:06:19 UTC
Created attachment 13108 [details]
Resulting postscript file after export and conversion from dvi
Comment 9 thomas.lange 2004-02-13 13:29:29 UTC
I checked the LaTeX export from within the Writer by using the sample document
provided as attachement. The result can be seen in the attached postscript file.

Im quite impressed it looks great to me! ^__^

There are some minor issues like different fontsize, indention of the first line
in a formula or text attributes like bold or italic being ignored.
But overall it is a great thing and I would like to have it added to OOo.
However there is one thing that needs to fixed:
If you export a document to the file "abc.tex" for example there will be a
temporary file (that is also not removed later) created with the name of
"abc-config.xml". That must not be done.
No file should ever be created in the office installation directory, usually the
permissions for the user prohibit this, e.g. in a multi-user installation.
Only the "user" sub-tree may be used for this, any other directory is likely to
not work. 
But since it seems to be an intermediate file that no one needs after the
successful export I think the regular temp directory of the system should be
used for this.

If that one gets fixed we can add the filter to the OOo suite.

When it is done just pass this issue back to me and I will have a look at it
again and after that I can pass it on to IS for integration.

Nice work! ^^
Comment 10 frank7 2004-02-13 18:03:41 UTC
Yes, it's very impressive to see the beautiful LaTeX formulas as an output of
OpenOffice ! I'm also happy to see that I'm not the only one who likes this
feature to be integrated. Thanks Henrik for this super-feature ! And don't
forget that the same filter is also able to export XHTML+MathML, so that Mozilla
can display a formula as a formula and not as an ugly GIF.

About the "minor issues" :

I can't reproduce that this temp-file is located in my installation/program
directory with writer2latex 0.3.2beta & OO 1.1.0 on WinXP. This *config.xml is
placed in the directory where I save my *.tex file. That's not necessarily bad
as it contains some configuration info. Meta-Information could be important
because TEX is not XML-based. But I can't judge about this.

Layout bugs are not too important for me, because I'm usually changing the
default *.sty style to the specific paper-style of the magazine where my
publication should go. When editing the source, it's easy with regex
"search&replace" to change those format instructions, too.

The layout issues will probably never be solved, because LaTex is so much
different from Word-Processor formats like MS-Word or OpenOffice. For many
features I don't see an equivalent. Also, the rendering of Latex-texts depends
on the Latex-distribution, the packages and styles you want to use. You will
never get a 1:1 result, but this is also not the point. Mostly, the LaTex-output
should be "beautified" and adapted to some specific publication styles. Like the
IEEE-magazines that provide a predefined Latex-style. So, anyway, a typical
Latex-user would have to edit something in the final text source code. I know,
true LaTex-gurus will always write the source code directly. But I prefer an
Office application like OO-Writer or MS-Word. Later I can always hack the source
when necessary. The lack of equation numbering and bibtex-integration is still
an issue, but the existing OO Latex-export is already a very good start.
Comment 11 henrikjust 2004-02-16 14:48:59 UTC
Wow, I wasn't really expecting Writer2LaTeX to be included in OOo, but I would
certainly appreciate if it happens.

The issues with formatting of text in formulas should be easy to fix (ie. line
starting with text should be left justified, current setting of bold, italic,
font should be applied to text).
Some details cannot be supported because they are not available in flat xml
(which omits settings.xml for formulas).

The problem with "abc-config.xml" is a known problem under unix. It's a
configuration file (not temporary) and is supposed to end up in the same
directory as the document. This works under mswindows, but under unix it depends
 on how you start OOo. I will fix that.

As I see it, there are three other issues that has to be considered before
Writer2LaTeX can be included in OOo:

1. The xmerge framework needs some changes and bugfixes. This affects the mobile
device filters. I will create a patch and attach it to a separate issue.

2. LaTeX documents generated by Writer2LaTeX currently depends on a special
style file "writer.sty". Either this has to be communicated to the user somehow,
or Writer2LaTeX should be changed so that it's not needed (necessary definitions
could be indluded in the preamble).

3. Writer2LaTeX allows a rather complex configuration, which doesn't have an ui
yet. It has to be determined how to handle that.

frank7, Writer2LaTeX does support BibTeX, but you will have to turn it on in the
<option name="use_bibtex" value="true" />
<option name="bibtex_style" value="any BibTeX style" />
There is also a BibTeX import filter available (created by Daniel Carrera), see
This will import BibTeX data into OOo's bibliography database.
Comment 12 frank7 2004-04-15 21:29:34 UTC
Is the target milstone 1.1.2 still realistic ?
The latest version of the Latex export filter 0.3.3a is working fine on my
Windows XP machine with OO 1.1.1. Our network administrators want to install
MathType for MS Word. This is even more propriate, you can't edit the formulas
with a normal Word-Version any more (without MathType installed). If the Sun
company would invest some effort into a proper math support of OO, they would
have the  great oppertunity to sell it within StarOffice. LaTex always belongs
to a good math support. When you look at MS-Word, there was never a significant
progress for the formula editor in so many years. OO/StarOffice can make it
better. You have the chance to win a large user-base in the academic community.
Our institutions don't hesitate to pay for good software. At the moment, most of
the people I know are not yet convinced because they don't see any advantage.
(PDF is done with Adobe). The only strategic advantage I see at the moment is
this LaTex support.

Comment 13 Martin Hollmichel 2004-04-23 17:31:33 UTC
no, 1.1.2 does not sound realistic for me, I set target to 1.1.3.

mh->tl: shouldn't we try to integrate in 680 first (and ASAP) so that we're in
time for 1.1.3 release ?

what is the current status and latest release ?
Comment 14 thomas.lange 2004-04-26 09:37:58 UTC
TL->MH: AFAIK the state is still the same as I mentioned above.
Comment 15 frank7 2004-04-26 18:21:32 UTC
Maybe the most interesting question: are there any side effects with other parts
of OpenOffice? In my test I didn't notice any. The patch looks uncritical:
- adding writer2latex.jar to the classes directory
- register the filter
- replace xmerge.jar
  I made a diff between the xmerge.jar and xmergefix.jar archives:
  there are only functions (java/class) added, not modified

So, when not executing the filter, there is no change in the behavior of OO
(except in the list of filters). Correct? The status at the moment is already
quite impressive. Why hesitate and not just include the current snapshot of
writer2latex? A help file could explain the tricks with writer.sty,
configuration and temporary files. The default configuration is already good to
transfer text and formulas to Latex. Is the problem with the config file
location in Unix solved? If not, can we leave it simply static? I had nice
results (in Windoze) without touching it.
Comment 16 henrikjust 2004-04-30 11:05:13 UTC
I have created issue 28561 with a few simple bugfixes for the xmerge framework 
that are needed for this.

Also, I will have a version of Writer2LaTeX ready soon that does not require 
the additional style file (writer.sty) and does not create the *-config.xml 

This *could* be a possible solution for 1.1.3.
Comment 17 henrikjust 2004-07-02 13:29:28 UTC

Issue 28561 is not accepted yet, but could you anyway have a look at this again?

There's a new version of Writer2LaTeX (0.3.3d) available at

This version doesn't generate the *-config.xml file.
Also it does not per default require writer.sty.
Installation note: It is not *required* to put writer2latex.xml in the classes

* Would it be possible to include this in OOo 2.0? (or 1.1.x?)
* If yes, how can it be included? Hosting at seems
to be the simplest solution to me?
* Is there any interest to include the XHTML + MathML export too?
(cf. Issue 24256 "Exporting to HTML should turn Formulae into MathML not GIFs")

Comment 18 frank7 2004-07-02 21:40:59 UTC
In our department, almost everybody is publishing journal and conference
articles in LaTex. Last time I tried to create something in MS Office XP
(comfortable!) with the intention to convert it to Latex later. That was an
awful experience. I wasn't able to export the Powerpoint figures to EPS. The
postscript printer drivers (generic + wmf2eps /eps-type) sometimes made just the
upper half of the page. All EPS had a wrong bounding box. Sometimes the bbox
wasn't even correctable by ghostscript (re-calculate bbox). Then I used
OpenOffice to open the Powerpoint graphics, marked the figure and exported to
EPS. Perfect! Correct bounding box! 

For the bibliography, MS Word had nothing to offer. OpenOffice can import
BibTex-databases to its own BibDB (with the python program from Daniel Carrera)
and export to BibTex (using writer2latex). That's fine. Just the bibliography
style in OO looks awful, not acceptable for IEEE publications. But anyway the
final paper should be LaTex.

In my opinion, OpenOffice has a good potential as a LaTex front-end for people
who don't like to write the LaTex-sourcecode directly. Especially the OO Draw
tool is fine for creating LaTex EPS figures (if it's not a Matlab curve). Please
think about it for the OO version 2.0. Some things could be better, like the
bibliography style, formula editor and the Latex import. For the next
1.1.x-releases, the writer2latex-filter would be a good start, because it's
already very useful in it's current state.

XHTML+MathML export is a very useful feature for good-looking formulas. Pages
with GIF-Math-formulas are really awful. Please don't do it like Microsoft,
because it's our goal to create a better alternative to MS-Office. The
MathML-support of writer2latex is already quite impressive. Of course only with
Mozilla and not with MS-Internet-Explorer (best viewed with ... :-)

You could make all the Latex- and MathML-support an optional field in the
installation dialog, like the Palm filters. But better do it now. I see already
a tendency for people to use Microsoft Word instead of Latex in publications.

The development version 0.3.3d should be checked for bugs. I tried in different
combinations of Java VM versions (1.4.2_02-1.5.0beta) and writer2latex
(0.3.2-0.3.3d) versions, all with OO 1.1.2 on WinXP. Quite often I got Java
exceptions, like this:
There was an error in the conversion
        at java.util.Hashtable.put(Unknown Source)
        at writer2latex.StyleMap.put( ....
or exeptions in SAX. Now the sample documents work, but not my big 3 MB report
(converted from MS-Word to SXW). I don't now what happened, maybe my Java is a
bit messed up.
Comment 19 frank7 2004-07-03 17:30:57 UTC

another fan-page for the writer2latex XHTML export capabilities
Comment 20 thomas.lange 2004-07-05 09:08:32 UTC
TL->HJ: Sure I will take a look at it. But due to internal schedules it will
probably not be within the next 4-6 weeks.
Comment 21 thomas.lange 2004-08-03 08:45:19 UTC
Comment 22 pavel 2004-08-17 12:03:02 UTC
Henrik Just is listed at

so no legal problems with inclusion.
Comment 23 andreas.martens 2004-08-20 13:04:00 UTC
I don't think that's possible to keep the target OOo1.1.3, I change this to
Comment 24 thomas.lange 2004-09-28 13:09:06 UTC
Target set to OOo 2.0 as discussed with AMA, since the decision about
integration is not yet made and thus it is too late for 1.1.4.
Comment 25 thomas.lange 2004-10-05 14:06:35 UTC
TL->SBA: LHO has asked for more extensive tests with our bug documents
containing master / doctor theses  or  student work texts  to check if the
resulting LaTeX documents look as would be expected.
Please take over. Thanks!
Comment 26 jack.warchold 2004-10-18 16:34:12 UTC
i'll take over for intensive testing

reassigned to jw
Comment 27 jack.warchold 2004-11-05 14:21:43 UTC
not able to make further test because of an incompatibility of the 
current src680 build and the tool. this incompatibility occurs in any 
build later than scr680_m49.
result -> loop while exporting
if we found this error here i will go on with the tests
Comment 28 thomas.lange 2004-11-16 10:47:31 UTC
Currently (SRC680 m58 and higher) the filter is not working and needs to be fixed.

A related issued might be #i33702#.

TL->Henrik: Please take over. Thanks!
Comment 29 henrikjust 2004-12-08 13:27:01 UTC
The filter now works again (tested with 680 m62), after applying the patch in 
issue 33702 to my version of xmerge.jar.

For testing purposes, I will attach two files to this issue:

New writer2latex.jar
New xmergefix.jar (with patches from issues 28561 and 33702)

(Both files+source will be available from 
next week).
Comment 30 henrikjust 2004-12-08 13:36:13 UTC
Created attachment 20258 [details]
New writer2latex.jar
Comment 31 henrikjust 2004-12-08 13:36:59 UTC
Created attachment 20259 [details]
Patched xmergefix.jar
Comment 32 henrikjust 2004-12-08 13:38:47 UTC
Reassign to Thomas Lange
Comment 33 thomas.lange 2004-12-08 13:43:47 UTC
TL->JW: Please resume testing with the new version. Thanks!
Comment 34 jack.warchold 2004-12-13 17:39:06 UTC
hello thomas, i tested the tool today, now it works, wich just means 
it does not loop or crash. but formulars will not be exported in this 
i will attach an odt file wich i created as examle, wich contains a 
smal formular, a text and a table. the text and the table are in the 
result .tex file the formular is not.
Comment 35 jack.warchold 2004-12-13 17:40:27 UTC
Created attachment 20485 [details]
example doc
Comment 36 thomas.lange 2004-12-14 07:52:12 UTC
TL->Henrik: Can you have a look please and then assign it back to JW?
Comment 37 henrikjust 2004-12-15 09:37:28 UTC
Created attachment 20530 [details]
New writer2latex.jar which does not discard formulas
Comment 38 henrikjust 2004-12-15 09:49:32 UTC
Oops, sorry about that. A newly introduced bug in Writer2LaTeX discarded all 
formulas in flat xml.
This is fixed in the attached writer2latex.jar.


In 680 m62 I get this error message when exporting a document with formulas:
"Error saving the document <name>: Write Error. The file could not be written."

Fortunately this is harmless, the file *does* get written
The same problem occurs with export to pdf, and is described in issue 38881 - 
so it has nothing to do with xmerge or writer2latex.

Also, because of a problem with the hack from issue 33702, the filter crashes 
on any document containing objects (except formulas, which are OK).
Comment 39 henrikjust 2004-12-15 09:50:47 UTC
Reassigned to jw
Comment 40 jack.warchold 2005-01-21 13:13:22 UTC
approved for integration. 
this tool will be integrated in OOo2 and SO8.
we first have to find a cws to add this tool to.
i added ic for this issue because before integration we have to 
patch the xmerge.jar of SO/OOo
so there will be a followup task for the integration
set to fixed.
Comment 41 jack.warchold 2005-01-21 13:21:36 UTC
set to verified
Comment 42 jack.warchold 2005-02-02 13:26:43 UTC
reopend to include in Cws Latex
Comment 43 jack.warchold 2005-02-02 14:13:54 UTC
reassigned to the developer.
added issue to cws
integration task
changed summery to:  include tex-filter in OOo2.0
reassign to me if the cws is ready
Comment 44 stx123 2005-02-18 16:44:54 UTC
Hi Henrik, hi Jack,
it seems you are still in the christmas break :-)
What is left to see the filter integrated?
Thanks, Stefan
Comment 45 jack.warchold 2005-02-23 11:23:06 UTC
hello stefan,
henrik just had no access to the cvs server and was not in any project yet, this has 
been fixed, we needed to know to wich projects he need access, this is known 
now, a project sw/writer2latex has been added and henrik got its access to our 
servers, so in think he will start to implement his tool soon
Comment 46 joergwartenberg 2005-04-01 23:02:36 UTC
Are there any technical problems including the filter attached to this issue? Is
all information for the QA process avaiable? Is it still possible to integrate
it into 2.0.0 ?
Comment 47 pavel 2005-05-19 07:13:04 UTC
retarget. We can't make it into 2.0.1. Too many lost time.

Please take care about this for 2.0.1.
Comment 48 frank7 2005-07-02 10:38:05 UTC
What's the problem ? In my OO 1.9.109 it's running fine, just the 2 writer2latex
files + adding the export filter packages. xmerge.jar does not have to be
exchanged any more.

Latex-export and Bibtex-export works fine. Very useful for writing Phd and
Master thesis.

So, why hesitate? You're just losing a good argument what OO can do that MS-Word
can't do.
Comment 49 thomas.lange 2005-07-04 09:27:41 UTC
AFAIK Henrik who is taking care of the integration currently has not time
available. And since he is a real free-time-contributor and gets not üaid for it
(unlike most other here who make their living by working on OOo/SO) it is the
natural thing to put work and effort in such thing only when one has the spare
time for it.

I for my part am glad that he actually had agreed to work on this since
otherwise probably no one else would have time for this.

So please, unless you yourself are willing to do this on your own don't urge
other people that only do these things in their spare time because of interest
and hopefully some fun also.
Comment 50 frank7 2005-07-04 09:52:37 UTC
I don't understand your problem. The patch is working fine.
What else has to be done except copying the 4 files to the distribution?

As I'm not authorized to modify files, I could at least offer testing it under
Windows and Linux (which I partly did already).

Comment 51 thomas.lange 2005-07-04 10:12:09 UTC
I must admit I'm not completely sure also.
But I think probably some changes in projects like instset_native or maybe even
setup are required to do all the missing things that are described in the manual
of the download version.

As far as I understood currently basically the problem with the jar file was fixed.
Comment 52 frank888 2005-07-04 13:57:31 UTC
I "patched" the recent OO 1.9.113. The thesis of my student looks much better in
the Tex-ified version of the OO document, especially the formulas.

In fact it's not even real patching, just copying the
writer2latex.jar/writer2latex.xml to the programm/classes directory and adding
the export filters in the package manager. Effort is < 10 minutes. For adding
these 3 or 4 files to the 2.0 distribution package, the effort shouldn't be much
higher. Of course we could discuss now until 2006 if and how we could add Tex to
OO, but why not just doing it? I'm not authorized to change the files, but for
the right person (who?) this should be an easy task.

Yes, you're right. For the 0.4 final release of writer2latex the xmerge
framework does not have to be upgraded any more. The builtin xmerge.jar does the

Don't care too much about all the other options and configurations of
writer2latex. The default is already a good start. Using the writer2latex.jar in
command line mode, you need more setup things from the manual. But as an OO
export filter no further configuration is necessary to get a nice Latex export
(incl. Formulas and Tables!)
Comment 53 joergwartenberg 2005-07-04 18:23:41 UTC
Hi Frank,

if you know what is to do. Why you don't fill out the JCA form ( ) to get the write access to
this CWS(CVS) and submit the code by yourself? As you said, it's not much work
to do there.

Regards Jörg

Comment 54 frank7 2005-07-04 23:23:07 UTC
What programming? I guess the code (ver 0.4 final) is ready.
Henrik made a really fine addition to OO.
I'm not experienced enough to play with the CWS/CVS OO packages.
This would be too chaotic. It's more a management decision to include it or not.
(marketing OO 2.0 not as a MS-Office clone but a suite with
additional useful features, PDF is a good example, Latex another one)
Comment 55 kami911 2005-07-25 20:20:02 UTC
I downloaded this export filter and installed it. During the testing process I
did not find any problem. It would be nice to see in 2.0... I would like to do
something for it. Can someone serve me an example, for examle same registered
filter in ooo? What about to put this filter to mobile section of installer
(because of dependency). Coping three file and register them not seems to big
work and big change in installer. I would like to help to do that 10 minutes work...

Comment 56 jameswim 2005-08-27 04:48:28 UTC
As a non-expert user, may I add my support to Frank's plea for the urgency of
adding an export filter? I am about to start writing a short philosophical
monograph, and am wondering whether to use TeX to make it more publishable. But
I'm not attracted to using a text-markup interface like Lyx, having got used to
word processing. I  want to revise using pages that are near-proofs, before
shipping the MS to publishers in the form they can best use.  So I agree with
Frank that having a LaTeX export filter could be a strategic issue for the use
of OO in the academic community. It's disappointing that although Henrik has
apparently fixed the technical issues (thanks from all potential users), the
inclusion of the filter in an update continues to slip, and is apparently not
even planned for the 2.0 release. 

The export filter should be conceptually divorced from the idea of a TeX import
filter, which looks to me like a mistake, and more generally of TeX emulation.
TeX is by design a comprehensive typographical engine, intended to work with
markup tags. Adapting a WYSIWYG word processor like OO Writer to do everything
TeX can do is probably impossible and anyway pointless. Doing professional-level
typography in a word processor should be avoided; it's like using the
calculation function in tables within Word instead of a proper spreadsheet. A
full TeX emulation would require something as elaborate and unhandy as Quark
Express, which nobody (but nobody) uses for creating text. (There may of course
be a case for restricted import, say of LaTeX equations.)       
Comment 57 lohmaier 2005-08-31 00:09:21 UTC
*** Issue 53920 has been marked as a duplicate of this issue. ***
Comment 58 Martin Hollmichel 2005-11-16 14:39:30 UTC
as far as I understand most of the work already have been done in child
workspace latex. what's the latest status on this ?
Comment 59 kami911 2005-11-22 01:41:46 UTC
Should we do anything more? or just add as scp2 module?
Comment 60 henrikjust 2005-11-23 13:57:25 UTC
Created attachment 31733 [details]
Configuration: Types
Comment 61 henrikjust 2005-11-23 13:57:54 UTC
Created attachment 31734 [details]
Configuration: Filters
Comment 62 henrikjust 2005-11-23 14:07:02 UTC
It's actually ready to be included, what's missing for integration is to:
include it in the build system (the build file is sw/writer2latex/build.xml)
include it in the installation. This simply means adding writer2latex.jar to 
program/classes and including the two attached configuration snippets.

If anyone can do that, it will be finished.
Comment 63 2005-11-24 09:51:07 UTC
In scp2 you only have to do two small changes:

In source/ooo/file_ooo.scp you have to add the definition block for the new
file. You can use a macro for this:

STD_JAR_FILE( gid_File_Jar_Writer2latex, writer2latex)

In source/ooo/module_hidden_ooo.scp you have to assign the file to a module. All
jar files are included in  gid_Module_Root_Files_3, so please include 
gid_File_Jar_Writer2latex into the corresponding file list.

Where have the two configuration snippets to be included?
Comment 64 kami911 2005-11-25 13:17:11 UTC
file_ooo.scp changes may be:

STD_JAR_FILE( gid_File_Jar_Writer2latex, writer2latex)

File gid_File_Registry_Spool_Oo_TypeDetection_Writer2Latex_Types_Xcu
    Styles = (PACKED, PATCH);
    Dir = gid_Dir_Share_Registry_Modules_Oo_TypeDetection_Types;
    Name = "/registry/spool/w2l_types.xcu";

File gid_File_Registry_Spool_Oo_TypeDetection_Writer2Latex_Filters_Xcu
    Styles = (PACKED, PATCH);
    Dir = gid_Dir_Share_Registry_Modules_Oo_TypeDetection_Filter;
    Name = "/registry/spool/w2l_filters.xcu";

File gid_File_Writer2Latex_Xml
    Name = "writer2latex.xml";
    Dir = gid_Dir_Classes;
    Styles = (PACKED);


Files that yo need to add to gid_Module_Root_Files_3 module in
source/ooo/module_hidden_ooo.scp file...


I am not an scp master, but I think I might be good.

is: what is your opinion?
Comment 65 kami911 2005-11-25 13:24:58 UTC
I am not sure if
STD_JAR_FILE( gid_File_Jar_Writer2latex, writer2latex)
should be:
UNO_JAR_FILE( gid_File_Jar_Writer2latex, writer2latex)
Comment 66 2005-11-25 13:41:42 UTC
Looks good, but some small changes are needed:

- The xcu files should not get the PATCH flag.
- Only the jar file should be assigned to gid_Module_Root_Files_3, the other
three files should be assigned to gid_Module_Root_Files_6 .

You have to use UNO_JAR_FILE instead of STD_JAR_FILE, if the jar file contains
services, that have to be registered in the serives.rdb. 
Comment 67 kami911 2005-11-26 19:14:39 UTC
It seems to me it does not install services.
I saw all of java related File entry is between



expression. What does SOLAR_JAVA means and should we put this four file in?
The two file (w2l_filters.xcu and w2l_types).xcu went to

if I follow the installation:
unopkg gui
  5. Select packages and select using the Add

So that path might be wrong...
Comment 68 2005-11-28 10:16:14 UTC
Yes, it is better to include all java related files into a
This variable is set in Java envrironments. If there is no Java in the
environment, all jar files are not included into the installation set.

If your jar files does not contain services, you have to use STD_JAR_FILE. Using
UNO_JAR_FILE, the regcomp tool is used during packing process to register the
services in the services.rdb file (which is located in the program directory).

I do not know, where your files have to be found after calling unopkg. But after
the installation they have to be located in the directory defined by 
gid_Dir_Share_Registry_Modules_Oo_TypeDetection_Filter . Could you find them there?

For the path in user\uno_packages\cache after you called unopkg, Daniel can tell
you probably more ( I cc'ed him).
Comment 69 Daniel Boelzle [:dbo] 2005-11-28 10:37:15 UTC
Using unopkg [gui] is more the "extensions" way of installing your filter, e.g.
you have a downloadable package the user can install into an existing OOo
I think this is not intended here, AFAIK you want OOo to come with your filter
preinstalled (ready to go) without running any further extensions tool like
Please have a look at the filters coming with OOo how to do that.

If you still want to stick with the unopkg way, then your observation is
(partly) right. Your package data is located twice in the cache, one (merged) in
the configuration backend folder, and one in the uno_package temp cache; which
is ok.
Comment 70 kami911 2005-11-28 11:49:14 UTC
I hope it will work!
I put the files in module in the extra-javafilter...
Here is the patch...
Comment 71 kami911 2005-11-28 11:51:18 UTC
Created attachment 31854 [details]
W2L integration info Javafilter installation file
Comment 72 kami911 2005-11-28 11:52:22 UTC
Created attachment 31855 [details]
W2L integration into Javafilter module
Comment 73 kami911 2005-11-28 11:57:08 UTC
Created attachment 31856 [details]
Writer2LaTeX version 0.4.1a - required files
Comment 74 henrikjust 2005-11-28 12:14:26 UTC
writer2latex does not implement any uno services - so STD_JAR_FILE should be OK.
Comment 75 2005-11-28 13:26:30 UTC
kami_ : If you add your files to a module, that can be selected during the
installation, please do not commit the changes we discussed in file_ooo.scp and
Besides you have to define a module name and a module description in file
Comment 76 kami911 2005-11-29 13:34:06 UTC
Created attachment 31895 [details]
javafilter module ulf patch
Comment 77 kami911 2005-11-29 13:38:41 UTC
All required info/files/patch has been added to this issue...
henrikjust -> Is the latest files those you sent equal with version 0.4.1a?
Comment 78 henrikjust 2005-12-16 14:13:50 UTC
The version in cvs (sw/writer2latex) is 0.4 - 0.4.1a is unstable and should not
be used.
Comment 79 kami911 2006-01-16 20:57:44 UTC
Created attachment 33283 [details]
Latex filter basic integration - not tested...
Comment 80 kami911 2006-01-16 21:01:54 UTC is a patch to include it in the installer, and
copy files from the source tree to output tree. Later someone might create a
patch that also build Writer2Latex from its sources. Until that, it will be an
easy and right solution.
Comment 81 pavel 2006-01-18 19:40:37 UTC
What is the status of this issue?

2.0.2 is close and we have a feature freeze now...

Comment 82 kami911 2006-01-18 21:59:31 UTC
2.0.2 might be good:
The latex filters are tested in integration - 2.0.1 HU contained this filter
Only the build system integration not tested, someone might review this basic
integration into build filter. For 2.0.3 we might target the full (buildtime
compile) integration....
Comment 83 kami911 2006-01-19 08:28:01 UTC
I have created the required SCP files. The installation works well, and
everything is Ok with the LaTex export filter. Added the four files directly the

That is what we have to resolve.
I put the files to /xmerge/download and we have to copy the files into solver
with the build system.

Also there are a more professional version: The source is available, so we can
build the files in OOo build time. ANT cpmpiler files are available, so we ned
to adjus thata.
Comment 84 kami911 2006-01-20 02:29:07 UTC
mhayes sus -> Can you help to integrate Writer2Latex filter into build system?
We have a builds with W2L that works well (Hungarian, 2.0.1). henrikjust
contributed the code of java filter, I contributed the code for scp installer.
We need someone who finish the integration, add the W2L's source to xmerge and
filter top level modules, to compile Writer2Latex (with ANT) filter during OOo's
Can you help us? You should use this file:
Mon Jan 16 12:57:00 -0800 2006:
Comment 85 kami911 2006-01-20 02:37:20 UTC
The source of Writer2Latex 0.4 in zipped format is here:
Comment 86 svante.schubert 2006-01-20 12:44:33 UTC
As I recently inherited this area, I will have to take a look into some sources
first, but I scheduled some time for next week to evaluate this.
Comment 87 kami911 2006-01-20 13:27:23 UTC
sos -> Last night I wrote a build thing for OOo, but It not worked well. The ant
build runs under 0 sec and no latex filter created.
Also the filter top level component is stopped with error, So I was not so
successful :o( Of ycourse I can post the script, or send it to you for the base..
Comment 88 svante.schubert 2006-01-20 13:39:59 UTC
Best thing to attach the script to this issue.
Thanks for note.
Comment 89 kami911 2006-01-20 19:03:21 UTC
Created attachment 33417 [details]
Latex buildsystem integration patch+source
Comment 90 kami911 2006-01-20 19:06:58 UTC
I attached the files with patches and source.
The problems:
1) Java source does not build, no error the message is talk about successful build.
2) Filter section won't build - I don't know what I missed
3) You should copy writer2latex.xml where is writer2latex.jar goes...

Please correct the problems...
Comment 91 frank888 2006-01-23 09:45:51 UTC
It would be good to include some help for the users who don't know the
configuration options of W2L. The most important thing is to distinguish between
the two main applications of this export filter. First you might want a layout
close to what you see in OO. I suppose that's the default configuration.
However, if you want to publish a paper, you have to use the Latex-Style of the
conference (IEEE style). For this, the W2L default (4.1a) was not good, because
it had lots of additional Latex-Macros. With the optional "clean"
writer2latex.xml configuration file it's much better for inclusion into existing
Latex documents/styles. To faciliate the handling, two export filters "Latex
(layout)" and "Latex (clean)" could differentiate those cases. Maybe for future
development if this is too complex, or even a completely configurable "option
field". At least, for short term, the users should know how to do this manually.

In general, congratulations for creating the Latex support. Don't forget to
handle this feature to the "marketing" group of OO. I hope this pushes OO in the
academic area.
Comment 92 svante.schubert 2006-01-30 14:23:50 UTC
The QA reprentative returned this week, but told me, that only the TEX filters
have been tested and not the XHTML, which seem to be part of this bundle.
Any informations concerning this bundling?

Currently adding xmerge to your 'Latex' CWS and checking the buildproblems you
Comment 93 svante.schubert 2006-01-30 19:00:06 UTC
Fixed the ANT script so the build works and enhanced it so a javadoc-zip is
delivered. Furthermore, it should work with or without office
environment/stand-alone with ANT.

Currently resynching the Childworkspace 'latex' to the latest build (m154),
afterwards going to check in my changes, but..
To enhance project clarity from the beginning (and spare later CVS handling), I
propose that you move all XML configuration files to the dependent Java packages
and adapt the sources to access them via the Java Classloader:

// starting '/' before the name does not add packagename to filename           
URL configURL = Object.class.getResource("/" + configFileName);

Before I add the sources to the CVS.

What you think?
Comment 94 svante.schubert 2006-01-30 20:00:03 UTC
Is 'ooomath.sty' used at all?
Comment 95 frank7 2006-01-30 22:15:09 UTC
Yes, I get
in the Latex-export. So it's used, but not by the export filter, only later if
you want to compile the Latex source. Then you have to include the style in the
directory of your Latex distribution. I suggest to put those files together with
the other XML configuration files in some "latex examples" directory. In the
README or Online-Help this could be mentioned.

Comment 96 thomas.lange 2006-01-31 08:32:06 UTC
The problem with the 'ooomath.sty' is that we should ship it along with the
rest. And for this we need a location to put it. You may probably need
User-Experience to ask where it should go in the installation tree.

The second problem with it is that it is NOT required by the Office but is to be
used with the local LaTeX installation of the user. That is we need some means
(if only documentation) to tell the user about that file in order for him to
copy it in the respective directory of his LaTeX installation.
Comment 97 pavel 2006-01-31 08:35:03 UTC
ooomath.sty should be copied to the same location the final exported file is
saved, otherwise user can't distribute it, provide it to other people etc.

Copying to the local TEXMF tree is possible, but think of distributing the
resulting file elsewhere...
Comment 98 thomas.lange 2006-01-31 08:55:32 UTC
That sounds good because the user will be aware of the file this way.

The new problem then is that the export dialog/filter needs to be modified to
copy the styles file to the same location. 
I wonder if that is to be done in the filter or in the dialog as postprocess to
the filter...
Comment 99 frank888 2006-01-31 09:17:01 UTC
You want to save the style everytime in every directory you're saving TEX files
to? You need this style only once, installed in the Latex distribution. I use
lots of small OO subchapter files, because in OO it's more comfortable to write.
But my final document is Latex (good formula numbering, good Bibtex support,
...). So I even don't need the ooomath style at all. Having tons of additional
identical style files in the directories would disturb me. The first I would do
is to remove this behaviour in the W2L sources. Anyway, the user should be aware
of the different configuration files (clean Latex or layout-similar Latex) and
you have to inform about those files somehow. I suppose most people want to edit
the Latex source later and prefer the "clean Latex" configuration. What about a
comment in the exported file, like "%% for the ooomath.sty and XML sample
configuration files, check the ($Programdir)/samples/... directory"
Comment 100 frank888 2006-01-31 09:31:54 UTC
Apropos Style: any idea about how people would use this filter?

The typical Latex way of writing is to produce clean code of your Text. Then
depending on the publication type you select dedicated styles, like the
IEEE-conference style or some Phd book styles. I can't image that people would
use the Latex export just like typical Word document sharing. For this, the
OpenOffice-Format seems more suitable.
Comment 101 henrikjust 2006-01-31 09:38:16 UTC
To clear up the ooomath.sty stuff:

The package ooomath.sty is *not* used by default, so there should be no need to
worry about this file.

(To use ooomath.sty the user will have to manally configure Writer2LaTeX; a user
who does this will probably know about the file already)
Comment 102 henrikjust 2006-01-31 09:57:00 UTC
sus writes: "The QA reprentative returned this week, but told me, that only the
TEX filters have been tested and not the XHTML, which seem to be part of this
Any informations concerning this bundling?"

This is true; export to XHTML 1.0 and XHTML 1.1+MathML is an integrated part of
Writer2LaTeX. Since this export has not been approved for integration, the
filter snippets w2l_types.xcu and w2l_filters.xcu does not install the XHTML
export. If it is approved later, a simple extension of these is all that is needed.
Comment 103 henrikjust 2006-01-31 10:01:56 UTC
frank888 writes: "Apropos Style: any idea about how people would use this filter?

The typical Latex way of writing is to produce clean code of your Text. Then
depending on the publication type you select dedicated styles, like the
IEEE-conference style or some Phd book styles."

The default configuration tries to catch this, by only preserving basic
formatting (like bold, italics, centered text). The advanced user can fine-tune
Comment 104 Daniel Boelzle [:dbo] 2006-01-31 10:33:29 UTC
removed dbo from CC.
Comment 105 frank888 2006-01-31 10:37:51 UTC
Oh, don't hesitate with the XHTML+MathML support, since Mozilla Firefox 1.5 can
display this. I tried with the W2L 0.4.1a and it looks impressive, not as
beautiful as with the Latex-engine, but hey, it's true math, not only
GIF-pictures. Soon, the computer algebra systems will read and process those
formulas. MathML export is already possible in Waterloo Maple(TM) or
Mathematica. If you enable this feature, you're the pioneer of Office math
publishing, long before the MS-Word/Internet-Explorer tandem will be capable of
Comment 106 svante.schubert 2006-02-08 15:03:20 UTC
Take over issue to indicate, that I am working on it.

So far, I created a uno package of the two Latex filter to install the filter
via Office package manager (GUI or unopkg). The creation of a package ease the

I will have to debug xmerge as the filter receives an empty DOM tree (might be a
misconfiguration of my test package).

Is there still a need for the XMergeFix.jar? (after the integration of issues
28561 and 33702) and no issue listed as dependent here?
If there are still problems, I would like to integrate the necessary changes
into the module itself and make the xmergeFix.jar obsolete.
Comment 107 svante.schubert 2006-02-08 15:14:19 UTC
Started and remove blocking of 24256, as the XHTML filter won't be bundled with
this issue.
Nevertheless I took over 24256 as well (notes there).

To make the filter JAR as lean as possible, only the files required for BibTeX
and LaTeX 2e should be bundled.
IMHO it is no good to bundle these and add later on only configuration as
proposed earlier.
By this an undesired dependency between filters would be created that might
bring up problems later.

Comment 108 kami911 2006-02-09 08:23:18 UTC
"Is there still a need for the XMergeFix.jar? (after the integration of issues
28561 and 33702) and no issue listed as dependent here?"
AFAIK XMergeFix.jar is only need for OOo 1.1.x installation. I read it from the
installation documentation. So In our case It does not need at all.-------

"Started and remove blocking of 24256, as the XHTML filter won't be bundled with
this issue.
Nevertheless I took over 24256 as well (notes there)."
So finally do you split up the filter to two parts? One for Latex another for
XHTML+MathML? Two of the are very useful.
Comment 109 svante.schubert 2006-02-09 13:45:25 UTC
Thanks for your information.

I am about to integrate Hendrik's two TeX filter together with their Office
configuration and a new ANT script, which creates a JAR with all mandatory parts
(still to be selected). Optionally it creates a JavaDoc ZIP and a UNO package of
the filter.
BTW this ANT script will be able to be used in the Office build env and as well

The evaluation of the XHTML export in conjunction with MathML is not dependent
to the TeX filters and will therefore be be done in a different task.
Comment 110 svante.schubert 2006-02-13 20:00:02 UTC
Based on the writer2latex Version 0.4 (2005-07-01), I stripped the XHTML part
from the filters and attached these sources as ZIP so you might check/enhance them.
The ZIP represents the directory structure to be added beneath xmerge/source/.

Furthermore, I created an uno package, which is yet unfinished, as it still
searches the writer2latex.jar in the <SOFFICE_INSTALL>/program/classpath
directory. In case you use it, by tools->package manager or by the unopkg
commandline tool you still have to copy the included JAR manually to the class path.
Comment 111 svante.schubert 2006-02-13 20:01:48 UTC
Created attachment 34122 [details]
Sources to be added to's XMerge module.
Comment 112 svante.schubert 2006-02-13 20:02:47 UTC
Created attachment 34123 [details]
UNO package to test the LaTeX filters (incomplete, as the JAR have to be copied manually to program/classes)
Comment 113 svante.schubert 2006-02-20 14:05:57 UTC
Please test the functionality of the LaTeX / BibTeX export filters as provided
in my attachments. 
Everybody else is appealed to test the filter as well.

The JAR still have to be copied into the classes directory (as describe earlier)
as XMerge is not capable to work with UNO packages. 
I plan to change this for SO9 (one of the XML based filter requirements I am
currently writing on).
Comment 114 lohmaier 2006-02-22 22:10:30 UTC
*** Issue 62280 has been marked as a duplicate of this issue. ***
Comment 115 svante.schubert 2006-04-06 16:53:32 UTC
Adding now by default the BibTeX and the LaTeX filter to the writer module.
Moving the issue back to QA (jw), when the Office and patch build is done (and
smoke tested).
Comment 116 svante.schubert 2006-04-07 12:34:58 UTC
Added the BibTeX and LaTeX export filter successfully to PP3 CWS latex
Comment 117 svante.schubert 2006-04-07 12:36:54 UTC
Please check filters in office patch of CWS latex

re-open issue and reassign to
Comment 118 svante.schubert 2006-04-07 12:37:12 UTC
reassign to
Comment 119 svante.schubert 2006-04-07 12:37:29 UTC
reset resolution to FIXED
Comment 120 frank888 2006-04-07 13:07:26 UTC
Thank you all for this feature, especially Henrik for the programming!
Comment 121 jack.warchold 2006-04-11 15:48:34 UTC
seen good in the cws latex set to verified.

henrik are you still working on the filter? is it possible to send you some bugs and/
or a feature wishlist?

some thinks are really unclear to me
Comment 122 frank7 2006-07-03 15:40:25 UTC
FIXED, but I can't find the filter in the OO 2.0.3 release. What happened?
Comment 123 svante.schubert 2006-07-03 16:40:33 UTC
We might call it bad luck...

To be able to add this feature, a feature mail and a test plan had to be
written, but were missing. The reason it is usually written by implementor but
this time by the QA.
Unfortunately I was on vacation during the critical time, so I could not clear
the situation.

I am sorry for this final delay, the CWS will be intregrated in the upcoming patch.

Comment 124 kami911 2006-07-03 16:41:28 UTC
FIXED because it was included in 2.0.4. The target with 2.0.3 was delayed. You
can check the CWS status in EIS (
Comment 125 jack.warchold 2006-07-11 12:57:44 UTC
Created attachment 37658 [details]
simple testcase
Comment 126 kami911 2006-07-12 18:17:46 UTC
Will it integrated to 2.0.4?

Comment 127 svante.schubert 2006-07-12 21:06:15 UTC
The Childworkspace (CWS) has passed development and QualityAssurance.
Only the gatekeeper stands between the integration into an upcoming build.
The gatekeeper will be back on monday and the issues he earlier found in
documentation (featuremail and feature test scenarios) are fixed.

It looks very promising, that the LaTeX and BibTeX will make it into the 2.0.4.
In any case I will keep an eye on this CWS.
Comment 128 jack.warchold 2006-11-29 13:21:13 UTC
Seen good in SRC680_m195