Go to page:

Search help:

Navigation

Groups

LyX documentation

Edit

Shared groups

Links

PlacingFiguresAndProducingLegends

Please categorize this page.
<< EndNotes | Page list | Subfigures and cross references >>

How to treat long legends and big figures with the nonfloat package.

Large figures and long legends

The usual way to produce a figure with a legend is described in the tutorial. Shortly, one creates a float, imports the figure (best works encapsulated postscript) and describes this figure above or below it.

There are several problems for a beginner when doing that

  • producing a encapsulated postscript is not that easy as it sounds, especially when coming from the windows world.
  • using a float works great when the figures are small and the legend does not contain a longer text. But if the figure is large and the text long, the result is less than desirable: the legend just ignore the margins und overlaps the page number.

To circumvent these problems, one possibility is to use the following approach:

Use a good program to create the figures. Microcal Origin (tm), as an example for scientific software , produce extremly bad .eps. xmgrace works far better. Anyway, most of the .eps issues (mainly bounding box) from Origin (and other programs) can be fixed when using the tool fixbb.sh (available from http://www.gnuplot.info/scripts/index.html). When very big figures (as used in biological sciences and human sciences) with a long legend are used, it works better not to use a float, but install the package "nonfloat" and use some latex code.

  1. Get "nonfloat" from www.ctan.org and install it according to the README
  2. write \usepackage{nonfloat} in latex preamble (Format --> Document --> Latex preamble
  3. Place the figure where you want to have it (Insert --> Graphic)
  4. Use the following latex code, placed in an ERT enviroment:

CTRL-L

opens the ERT enviroment. Write

\figcaption[short title for the index]{Loooong blabla for describing your figures}

That's it. You will notice that latex will do a page break to correctly place the legends. Formatting the legends is done via the package "caption2".

When using latex code, one has to be carefull not to use accidentally latex special characters. For example using "%" does not work in ERT, place \% to prevent latex to read it as a control sequence.

Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2006-06-21 09:04 CEST