Difference between revisions of "Writer2Latex"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 1: Line 1:
 
'''This page contains several QA regarding [http://www.hj-gym.dk/~hj/writer2latex/ writer2latex] for advanced users. Work is in progress...'''
 
'''This page contains several QA regarding [http://www.hj-gym.dk/~hj/writer2latex/ writer2latex] for advanced users. Work is in progress...'''
 +
 +
===Q: how to change the terminology "figure" used in image caption to something else, e.g. "illustration"?===
 +
A: It should work to add some extra code to your preamble:
 +
 +
<custom-preamble>
 +
\AtBeginDocument{\renewcommand\figurename{Illustration}}
 +
</custom-preamble>
 +
 +
For version 0.6 I will add the possibility to set this automatically.
  
 
=== Q: How to let text flow around (small) images? ===
 
=== Q: How to let text flow around (small) images? ===

Revision as of 22:18, 16 August 2007

This page contains several QA regarding writer2latex for advanced users. Work is in progress...

Q: how to change the terminology "figure" used in image caption to something else, e.g. "illustration"?

A: It should work to add some extra code to your preamble:

<custom-preamble> \AtBeginDocument{\renewcommand\figurename{Illustration}} </custom-preamble>

For version 0.6 I will add the possibility to set this automatically.

Q: How to let text flow around (small) images?

A: Text flow around a figure is problematic in LaTeX (that's why I don't try to export this with w2l). I would recommended the pacakge floatflt.sty for this.

This requires some manual editing of the LaTeX file:

Add the package to the preamble: \usepackage{floatflt}

Replace the relevant \begin{figure} .... \end{figure}

with

\begin{floatingfigure}{5cm} .... \end{floatingfigure}

(replacing 5cm with the actual width of the figure)

However: For this to work well there has to be a certain amount of text around the figure, and there must be no lists or headings immediately after the figure. Thus there's a chance that 12 small images and not a lot of text will give you trouble.

Q: How to left justify all captions?

A: You can center the tables as well in your document or:

You can left justify all captions. W2l currently use a version called caption2, which is obsolete and replaced with a version called caption (this is actually version3). w2l will be fixed to use the never version of caption.sty soon.

Configure:

<option name="use_caption2" value="true" />

Then you should add to your custom preamble:

<custom-preamble> \captionsetup[table]{justification=raggedright,singlelinecheck=false} </custom-preamble>

But you also need to edit the LaTeX file and replace

\usepackage{caption2}

with

\usepackage{caption}

Q: A table could easily break particular cells in two or more lines but exceeds the page width instead. How to fix it?

A: You should lower the value of the option simple_table_limit, for example

<option name="simple_table_limit" value="25" />

If all cells in a table contains at most this number of characters, they will be exported as simple tables with one line per cell. This creates slightly better results for these tables, but if the value is too large you will get the results, you see in your example.

Q: The background of embedded images with a transparent background is rendered colourful. How to fix it?

A: Yes, unfortunately pdfTeX does not support transparent backgrounds, so you have to edit it with some external image tool to replace the transparent color with white.

Q: When processing pdflatex it warns me "No author given". What to do?

A: This is harmless; it's a warning that there is not given an author name to add below the title.

Q: Charts inserted as OLE objects are still rendered "ugly", look like bitmaps and not as vector charts. What to do?

A: This will not be fixed in version 0.5, but it's on my list for version 0.6.

Personal tools