Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a lyx file in which there are several figures and tables. The preamble has been amended to have:

 \usepackage{multirow}
 \usepackage{rotating}
 \usepackage{subfig}
 \usepackage{longtable,lscape}
 \usepackage[nolists,tablesfirst]{endfloat}
 \usepackage{caption} 
 \captionsetup[table]{skip=20pt}

When I added a new figure after all my other figures, in the lyx screen it numbers it Figure 5. However, when I actually export to PDF LaTeX seems to number it Figure 1. Any ideas on this? This latest figure is an eps graphic. The other figures are all pdf documents.

EDIT: Interesting: I figured out the issue (or atleast what fixes it). This figure was specified to be sideways. Once I removed that the ordering became correct. Any ideas what's going on?

share|improve this question
    
Can you please build a minimal working example illustrating the problem? Nothing too complicated; document class used and a couple of figures; one of them a "regular" figure and the other one with the sideways specification. In this way we can reproduce your problem and detect the cause of the problem. –  Gonzalo Medina Oct 9 '12 at 1:31
    
Note that LyX is just a front-end or editor. So its placement of floats is usually different (and not floating at all). During compile time, TeX does its magic to optimize the float placement. sidewaysfigures usually land on a page of floats, which could even further disturb the difference between the editor and the output. –  Werner Oct 9 '12 at 4:21
    
yes, attempting to produce example but it seems a simple example is not working to illustrate my problem. will post something as soon as i get it "working" –  Alex Oct 9 '12 at 21:40

1 Answer 1

up vote 0 down vote accepted

Finally found the answer in the endfloat documentation:

The rotating package[5] contains definitions of environments sidewaysfigure and sidewaystable,8 and it would be nice to have these work in documents which also use endfloat. Appropriate redefinitions of these so that they work with endfloat are given in the file efxmpl.cfg. If you wish to use that file, you should include it as a package (possibly renamed) after you include endfloat. Or you could simple rename it to endfloat.cfg and endfloat will include it automatically.

share|improve this answer
    
I had a similar problem and the following solution worked for me: add \DeclareDelayedFloatFlavor{sidewaystable}{table} \DeclareDelayedFloatFlavor{sidewaysfigure}{figure} to the preamble (Document - Settings - LaTeX Preamble in LyX). Then endfloat "grabs" (not the right term I'm sure) sideways floats and puts them in the right order. –  user21155 Feb 28 at 16:30
    
PS - it appears that LyX adds the rotfloat package when you insert a sideways table through LyX, but if you were including the table manually (i.e. entering LaTeX code directly), I suppose you would have to add the package manually as well. –  user21155 Feb 28 at 16:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.