Google Answers Logo
View Question
 
Q: Controlling Figures in Lyx ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: Controlling Figures in Lyx
Category: Computers > Software
Asked by: salah-ga
List Price: $5.00
Posted: 04 Jan 2003 21:07 PST
Expires: 03 Feb 2003 21:07 PST
Question ID: 137639
When inserting a figure in Lyx I am faced with two options:

1- make the figure inside a float, which is good cause it gets
automatically listed in the table of figures, and bad because I don't
control the placement of the figire.

2- insert the figure without a float, which is good because I get to
control the location of the figure and bad because the figure doesn't
get listed in the table of figures.

My question is how can I insert the figure such that I control where
it is placed and at the same time get it listed in the table of
figures? The problem with the automatic placement of figures inside
floats is that sometimes Lyx places the figures under the wrong
paragraph.

Request for Question Clarification by maniac-ga on 16 Jan 2003 17:53 PST
Hello Salah,

I would like to answer your question, but I can't quite determine the
what effect you want. Are you looking for:

float w/ figure

Text... (figure reference) ... more text

where the figure always appears in a fixed location relative to the
reference (and text) - in this example, prior to the text or something
else?

From your last statement, it would appear that your figure is ending
up somewhere remote from where it is defined, but I can't tell for
sure. Please confirm this or describe the effect you are trying to
enforce so I can suggest a solution.

Thanks.
  --Maniac

Clarification of Question by salah-ga on 17 Jan 2003 02:04 PST
When using floats, the exact location of the figure is determined
automatically by lyx. I, in the text, you talk about something like
"the figure above" it might end being the figure below. This is an
example of what is undesirable when using float. However,when not
using floats but rather inserting figures directly, the figures are
not listed in the table of figures created by Lyx. I want to be able
to insert figures so that their relative position to a block of text
(above/below) doesn't get altered by Lyx and at the same time have
them listed in the table of figures created automatically by Lyx.Thank
you.
Answer  
Subject: Re: Controlling Figures in Lyx
Answered By: maniac-ga on 20 Jan 2003 18:19 PST
Rated:5 out of 5 stars
 
Hello Salah,

Let me suggest a few things that should affect the placement of
figures and provide some references to on line materials for
additional information.

Try this first...

If you right-click on a float figure, it will bring up a dialog box
labeled "Placement". In addition to the document default, you can
choose "here", "top", "bottom", and "page". From your description, you
want "here". The defaults are "top", "bottom", and "page". Make the
change, close the dialog box and see if this fixes your problem.

Try this second...

In Layout -> Document the dialog box has a tab labeled "Extra". The
document default placement is defined at the top. Use the letters htbp
to refer to here, top, bottom, and page respectively. You should also
be able to specify something like !hbp to "try really hard" to place
the floats where they are defined.

Try this third...

I found that some of the document styles do not give you the
flexibility to set the placement. The example referred to in the
tutorial appears to be one of these. In this case - change to another
document style (e.g., book) or change your wording to refer to the
figure by number (using a label in the caption and a cross reference
for the in line text).

You may also be able to embed TeX or LaTeX commands directly. To
assemble a float with caption and label - use something like...

  \begin{figure}[hbp]
  (your figure goes here)
  \caption{caption goes here}
  \label{name-of-label}
  \end{figure}

so the first and last three lines would be embedded TeX commands. The
caption and label could go above your figure if desired. The Insert ->
TeX menu command is used to do the embedded text (should appear in
red).

A few notes from the LaTeX User's Guide...
  o it is printed at the earliest place
  o it is not printed on a page prior to where it is defined
  o it will not appear out of order (figures to figures, tables to
tables)
  o it will appear ONLY where specified [htbp]
  o a float will not produce an overfull page
  o there are other page constraints that apply including topnumber,
topfraction, bottomnumber, bottomfraction, totalnumber, textfraction,
and so on.
The last batch of items could be overridden in a LaTeX preamble - you
might need a LaTeX manual to help describe what to do.

Whew!

Your installation of LyX should include
  o the User's Guide
  o Extended Features
  o Customization
  o LaTeX Configuration
and other helpful documents under the Help menu. For example, section
4.3.1.2 of the User's Guide describes float placement (at least in my
copy).

Other online resources include:
  o The LyX web site (http://www.lyx.org/)
  o The Floats part of the "LyX Tricks and Tips" site
(http://www.educat.hu-berlin.de/~voss/lyx/floats/floats.phtml)

If you need to customize LyX with LaTeX or TeX commands, I suggest
"LaTeX: A Document Preparation System (2nd Edition)". Amazon.com
appears to have it in stock if your local bookstore does not. There is
also "The TeXBook" as well.

Some search phrases that could also help find other sites include
  LyX float placement
and similar phrases.

  --Maniac
salah-ga rated this answer:5 out of 5 stars

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy