{floats} is about the floating environments figure, table and other, custom-defined floats, and concerns issues such as positioning, labelling, captioning, indexing and listing of said floats. For questions specifically about formatting a float caption, consider using {captions}.

learn more… | top users | synonyms (2)

11
votes
1answer
2k views

Do I need \leavevmode for centering figures?

I have an image I'd like horizontally centered on the page. Currently, I'm using the following code (which does work) under pdflatex: \usepackage{float} ... \begin{figure}[H] \begin{center} ...
5
votes
2answers
5k views

Change font size in figure environment

I'm writing a thesis-like document and I have sketches/figures made in TikZ and plots/graph made in gnuplot with the epslatex terminal. In the gnuplot manual it says if the font is not specified it ...
4
votes
1answer
968 views

Preserve Figure order

Is there a way to ensure that Figure X is always before Figure (X+1)? They are referenced in the text in the correct order but it seems that Latex rearranges their appearance within the document.
4
votes
1answer
356 views

Trouble using \formatdate inside \caption

I am having trouble formatting a date inside a caption using the datetime package. I'm told "Incomplete \iffalse; all text was ignored after line 6. \documentclass{article} \usepackage{datetime} ...
3
votes
2answers
893 views

Extra large gap in article where figure code is, even though figure is at top of page

I writing an article using the amsart document class and whenever I use \begin{figure}...\end{figure} to put a figure into the article, it places the figure at the top of the page (which is fine), but ...
4
votes
1answer
10k views

LaTeX Warning About Height, \hbox, and \vbox, and ht

I am compiling a LaTeX document on Ubuntu and I am getting those warnings, errors, or whatever. Any idea about them? Package hyperref Warning: Height of page (\paperheight) is invalid (0.0pt), ...
34
votes
2answers
45k views

Table and figure side-by-side with independent captions

Looking to put a table and a figure side by side so that the table and figure have their own captions. A crude sketch ------------ ----------------- TABLE | a | b | ...
5
votes
2answers
3k views

Suppress Numbering of Subfigures

Is there a way to supress the numberings of subfigures within subfigures? Currently, I have something like the following: \begin{figure} \subfigure{ \subfigure{...} \subfigure{...} ...
3
votes
1answer
791 views

Missing “Figure” title for captions of side-by-side graphics

Background Trying to reference the label of figures that are side-by-side. Problem Referencing figures by their label works, except when the figure is in a mini-page. That's when the word "Figure" ...
7
votes
1answer
559 views

Footnote being pushed to after a float page.

I have somewhat bizarre footnote placement in a document that I'm typing. Unfortunately, I'm also having trouble reducing it to a minimum not-working example as this behaviour seems to depend on many ...
13
votes
1answer
9k views

Table captions are always placed below

I have a problem with table captions in LaTeX. They appear always below the tables instead of above as required by my editor. I've read lots of documentation and everybody says that if you place the ...
18
votes
5answers
4k views

New figure environment

I am writing my PhD thesis. In my manuscript I have Figures in the text and Photographic plates (a figure of figures) in the annexes. The two elements are different and I would like create a new ...
14
votes
2answers
736 views

Set a global policy for floats positioning

I have a document with many floats (figures, specifically). I want to be able to change the global floats positioning policy from htbp to just h (or even H with the floats package). For my-own ...
7
votes
3answers
7k views

Rename “Algorithm” to “Listing”

Background Syntax-highlighted source code image listings are being used as Algorithm floats with the lst: prefix for captions. Problem The following LaTeX code in the preamble renames the caption ...
5
votes
5answers
3k views

Center figure which spans over whole page

I would like to get this to center with 5pt margins on left, right, and top. So the picture will cover nearly the whole page with room at the bottom for captions. \documentclass{article} ...
14
votes
2answers
6k views

Floating an algorithm?

I'm typesetting an algorithm using the algorithmx package as follows: \begin{algorithm} \caption{\textsc{Whatever}} \begin{algorithmic}[1] ... \end{algorithm} However, I would like it to ...
7
votes
2answers
3k views

How to put two tables in a table* element so that the tables appear side by side in a two column layout scientific paper?

This is related to How to make a figure span on two columns in a scientific paper? In a table* element, I want to put two \tabular{} elements, and get them appear side by side. I will then need to ...
24
votes
4answers
35k views

Reduce space between enumerated items

Background A book with lots of images. All of the images are set to "here definitely" (as they must come after the text that introduces them). Problem The list types (enumerated and bullet) have ...
4
votes
1answer
1k views

Table, Figure, and Listing prefixes

Background Using LyX and KOMA Script to author a technical manual. Problem The documents are strewn with the following references: \ref{fig:Example-Database-Type} When converted to PDF, this ...
11
votes
3answers
7k views

How can I center all tables in a document?

Background Would like to center all tables within floats, without having to add \centering to each table. Ideas Tried the following: \let\originaltabular\tabular ...
5
votes
1answer
577 views

Newenvironment and floating figures

I want to create an environment for a list of items, that should look like this for each item: Name Image ....... Image .............. .............. with this environment ...
18
votes
4answers
685 views

How exactly does \def\p@figure{Figure~} work?

I took this line from my thesis style and added it into my document (preceded by \makeatletter) and what it does that whenever I used \ref{figureid} instead of putting just the figure number, it puts ...
48
votes
4answers
31k views

Two figures side by side

How can I put two figures side-by-side? Not two sub-figures, but two actual figures with separate "Fig.: bla bla" captions. A figure is supposed to spread over the entire text width, but I have two ...
10
votes
1answer
680 views

How to number floats in sequence with theorems?

I like having all my theorems, examples, defintions etc. numbered in a single sequence. Is it possible to have LaTeX number my floating figures in sequence with them as well? I.e.: Theorem 1.1 A ...
6
votes
2answers
2k views

Number Algorithm floats with dependency (subalgorithms environment)

What I have: 3 algorithms, like so: \begin{algorithm} \caption{Caption One} ... \label{alg:one} \end{algorithm} \begin{algorithm} \caption{Caption Two} ... \label{alg:two} \end{algorithm} ...
6
votes
1answer
6k views

subfig caption spacing

How do I reduce the vertical space between a caption of a subfigure and the image of that subfigure? I tried: \subfigure[\vspace{-0.2in} caption words] doesn't seem to do anything.
15
votes
1answer
15k views

Floats - how to restrict floating to subsection only in one section of the document?

I have concluded that the package float allows figures to float within the section they belong to. However for one particular section I need to restrict the floating to the subsection (without forcing ...
5
votes
2answers
497 views

Which package for In-line and float algorithms?

I am using LyX to describe algorithms. A common scenario is that I have a snippet of pseudo code (in a float, for example) and a block of text which makes references to keywords in that pseudo code. ...
23
votes
4answers
8k views

How to avoid splitting tables between sections

I have 5 tables and a section after them. After creation of an output file I have two tables on one page, then a section and last 3 tables on next page. What I want to achieve is to put tables and ...
10
votes
2answers
3k views

Splitting a float with code listings

Using the floats and listings packages, I have defined a float for code listings and a shortcut for using it as follows: \usepackage{floats} \usepackage{listings} ...
2
votes
1answer
468 views

How can I stop LaTeX from overriding instructions on spacing?

I'm using LaTeX to typeset my thesis, using a class that some students at my school wrote to typeset according to the graduate school formatting requirements. The class uses the setspace package to ...
14
votes
2answers
3k views

Absolute positioning of wrapfig

In Microsoft Word, it is common to create a floating text box, separate from the normal body text, that can be placed anywhere on the page. The body text will then wrap around this text box so ...
6
votes
2answers
1k views

How to make an appendix with only tables without “too many unprocessed floats” errors?

I'm often writing reports containing over 50 tables and over 200 figures that have to be included in appendices. The problem is obvious: if you just make an appendix \chapter{Tables} \begin{table} ...
3
votes
2answers
484 views

How do I make custom float environments use the same numbering for captions.

I use a custom float environment that is basically used as a table environment that provides extra formatting. I would like this environment to use the same numbering as the regular table floats. Is ...
18
votes
3answers
20k views

How to rotate landscape table page in PDF?

Currently I am using \usepackage{rotating} \begin{sidewaystable} \begin{tabular}...\end{tabular} \end{sidewaystable} to typeset landscape tables, which works great. But I want to rotate that page ...
8
votes
2answers
311 views

How to make a wrapper for the figure and table environments.

I am familiar with the newenvironment command, but I was wondering, how do I carry on the parameters that are used between [ ], i.e [bht!]? I want to make a newfig and a newtab environment that will ...
10
votes
2answers
2k views

How to put table and PNG next to each other in the same figure?

How can I put a table and a PNG (using \includegraphics) next to each other in the same figure, in the following way? +----+ +-----+ |png | |table| |png | |table| |png | ...
15
votes
1answer
9k views

Put a table* at the bottom of a page?

In a two column document in LaTeX, is there any way to put a table* (a table spanning both columns) at the bottom of the page? The obvious doesn't work: \begin{table*}[b] % b!, hb, hb!, etc. ...
8
votes
2answers
521 views

Place all floats last without changing numbering

I'd like to place some of my floats (specifically code listings) in my documents in a section at the end, without disturbing the numbering. Currently, I have them numbered within sections, so in ...
8
votes
4answers
987 views

Override tendency to avoid filling entire page with floats

I'm working on a two column document, and on one of the pages, I want to fill an entire column with three different floats. But when I use, for instance, h!, ht!, b, b!, t!, etc., on all three of ...
73
votes
5answers
29k views

Why should a table caption be placed above the table?

In the papers I read the caption in figure floats is placed below the figure and in table floats the caption is placed above the table. I recognize that this is a common style that a lot of people ...
11
votes
2answers
8k views

Why is my table displayed at the top of the page?

I figure this must be a common issue but I could not find a solution. Here is my code: \documentclass{article} \begin{document} Text: This text should be above the table, but it is not. ...
38
votes
2answers
22k views

How to make a figure span on two columns in a scientific paper?

If I just try to set the figure's size to 0.9\textwidth my figure will just end up on the right column, sized to be two-columns wide. Has anyone done this before?
53
votes
1answer
65k views

Why is \newpage ignored sometimes ?

I have the following towards the end of an article. The bibliography is short (4 entries). What's happening is that on the very last page of document I get the chart and immediately afterwards the ...
8
votes
1answer
5k views

Legend in caption

It may be a bit difficult sometimes to deal with the legend of a figure in a LaTeX document. Depending on the context, you may have to place the legend over the existing curves because of a lack of ...
11
votes
3answers
611 views

Why can't I use \newfloat more than once?

I've found the float package, which lets me specify \newfloat{program}{...} to get other named floats than Table and Figure. However, if I try to use this more than once, I get a cryptic error: ! You ...
4
votes
3answers
2k views

Forcing specific numbers for tables

I'm working on a paper which will include several tables from a book. I would like to keep the same table numbers as in the book, it makes it easier for people reading the paper in this case. They'll ...
163
votes
2answers
41k views

Should I use center or centering for figures and tables?

What is the correct way to center figures and tables (figure, table)? \begin{center} ... \end{center} or \begin{centering} ... \end{centering}
12
votes
4answers
3k views

Is there a general command to disable indentation of paragraphs after figures and tables?

I am typesetting a manual, that uses normal indentation for paragraphs. The pages have a lot of figures and tables and I would like to have the paragraph after tables and figures to have no ...
20
votes
2answers
3k views

Margin Figures/Captions

I have two figure/caption related questions. Firstly, in many textbooks, it is customary to put thin figures (along with their captions) entirely in the outer margin of the page. What is the most ...