The Writer2LaTeX export filter
The export filter Writer2LaTeX allows you to publish documents you have prepared with Writer – in particular documents containing a lot of formulas. LaTeX does a better job typesetting text with formulas, so even though you use Writer to prepare your document, you may prefer to use LaTeX as a backend for printing; including pdf generation. Writer2LaTeX gives you extensive control on the export of formatting:
You can convert arbitrary documents into clean LaTeX code, stripping all or most of the formatting.
You can convert a well structured document to LaTeX, mapping styles to LaTeX code.
You can convert a well structured document to LaTeX with most of the formatting preserved, thus using LaTeX as a typesetting engine for your document.
You will never get a result that looks identical to the original, in fact that's the whole point: LaTeX is in general a superior typesetting engine compared to Writer. For example LaTeX produces much better results for formulas, it has an excellent paragraph and page breaking mechanism, it uses ligatures etc. On the other hand Writer has a few features that LaTeX does not support well. If the layout of your document depends on text flowing around pictures or linked text boxes, you will never get good results with Writer2LaTeX.
According to TeX's author Donald E. Knuth, TeX is a typesetting system intended for the creation of beautiful books - and especially for books that contain a lot of mathematics (quoted from "The TeX book"). Writer2LaTeX will aim to produce excellent result for this kind of documents; including of course shorter texts with a book-like layout.