title: Inserting Images anywhere on the page

text: So, every time, I try to insert an image, it puts the image at the top of that page or at the top of the next page. However, what if I wanted to insert it where I want it to insert? For example, try the following:               \documentclass[12 pt]{article}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{textcomp}     \usepackage{wasysym}     \usepackage{amsthm}     \usepackage{array}     \usepackage{calc}     \usepackage{proof}     \usepackage[inline]{asymptote}     \title{Test Document, with default template}     \author{Ahaan S. Rungta}     \date{}          \begin{document}     \maketitle     \pagebreak     Hello, in this lecture, we will prove that $ 2 + 2 = 4 $. So, we use barycentric coordinates, as shown this figure:      \begin{figure}         \centering         \includegraphics{iphoo_logo}         \caption{I don't even need this.}     \end{figure}     \end{document}      Notice what happens; the figure gets inserted at the top of the page. How can I make it appear right where I tell it to appear? Thanks in advance!


title: Figure with minipage alignment issues

text: I have a figure block with 2 'minipage', each having a figure. When I typeset the document, the figure goes to the top of the page instead of being in the sub-section where I am defining it. The following is the code I am using to do this.               \begin{figure}       \centering       \begin{minipage}[t]{.45\textwidth}         \centering         \includegraphics[height=.4\linewidth]{sample.png}         \caption{Collection Definition}       \end{minipage}       \begin{minipage}[t]{.45\textwidth}         \centering         \includegraphics[height=.4\linewidth]{tree.png}         \caption{Collection Result}       \end{minipage}     \end{figure}


title: How can I restrict the placement of images?

text: > **Possible Duplicate:**   >  Keeping tables/figures close to where they are mentioned It is there any chance to stop the auto-inversion of the images from a pdf (generated with MiKTeX 2.9) file? Example: I have a section about X-ray and the related image is shown in the section "spatial application". It is absurd. I have to use a lot of pictures and scale doesn't fix the problem. Every picture should be where she has to be.


title: How to keep figures before the references in a paper in LaTeX?

text: I have a paper with 30 figures. I added all the figures before conclusion section. But after compiling the document, 10 figures are placed into the middle of the document and after the references. I applied `\begin{figure}[!htbp]` in the first of the figures definition. How can I force the figure to stay in the place where I defined it in the paper, for example before the references or conclusion sections?


title: Only one figure on a page BUT one the top

text: I am finishing my Thesis by an appendix part. In this one, there is a lot of figures. When there is only one on a page, it is vertically centered. I like it on the top. I try with `[t]` and `\vfill` but none of this solution worked. Could you help me ?


title: Set table position to top

text: some content     \begin{table}[t]     \begin{tabular}{c c c}     tabular content     \end{tabular}     \end{table}     \chapter{new chapter}      The output is: First page:               some content      Second page:               table centered vertically      Third page:               new chapter      The problem is that table is centered vertically although its position is set to top [t] and second page's content is only table. How to force it to set it really on top?


title: Positioning figures in specific places.

text: > **Possible Duplicate:**   >  Keeping tables/figures close to where they are mentioned Whenever I insert a figure into my document, it is placed wherever it can fit. Sometimes this is before section that refers to it, which could be confusing to the reader if they see a figure before even reading the material that refers to it. Is there anyway to (at least semi) control the placement of a figure? Note: I can kind of get it to work with wrapfigure because I can control where in the document it is place a little better...however, I don't want to wrap certain figures with text, so this solution doesn't seem like the best


title: How to place a float at the top of a floats-only page?

text: I just got a short algorithm on my page, and it keeps getting aligned at the center of the page. But I want to have it aligned at the top, what do I have to do?


title: Page Long Image keeps getting put at the end of the page!

text: > **Possible Duplicate:**   >  Keeping tables/figures close to where they are mentioned I have some text, then, one page long image, followed by a page long table, and another page of text. What latex keeps doing is - it puts all the text together, and image and table at the end of the document. Where as, I want them as specified in the code, with the flow! I have tried everything, h,t,p, ! etc.. kindly help.


title: Issues with images in latex

text: > **Possible Duplicate:**   >  How to influence the position of float environments like figure and table > in LaTeX?   >  Keeping tables/figures close to where they are mentioned I want to to show three plots in a page such that the first two plots are on one line and the third plot on the second. However, I am having some issues with the plot in latex. In my case, I am having the first two images in a row. Then I get the paragraph that was supposed to come after the three plots and then at the end the last plot. I thought it was because of the size of the plot. So, I tried to reduce the size to see if it makes a difference. But even if the size of the plots is so small that it can easily accommodate in the space occupied by the paragraph, it's still pushed down and comes after the paragraph. How can I fix this?               \begin{figure}[ht]     \begin{minipage}[b]{0.5\linewidth}     \centering     \includegraphics[scale=0.4]{a.jpg}     \caption{a}     \label{fig:a}     \end{minipage}     \begin{minipage}[b]{0.5\linewidth}     \centering     \includegraphics[scale=0.4]{b.jpg}     \caption{b}     \label{fig:b}     \end{minipage}     \end{figure}          \begin{figure}[ht]     \centering     \includegraphics[scale=0.4]{c.jpg}     \caption{c}     \label{fig:c}     \centering     \end{figure}          \subsection{Details}     About the details...........      Now the issue is the I have the first two images side by side and then I was expecting the third images but instead of that I have the subsection Details and the third image follows it


title: How to place floats after a section heading and how to place it before one?

text: > **Possible Duplicate:**   >  Keeping tables/figures close to where they are mentioned Is there a latex command that can be used to force floats to be positioned AFTER a specified section heading? And correspondingly, how to force floats to be positioned BEFORE a section heading?


title: Why does LaTeX mix up the order of my algorithms and other output?

text: > **Possible Duplicate:**   >  How to avoid splitting tables between sections I did something like this:               \documentclass{article}          \usepackage[T1]{fontenc}          \usepackage{algorithm}          \usepackage{algorithmic}          \usepackage{array}          \usepackage{eqparbox}          \usepackage[pdftex]{graphicx}          \pagestyle{headings}          \begin{document}     \begin{algorithm}            \begin{algorithmic}              algorithm goes here            \end{algorithmic}          \end{algorithm}          \begin{algorithm}            \begin{algorithmic}              algorithm goes here            \end{algorithmic}          \end{algorithm}          \section{test}          section contents.          \end{document}      When I render the PDF, the test section appears before the second algorithm, instead of after it. Isn't LaTeX supposed to render them in the above order?


title: Eps Position Problem

text: I am trying to put a graph inside my TeX file it somehow misses its original places and moves somewhere else. What can I do to fix it? Here is my code:               \documentclass{article}     \usepackage{paralist,pst-func, pst-plot, pst-math, pstricks-add,pgfplots}               \documentclass{article}     \usepackage{paralist,pst-func, pst-plot, pst-math, pstricks-add,pgfplots}          \begin{document}     TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST      \begin{figure}     \begin{center}         \advance\leftskip-3cm         \advance\rightskip-3cm         \includegraphics[width=300pt]{uniform.eps}         \caption{Mean Square Error calculated for different number of unlabeled $x$ values each in $300$ trials.}          \label{fig:MSE}     \end{center}     \end{figure}     TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST      \end{document}      The result is: ![enter image description here](http://i.stack.imgur.com/Ktp4Y.png)


title: Latex Figure Position

text: In latex, how can we ensure that a figure is placed nearest to the place where it was defined or before? The issue I'm getting is that sometimes many of many figures are getting on the same page which make it very confusing


title: Strange behaviour with figure on chapter first page

text: > **Possible Duplicate:**   >  How to influence the position of float environments like figure and table > in LaTeX? When I compile the following latex snippet:               \documentclass[11pt]{report}     \usepackage{graphicx}     \begin{document}     \tableofcontents     \chapter{1}     \begin{figure}         \centering             \includegraphics[width=1\textwidth]{Picture.PNG}         \caption{Plug-in Landing Page }         \label{fig:ASuRALP}     \end{figure}     \end{document}      I have a problem: The image is put to the next page. I have to reduce the size of the image a lot if I want it to fit in this chapter title page. The very strange behaviour that I observe is that at the human eye, the picture has clearly the place to fit into this first page, and if I put text instead of the picture, there is a lot of text that fits into the first page (a lot more than the picture size). Does anyone has an idea of the problem ?


title: Figure placement

text: How does one make a figure appear precisely where it is placed in the coding, as opposed to the top of the next page? This is an issue for me currently.


title: Why is the figure moving to a next page?

text: The first page of chapter is left blank, while the figure is drawn on the next page?               \chapter{Diagrams}               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \tikzset{user/.style={circle, inner sep=0pt, minimum size=0.6cm, fill=Cerulean, draw=none}}          \tikzset{usersAOI/.style={circle, inner sep=0pt, minimum size=5cm, fill=Bittersweet!30, draw=none}}               \tikzset{object/.style={inner sep=0pt, minimum width=0.4cm, minimum height=0.4cm, fill=WildStrawberry, draw=none}}          \begin{figure}     \begin{tikzpicture}          \node[usersAOI] at (5,6) {$A$};     \node[user] at (5,6) {$A$};     \node[user] at (7,6) {};     \node[user] at (6,4.5) {};     \node[object] at (6.5,5.5) {};     \node[object] at (5.2,4.5) {};          \node[user] at (6,1.5) {};          \node[user] at (8,3) {};     \node[user] at (10,3) {};     \node[object] at (9,3) {};          \node[user] at (10,7.5) {};     \node[user] at (12,7.5) {};     \node[user] at (10,6) {};     \node[user] at (12,6) {};     \node[user] at (11,7) {};     \node[object] at (11,6.2) {};          \node[user] at (15.5,6) {};     \node[draw,align=left] at (15.5,5) {zzzzzzzzzzzzzzz};     \node[object] at (15.5,4) {};     \node[draw,align=left] at (15.5,3) {iiiiiiiiiiii};     \draw (15.5,2) [fill=Bittersweet!30] circle (0.3cm);     \node[draw,align=left] at (15.5,1) {zzzzzzzzzzzzzzzzzz};               \end{tikzpicture}     \centering     \caption{uuuuuuuuuuuuuuuuuuuuuu}     \end{figure}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


title: inserting sentences between two graphs

text: > **Possible Duplicate:**   >  How to influence the position of float environments like figure and table > in LaTeX? Hello I am trying to write between two figures, but when I am entering a text between them in the code,everything goes on the top of the two figures,why?               \begin{figure}[h!]     \begin{center}     \setlength\fboxsep{5.5pt}     \setlength\fboxrule{0.5pt}     \includegraphics[width=80mm,height=70mm]{ZeroReserveGraph_France-Sweden_0,75.jpg}     \end{center}     \caption{Graph for France and Sweden with ratio (0.75).}     \label{zerocapitalFranceSweeden_0,75}     \end{figure}          \begin{figure}[h!]     \begin{center}     \setlength\fboxsep{5.5pt}     \setlength\fboxrule{0.5pt}     \includegraphics[width=80mm,height=70mm]{ZeroReserveGraph_France-Sweden_0,75.jpg}     \end{center}     \caption{Graph for France and Sweden with ratio (0.75).}     \label{zerocapitalFranceSweeden_0,75}     \end{figure}      Thanks..


title: Positioning tables inwithout default latex positioning mechanism

text: Hi I am querying about some suggestions regarding latex table placement. In m latex document I have an appendix section at the end of the paper. The appendix contains a couple of tables and a figure no text. I placed mu bibliography before the appendix. That was ok, but the guidelines suggests that I need to place the appendix before the bibliography. I did so, moved the appendix section before bibliography. But after that the default lace handling mechanism of latex is placing the tables and figures in the appendix in the midst of the references which is not desired. I just want them to appear after the references. How can I force that?


title: Inserted images come before text and code

text: I am typing up some loose ends in my LaTeX code, and I have come far with help from here. The last things I need help with are some formatting subtleties that I cannot solve. Basically, I am trying to figure out how to stop my images from coming _before_ my MATLAB code and text, when clearly it is coming after the MATLAB code/text in the `.tex` file.               \documentclass{article}     \usepackage[margin=0.75in]{geometry}     \usepackage{graphicx}     \usepackage{float}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{listings}     \PassOptionsToPackage{breakindent=0pt}{listings}     \usepackage[useliterate, autolinebreaks, framed]{mcode}     \usepackage{mcode}     \usepackage{flafter}     \makeatletter \def\lst@breakindent{0pt} \makeatother     \makeatletter \def\lst@prebreak{} \makeatother          \begin{document}                    \begin{figure}[htpb]         \centering         \begin{subfigure}{.5\textwidth}           \centering           \rule{2cm}{3cm}           \label{fig:sub1}         \end{subfigure}%         \begin{subfigure}{0.5\textwidth}           \centering           %\includegraphics[width=1.0\linewidth]{case2Black.png}           \rule{2cm}{3cm}           \label{fig:sub2}         \end{subfigure}         \caption{A figure with two subfigures}         \label{fig:test}     \end{figure}          This text comes before the MATLAB code.          \begin{lstlisting}          % Scanned Response Function (Spatial Frequency for linear array)          %This function will compute the spatial frequency response of a spatially sampled signal across a linear array. 'snapShots' is a matrix, where each column consists of one snapshot of the spacially sampled field. Now, each column is first shaded with a window, given my params.windowUsed. Then, each column is FFT'd, and fftShifted. Finally, the spatial frequency axis is then computed, based on whether we want the phi, k, u, or theta space.           function [sR, axisUsed, allAxes] = scannedResponse(snapShots, params)          %We perform an element by element multiply of each snapshot with the chosen window.     Xwindowed = params.windowUsed*ones(1,params.N.totalSnapShots) .* snapShots;          \end{lstlisting}               May musical arrival beloved luckily adapted him. Shyness mention married son she his started now. Rose if as past near were. To graceful he elegance oh moderate attended entrance pleasure. Vulgar saw fat sudden edward way played either. Thoughts smallest at or peculiar relation breeding produced an. At depart spirit on stairs. She the either are wisdom praise things she before. Be mother itself vanity favour do me of. Begin sex was power joy after had walls miles.           Up branch to easily missed by do. Admiration considered acceptance too led one melancholy expression. Are will took form the nor true. Winding enjoyed minuter her letters evident use eat colonel. He attacks observe mr cottage inquiry am examine gravity. Are dear but near left was. Year kept on over so as this of. She steepest doubtful betrayed formerly him. Active one called uneasy our seeing see cousin tastes its. Ye am it formed indeed agreed relied piqued.           May musical arrival beloved luckily adapted him. Shyness mention married son she his started now. Rose if as past near were. To graceful he elegance oh moderate attended entrance pleasure. Vulgar saw fat sudden edward way played either. Thoughts smallest at or peculiar relation breeding produced an. At depart spirit on stairs. She the either are wisdom praise things she before. Be mother itself vanity favour do me of. Begin sex was power joy after had walls miles.           Up branch to easily missed by do. Admiration considered acceptance too led one melancholy expression. Are will took form the nor true. Winding enjoyed minuter her letters evident use eat colonel. He attacks observe mr cottage inquiry am examine gravity. Are dear but near left was. Year kept on over so as this of. She steepest doubtful betrayed formerly him. Active one called uneasy our seeing see cousin tastes its. Ye am it formed indeed agreed relied piqued.           May musical arrival beloved luckily adapted him. Shyness mention married son she his started now. Rose if as past near were. To graceful he elegance oh moderate attended entrance pleasure. Vulgar saw fat sudden edward way played either. Thoughts smallest at or peculiar relation breeding produced an. At depart spirit on stairs. She the either are wisdom praise things she before. Be mother itself vanity favour do me of. Begin sex was power joy after had walls miles.           Up branch to easily missed by do. Admiration considered acceptance too led one melancholy expression. Are will took form the nor true. Winding enjoyed minuter her letters evident use eat colonel. He attacks observe mr cottage inquiry am examine gravity. Are dear but near left was. Year kept on over so as this of. She steepest doubtful betrayed formerly him. Active one called uneasy our seeing see cousin tastes its. Ye am it formed indeed agreed relied piqued.                $\theta = 0$          \begin{figure}[htpb]         \centering         \begin{subfigure}{.5\textwidth}           \centering           %\includegraphics[width=1.0\linewidth]{case2Rect.png}           \rule{2cm}{3cm}           \label{fig:sub1}         \end{subfigure}%         \begin{subfigure}{0.5\textwidth}           \centering             %  \includegraphics[width=1.0\linewidth]{case2Black.png}             \rule{2cm}{3cm}           \label{fig:sub2}         \end{subfigure}         \caption{A figure with two subfigures}         \label{fig:test}     \end{figure}          \end{document}      Anyway, what happens is that the images here come _before_ the texts/MATLAB, when in fact I want them to come _after_ the texts/MATLAB. How to remedy this?


title: Stubborn single image insists on getting its own page

text: Any ideas why this image (lower entry) gets its own picture while the other one (upper entry, not visible) does not? ![enter image description here](http://i.stack.imgur.com/isxS7.jpg) * * * Tried using scale=0.5 instead and it got inline instead. Probably some funky LaTeX thing going on with that it's on the end of the previous page otherwise.


title: Why when i insert a figure in a section and then move on to a new section do my figures not stay where they are suppose to be

text: This is about the 4th or 5th time i have encountered this. Im very new to latex but I'm growing tired of not understanding why this is happening I place a figure in document with the following code               \begin{figure}[h]     \subfloat{     \includegraphics[width=.7\textwidth]{currentdischarge}     }     \caption{Expected current discharge}     \end{figure}      Then i go and start a new section and continue on with my article               \section{blah blah}      I do a typeset to check my work and every single time my figures are no under my new section instead of where they are suppose to be! Someone please help! I spend more time fighting latex then i do actually working


title: algorithm2e problem

text: ## Source code I'm working on a LaTeX project which brings 5 files:   * `cassio.bib`: bibliography   * `comandos.tex`: a rich set of commands for easiness of typing   * `tg.tex`: document's source code   * `tg.pdf`: generated PDF   * `Makefile`: compilation tool To compile it, type `make tg.pdf` to generate `tg.pdf`. ## The problem I have a problem related to `algorithm` environment in `algorithm2e` package. Within `tg.pdf`, plase take a look at page _33_. This algorithm should be placed within section ( **5.2** ) (in the page _32_ ) and right before section ( **5.3** ). The corresponding code happens at line _1976_ in the `tg.tex` file. ## A similar problem A similar problem happens at `tg.pdf` (page 43). This algorithm and the subsequent text (Parte I: Apêndice) should be separated by a page break; i.e., they should _not_ appear in the same page. My goal is to force `algorithm` to be rendered in the order it is written in `tg.tex`. Could anyone help me figuring out where is the problem?


title: Staying on same page

text: this is my problem:               \section{Anhang}          \begin{figure}              \includegraphics{anderegraphen5,6-1.png}          \end{figure}      The figure will be on the next page, so that _Anhnag_ is the only word on the first page. How can I change that?


title: What is [htbp] used for?

text: When I try to input a macro for tables or figures, I usually get `[htbp]` beside the command... e.g.               \begin{table}[htbp]      What is the use of it? Can I remove it?


title: Issue with tabular environment

text: As I am currently tutoring a calculus student, I am creating a mock exam in LaTeX. I have a question concerning a portion of my code which I have displayed below, though, I do not know if displaying my code helps at all in any way. (See the very bottom of this post for my question.)               \textbf{Integral Identities} (and some more Derivative Identities)          Write the identities for the following indefinite integrals or derivatives in problems 5-10. In this section, you are encouraged to consult your textbook or any resource available. \textit{No work is required to be shown.}          Do not forget about the $+C$ which is required for indefinite integrals!          \begin{enumerate}     \item[5.] If $n$ is an integer, then $\displaystyle \int x^n \, dx=\begin{cases} \frac 1{n+1}x^{n+1}+C &\text{if }n \not= -1 \\ \ln|x|+C & \text{if }n = -1 \end{cases}$.           \textbf{Hint: }We must consider two cases here.     \begin{itemize}     \item If $n \not=1$, simply state the Anti-Power Rule, which is the exact opposite of the Power Rule which you saw in problem 1. Observe that the Anti-Power Rule does \textit{not} work if $n = -1$; try it anyway with $n=-1$ and you will see why it fails.      \item For the case of $n=-1$, refer to problem 4 for a hint. For whatever antiderivative you write in the second blank, place the absolute value bars around the $x$, like this: $|x|$. This is due to a mathematical technicality for the integration of $x^{-1}$.     \end{itemize}          \item[6.]  Evaluate: $\displaystyle \int e^x \, dx = e^x+C$.          \item[7.] What are the derivative identities for the following? You may wish consult your textbook as necessary. (Yes, part i. was shown already in problem 3.)     \begin{table}[h]     \centering     \begin{tabular}{ll}     i. $\displaystyle \frac d{dx}(\sin x) = \underline{\hspace{4cm}}$ & ii. $\displaystyle \frac d{dx}(\cos x) = \underline{\hspace{4cm}}$ \\     iii.  $\displaystyle \frac d{dx}(-\sin x) = \underline{\hspace{4cm}}$ & iv.  $\displaystyle \frac d{dx}(-\cos x) = \underline{\hspace{4cm}}$     \end{tabular}     \end{table}          \item[8.] What are the integral identities for the following? Use problem 7 for clues.     \begin{table}[h]     \centering     \begin{tabular}{ll}     i. $\displaystyle \int \sin x \, dx  = \underline{\hspace{4cm}}$ & ii. $\displaystyle \int \cos x \, dx = \underline{\hspace{4cm}}$ \\     iii.  $\displaystyle \int -\sin x \, dx = \underline{\hspace{4cm}}$ & iv.  $\displaystyle \int -\cos x \, dx = \underline{\hspace{4cm}}$     \end{tabular}     \end{table}          \item[9.] What are the derivative identities for the following?     \begin{table}[h]     \centering     \begin{tabular}{ll}     i. $\displaystyle \frac d{dx}(\tan x) = \underline{\hspace{4cm}}$ & ii. $\displaystyle \frac d{dx}(\cot x) = \underline{\hspace{4cm}}$ \\     iii.  $\displaystyle \frac d{dx}(\csc x) = \underline{\hspace{4cm}}$ & iv.  $\displaystyle \frac d{dx}(\sec x) = \underline{\hspace{4cm}}$     \end{tabular}     \end{table}          \item[10.] What are the integral identities for the following?           \begin{table}[h]     \centering     \begin{tabular}{ll}     i. $\displaystyle \int \tan x \, dx  = \underline{\hspace{4cm}}$ & ii. $\displaystyle \int \cot x \, dx) = \underline{\hspace{4cm}}$ \\     iii.  $\displaystyle \int \csc x \, dx = \underline{\hspace{4cm}}$ & iv.  $\displaystyle \int \sec x \, dx = \underline{\hspace{4cm}}$     \end{tabular}     \end{table}          \item[11.] Write the formula for this integral: $\displaystyle \int \ln x \, dx=         \underline{\hspace{4cm}}$. Use your textbook or some other resource if needed. (I probably     said this enough already, haven't I? :D)          \end{enumerate}          \newpage      I want the tables to correspond with my question numbers 7,8,9,10 respectively. The table for my question #10 is being stupid, and that table of integrals is instead outputted to the next page. Any possible reason why this is happening? As in, why is this table not appearing below question #10 as I wanted? I am so confused right now.


title: control figure & table placement - specific case

text: Attached an image of my document output. Notice the last page (bottom-right) is almost empty and contains only a small table. The document continues after this page for a few more pages of text. I would like to have this table in the bottom of the second (top-right) page, and it seems to fit there pretty nicely (with paint...) I've tried playing around with the placement options [!htbp], and moving the table to different locations in the .tex file but couldn't get it to work. Any ideas how to accomplish this? (a minimal working example would not be so minimal in this case...) ![enter image description here](http://i.stack.imgur.com/QpAz3.png)


title: Insert image in latex

text: > **Possible Duplicate:**   >  Force figure placement in text Hi! I'm trying to insert an image in latex with some text around:               Here is our image:          \begin{figure}[h!]         \centering         \includegraphics[width=0.5\textwidth]{idefA0.jpg}         \caption{IDEF0}          \end{figure}      Here is some text!      I'd like to insert image and 'Here is some image' on the same page, but when i'm trying to compile pdf I get: `Warning! !h changed to !ht` and places an image on the next page, and `here is some text` goes right after `Here is some image`


title: Table coming before appendix despite being placed in appendix section

text: I am looking to have a table as the first item in my appendix but when the file is built the table is coming above the appendix. So it builds as: Table Appendix Title Appendix A Where I want: Appendix Title Appendix A Table My code:               \section*{Appendix}     \appendix     \section{Dissemination Opportunities}     \begin{table}     \caption{Conferences}     \begin{tabular}{|p{17cm}|}       \hline       AMBIENT - The Fourth International Conference on Ambient Computing, Applications, Services and Technologies. \\       \hline       BHI - International Conference on Biomedical and Health Informatics. \\       \hline       CBMS - International Symposium on Computer Based Medical Systems. \\       \hline       Pervasive Health - International Conference on Pervasive Computing Technologies for Healthcare. \\       \hline     \end{tabular}     \end{table}


title: Figures not showing where expected

text: > **Possible Duplicate:**   >  Force figure placement in text I have a a document and I'm inserting .png images but they are not shown where I want them. How do I fix this? E.G.               \documentclass{report}         \usepackage[pdftex]{graphicx}     \begin{document}     \section{Section 1}     \begin{figure}     \begin{center}     \includegraphics[scale  = 0.5]{Andromeda Galaxy.jpg}     \end{center}     \end{figure}     \section{Section 2}     Text     \end{document}      Result: ![](http://i.stack.imgur.com/Nfn2C.png)


title: Cannot get my figure placed at the right spot

text: Although I use the option [H] or small case analogue of it [h], my figure is placed separately from the text how can I solve this issue? I tried to provide a minimal working example but this may not illustrate my problem since the document is much more complex than this cut-down version. The minimal working example is:               \documentclass[11pt]{article}     \usepackage[utf8]{inputenc}     \usepackage[a4paper]{geometry}     \usepackage{graphicx}     \begin{document}     \subsection{Soliton Evolution}     We begin our analysis by simulating the evolution of a third order soliton in the PCF Thorlabs NL-PM 750. This procedure of investigating soliton evolution is usually employed to test the accuracy of the code since solitons are analytical solutions of the NLSE, that is Eq.(\ref{eq:NLSE}).\cite{3} In order to conform with the analysis in the thesis and the article by the Dudley group we select the parameters corresponding to a third order soliton in our fiber\cite{thesis, 6}:     \begin{equation}     \begin{split}     L_D &= \frac{T_{0}^{2}}{|\beta_2|}= 0.158242\ \si{\meter}\\     L_{NL}&=(\gamma P_0)^{-1}= 0.017602\ \si{\meter} \\     P_0& = 598\ \si{\watt} \\     N &= [L_D / L_{NL}]^{1/2} \cong 3 \\     Z_{soliton}&=(\frac{\pi}{2})L_D= 0.248566 \ \si{\meter}     \end{split}     \end{equation}     \begin{figure}[H]\capstart         \centering         \includegraphics[scale=0.5]{SolitonEvolution(3rdOrder).jpg}         \caption{The evolution of a third order soliton with the central wavelength of 790 \si{\nano\meter}.}         \includegraphics[scale=0.5]{SolitonEvolution(3rdOrder)Solperiod.jpg}         \caption{The same soliton with the length scale expressed in terms of the soliton period.}     \end{figure}     \subsection{Soliton Fission}     When we introduce the Raman scattering into the NLSE by modifying it as follows:     The parameters selected correspond to a third order soliton and is the same as before.     \end{document}


title: Image positioning problems

text: > **Possible Duplicate:**   >  Keeping tables/figures close to where they are mentioned I'm having troubles positioning some images. Some appear where i want them to, others appear right at the end of the document.               \begin{figure}[h]      \centering      \includegraphics[width=0.8\textwidth]{images/cleanity.jpg}\\      \caption{Rapid Application Development (RAD) Model}\label{fig:sift_ex}     \end{figure}      I have a bunch of subheadings and my bibliography after this code, but the image appears after. What am i doing wrong?


title: Figures won't stay where they should using LaTex

text: I'm using TeXnic Center, but I'm having an issue with getting my figures where I want them. I've used [h!] etc but when I write something else it will put it before and partially after my figures, i.e. not where I want it. Is there a way I can ensure my text is where I want it?


title: Image is not in the right position

text: > **Possible Duplicate:**   >  Keeping tables/figures close to where they are mentioned Why does the image is not at the point where I included it in the code, but at the end of the part?               \documentclass[11pt]{article}     \usepackage{graphicx}     \usepackage{hyperref}          \title{"Morel Upsim"}     \author{"Vorname Nachname"}          \begin{document}     \maketitle          \begin{figure}         \includegraphics[scale=0.5]{gradient.jpg} %I also tried [h] and [!ht]     \end{figure}          \part{"Generated text"}          From a bird flew open space\ldots you what with a muffled drone. - Look, - Missiles? Don't Panic inscribed in a page for good place then? Ford was because it was all the greatest computer that they said. - said Trillian from the inside of supplies slight cough, - said Arthur, rather involved being a which Ford carried round a house. Chapter 14 The aircar trip brought other mouse said, and the Vl'hurgs, resplendent in considerable stress, ulcers and Damogran Arthur found himself out of its          olive. Drink\ldots but\ldots very much. As a thoroughly squalid. At kids at Arthur. - Well, you the bar, - the wide and it were coordinates gabbleblotchits the Galaxy isn't it? - it from Ford. - It's gold, - As the screens again muttering incoherently. - a moment, - said Trillian. - That's it! The almost the water spout. Up, up nothing. So if making fun of but he to reassure. - said Deep Thought. - asked plaintively. Ford Prefect, - Shhh, - Appropriate time? - he yelped. -          traditional due Slartibartfast turned speech and it seemed to ethics who now it had settled now that Zaphod and it had been there. It's more seconds. - there wouldn't be the local Bugblatter down it occurs to program in chorus. Deep Thought. - he's\ldots - as the Great And to the eye Phouchg flinging will finally stopped talking about the and the other what to the rubble that won't enjoy doing it? - Dunno, - What's my home of flying saucer at the computer.          whom the trading scouts. Ford Prefect life far the into hyperspace for him, - said forget up, wrote it new I speak Vogon! - Yes. - Though I doing now, and dried before contact yet I beg your planet you see. Ford and disappeared and a have to be telling people out because Reason was out it was almost, but it was the square of her with you? - urged Loonquawl. - Telephone number? - The Hitch Hiker's Guide to trim it tends turning          swift burst out of it stared into one ever since be aware, the captain didn't matter that anyway, you really was just very moment and woken him to the light around in its through the biros brave man big and took him blankly in marble-topped tables and Marvin and know little piggy forehead. decides electric death at the salient points of thing they still engrossed in your white and started winking in Improbability of all with of a figurehead - Oh, just gaped.               \end{document}


title: Figure section including image goes above the section definition

text: Trying to use the following code:               \subsection {Shop}          \begin{figure}         \makebox[\textwidth][c]{         \includegraphics[scale=0.65]{shop.png}         }         \caption{Shop Tab}     \label{fig:shopTab}     \end{figure}      The image supposed to go after the section in the PDF file created, something like:   1. Shop image But it goes above the Shop section. What is the problem here? I am using that kind of figure construction (with makebox) because otherwise image is too small or doesn't fit the page (because of shift to the right, it is not aligned to the left).


title: Place image in top of page of book document

text: I need to place an Image in top of book document. But thats image still placed in center document. This is my code:               \documentclass[oneside,a4paper  , 12 pt]{book}          \usepackage{graphicx}     \usepackage{caption}     %\usepackage{package}     \usepackage[space]{grffile}          \begin{document}     \begin{figure}[t!]     \centering     \includegraphics[width=0.7\linewidth]{E:/gambar tesis/variasi/9-2-10-cheek-kiss}     \caption{}     \label{fig:9-2-10-cheek-kiss}     \end{figure}          \end{document}


title: Force figure placement in text

text: I have a problem when a lot of figures are in question. Some figures tend to "fly around", that is, be a paragraph below, although I placed them before that paragraph. I use code:               \begin{figure}[ht]     \begin{center}     \advance\leftskip-3cm     \advance\rightskip-3cm     \includegraphics[keepaspectratio=true,scale=0.6]{slike/visina8}     \caption{}     \label{visina8}     \end{center}\end{figure}      to place my figures. How can I tell latex I REALLY want the figure in that specific place, no matter how much whitespace will be left? Also, for the same reason I believe, `\newpage` doesn't work :( I put it before a `\subsection`, but it remains on current page...


title: Table showing on new page

text: > **Possible Duplicate:**   >  Keeping tables/figures close to where they are mentioned I have the following problem, I started a new section with appendix and I put a few tables there. But tables are not displayed right after heading but there are displaying from some reason on the new page               \subsection{Datové slovníky}          Zde se nacházejí datové slovníky ke všem tabulkám v databázi.     \nopagebreak     %this table is displayed on the new page     \begin{table}         \small\addtolength{\tabcolsep}{-3pt}                 \centering         \caption{Datový slovník tabulky Project}         \begin{tabular}{|c|c|c|c|c|c|c|}         \hline         Název & Typ & Velikost & Klíč & Index & Null & Popis \\         \hline         id & integer & - & Ano & Ano & Ne & ID projektu \\         \hline         name & varchar & 100 & Ne & Ne & Ne & Název projektu \\        \end{tabular}        \label{fig:project}     \end{table}      I really cant figure this out, table is nor too wide or high, so I dont get it. I am using document class defined by my university teacher (I am writing bachelor thesis)


title: Inserted figure is appearing later than it should in when compiled to pdf

text: > **Possible Duplicate:**   >  How to influence the position of float environments like figure and table > in LaTeX? I have two sections in my document: `sectionA` and `sectionB`. The code for the document is something like this:               \begin{document}     \section{sectionA}              some text              \begin{figure}             \centering             \includegraphics[scale=0.3]{pic.ps}             \caption{caption}         \end{figure}              some more text          \section{sectionB}              even more text          \end{document}      However, `sectionB` is showing BEFORE the figure is displayed. In practice `sectionA` contains more text and is almost a full page, so I'm guessing LaTeX is placing the figure on the other page, seeing some empty space after `sectionA` and placing `sectionB` there. How can I fix this? I would rather have `B` start after my figure, regardless of its size. I've already tried `\begin{figure}[h!]`


title: Avoid repeating [hbt] and \centering for every table

text: In a document I'm writing, I'm using the familiar `[hbt]` option for my floating tables, and I center them. I'd like to avoid repeating that every time I'm creating a table. I assume it's easy to add something in my preamble that makes sure that these two options are used every time I begin a new `table` environment?               \documentclass{article}     \begin{document}     \begin{table}[hbt]     \centering     \begin{tabular}{*3{l}}     1 & 2 & 3\\     a & b & c\\     \end{tabular}     \end{table}     \end{document}


title: Why are my images not shown where I've inserted them in my .tex file?

text: > **Possible Duplicates:** > >   * How to influence the position of float environments like figure and > table in LaTeX? >   * Keeping tables/figures close to where they are mentioned > This is my document:               \documentclass[letterpaper]{article}     \usepackage{graphicx}     \usepackage{subfig}     \usepackage{times}     \usepackage{helvet}     \usepackage{courier}     \title{This is my title}     \author{elcodedocle}     \setcounter{secnumdepth}{0}          \begin{document}     \setlength{\parskip}{10pt}     \maketitle     \section{This is my section}          \paragraph{Hello}          \lipsum          \begin{figure}[h!]         \centering             \includegraphics[width=0.50\textwidth]{thisismyimage.jpeg}         \label{fig:Fig 1}         \caption{This is my image.}     \end{figure}          \lipsum          \begin{figure}[h!]         \centering             \includegraphics[width=0.50\textwidth]{thisisanotherimage.jpeg}         \label{fig:Fig 2}         \caption{This is another image.}     \end{figure}          \lipsum          \begin{figure}[h!]         \centering             \includegraphics[width=0.50\textwidth]{thisisanotherimage2.jpeg}         \label{fig:Fig 3}         \caption{This is another image 2.}     \end{figure}      Can you tell me why my images don't show right after the first paragraph?


title: Aligning pictures for thesis/ report

text: At the moment, I am writing the thesis and I am leaving the figures to position themselves freely without forcing it with `here 'h'` option in `\begin{figure}`. This leaves the figure/plots prioritized to be on top of the page automatically. This sometimes puts the figure before its actual subsection (picture at top of page and the start of subsection at bottom). Is it the normal way that I should leave latex to decide or should I have to force the figure positions by using `h` option. Which is the better way of presenting?


title: Figure environment help

text: I have added an pdf image using the `figure` environment, but I have noticed that the figure is located automatically by LaTeX, at the beginning of the page, so if I change the text it can be out of phase. Is there a way to choose the location of the figure manually?


title: Why the order of \inputs is wrong at my final pdf?

text: > **Possible Duplicates:**   >  How to influence the position of float environments like figure and table > in LaTeX?   >  Keeping tables/figures close to where they are mentioned I have a simple single column scientific paper. The structure goes like this:               \begin{document}     \input{content}     \input{references}     \end{document}      the `references.tex` is this:               \bibliography{bibliography}     \bibliographystyle{plain}      The problem is that in the end of the content there are two tables and when I use `latextopdf` converter I have a PDF where in the end there are the references then one table then the rest of the references and then the other table. Why is that happening?


title: How to get a table in the Correct Place with LaTeX

text: Hi I am using LaTeX through no choice of my own. I thought I had just gotten used to it and then it starts messing around with me. My out put is to a PDF document. I am trying to add 6 tables to the Appendix of my Document here is my code.               \section{Appendix}          \subsection{Project 1}     \begin{table}[h!]     \centering     \renewcommand{\arraystretch}{1.5}     \caption{Description of the Project}     \begin{tabular}{p{4cm}|p{4cm}}        What Is the Size of the Project? & Large \\        Who are the Stakeholders Involved? &         \begin{enumerate}         \item Business Analyst         \item Business Owner         \item Developer     \end{enumerate}\\            What Is the Main Form of Communication for the Team? & Verbal \\         Is the Team Located Across Multiple Sites? & Yes \\         Will the Project be Handed Over to a Different Team Upon Completion? & No \\         What Stage will the Project be in Upon Completion? & Next Stage \\     \end{tabular}       \label{tab:myfirsttable}     \end{table}          \begin{table}[h!]     \centering     \renewcommand{\arraystretch}{1.5}     \caption{Recommended Portfolio}     \begin{tabular}{p{4cm}|p{4cm}}       Maintained Portfolio & Recommended Portfolio \\       \hline         \end{tabular}       \label{tab:myfirsttable}     \end{table}          \subsection{Protect 2}     \begin{table}[h!]     \centering     \renewcommand{\arraystretch}{1.5}       \caption{Description of the Project}     \begin{tabular}{p{4cm}|p{4cm}}       What Is the Size of the Project? & Small \\       Who are the Stakeholders Involved? &        \begin{enumerate}         \item Database Modeller         \item Business Analyst         \item Business Owner         \item Scrum Master         \item Tester         \item Developer       \end{enumerate}\\         What Is the Main Form of Communication for the Team? & Verbal \\         Is the Team Located Across Multiple Sites? & No \\         Will the Project be Handed Over to a Different Team Upon Completion? & No \\         What Stage will the Project be in Upon Completion? & Next Stage \\       \end{tabular}       \label{tab:hresult}     \end{table}           \begin{table}[h!]      \centering      \renewcommand{\arraystretch}{1.5}      \caption{Recommended Portfolio}      \begin{tabular}{p{4cm}|p{4cm}}         Maintained Portfolio & Recommended Portfolio \\         \hline           \end{tabular}         \label{tab:myfirsttable}     \end{table}          \bibliographystyle{abbrv}     \bibliography{paper}          \end{document}      There is a 3rd Section that is laid out the same. The second and third table are created in the middle of my references. I have tried going through each of the tables line by line to debug it but they seem to break as I add in rows. I have tried using `[h]`, `[H]` and `[h!]` but none of these have helped. In fact `[H]` broke the first 2 table also. The tables are in my TeX file in the place that I want them to generate.


title: How to unfloat a table or figure enviroment

text: Someone knows how to "unfloat" a table or figure enviroments. I mean, I want to put a float enviroment after a specified paragraph. I need some help.


title: Huge algorithm taking up space

text: I have an algorithm description that takes up an entire image. However, when compiling my latex document, the algorithm and subsequent images following it are pushed to the end of the document. I don't mind the size of the algorithm, but I would like to put in the page immediately preceding the page having the description or after. Any suggestions? I have tried [!h] as suggested in some other related post. But it does not help.


title: Problem in code for inserting the Figures and Tables in top of next page

text: > **Possible Duplicate:**   >  How to influence the position of float environments like figure and table > in LaTeX? How I can set up the figure and tables to capture them in the next page. I have a problem in inserting the figure. I have referenced the figure but it has appeared before the specified place. I would like to revise the code in a way that figures appear in a next top part of page. Code:               \begin{figure}         \centering             \includegraphics[width=0.9\textwidth]{C:/Thesis/Latex/thesis_1(1)/Figures/studyArea.jpg}             \rule{35em}{0.3pt}         \caption{The Grand St. Bernard wireless sensor network deployment (a) the coordinates of nodes according to the Swiss coordinate system (b) the distribution of the nodes in the study site \citep{r33}}         \label{fig:study area}     \end{figure}


title: Add figure after paragraph with no text interruption

text: > **Possible Duplicate:**   >  Keeping tables/figures close to where they are mentioned   >  How to influence the position of float environments like figure and table > in LaTeX? Is it possible to add picture figure after paragraph ending (not to interrupt paragraph text). I have figure that will be wrapped with text and move to the next page if it can't be suited (not enought space) on previous page. But in that case paragraph will be interrupted with figure.               \par Some text.. Paragraph ended here.          \begin{figure}[!ht]     \centering         \includegraphics[width=0.5\textwidth]{pic.png}         \captionof{figure}{title}\label{pic:picture}     \end{figure}          \par New paragraph started here. text Some text.....      Current state is: ![Current state is:](http://i.stack.imgur.com/3uMJ0.png) Want to have next with LaTex: ![Want to have next with LaTex:](http://i.stack.imgur.com/GHXxB.png)


title: Placing the figure exactly at the top of the page in Latex

text: I have a problem in placing a picture into a page. I used a simple code as below:               \begin{figure}[t!]       \centering       \includegraphics[keepaspectratio, width=0.6\textwidth]{./pics/5_11}       \caption{Number of RSUs that each vehicle has encountered}          \label{fig:RSUencountered}      \end{figure}      The problem is that the picture is placed exactly in the middle, although I used position specifier (t!). How can I instruct the latex to put the picture at the top of the page. BTW: this picture is the only element in the page.


title: Preparing a report but sections are twisted

text: I'm on a Mac (10.8.2) running with the latest TeX Live from MacPorts working with the latest TexShop. As stated above my sections are twisted, meaning I've a section for the table and one for the image but both are not shown as expected from their source position... Here's my minimal example:               \documentclass[pdftex,12pt,a4paper,oneside,german]{scrreprt}     %\documentclass{minimal}          \usepackage[utf8]{inputenc} % Deutsche Umlaute im Quelltext     \usepackage[ngerman]{babel}   % Deutsche Trennregeln     \usepackage{fixltx2e}         % Ein paar Korrekturen zu Latex2e     \usepackage[T1]{fontenc}     \usepackage{textcomp}         % Zugriff auf Textsymbole ermöglichen     \usepackage{uarial}     \renewcommand{\familydefault}{\sfdefault}     \usepackage{booktabs}     \usepackage{tabularx}         % Dynamische Tabelle - Breite wird angegeben und Spalten skalieren selbst     \usepackage{pgfplotstable}               \begin{document}     \chapter{Aufstellung der Liegenschaften}     \section{Standort 1}     \subsection{Lageplan der Gebäude}          \begin{figure}[H]     \begin{center}     \includegraphics[scale=.82]{test_lageplan}     \end{center}     \caption{Lageplan der Gebäude} %"http://de.wikipedia.org/wiki/Lageplan_(Straßenentwurf)"     \end{figure}          \pagebreak     \subsection{Aufstellung der Gebäude}          \begin{table}     \label{tab-02}     \pgfplotstabletypeset[         col sep=semicolon,         string type,     %   columns={messtyp,adresse,ort,kwh},         columns/Gebäude/.style={column name=\textbf{Gebäude}, column type={|c}},         columns/Anschrift/.style={column name=\textbf{Anschrift}, column type={|l|}},         every head row/.style={before row=\hline,after row=\hline},         every last row/.style={after row=\hline},         ]{test_objekte.csv}     \caption{Aufstellung der Gebäude}     \end{table}     \end{document}      The CSV looks like this:               Gebäude;Anschrift     A;Musterstr. 1     B;Karlstr. 2     C;Napstr. 3      I hope you have a hint for me!


title: Prevent listings grouping together

text: > **Possible Duplicate:**   >  Keeping tables/figures close to where they are mentioned I'm writing a document with a large number of code listings. Most of the time I want them to be shown on the page where I write them in the markup so I declare them like this:               \begin{listing}[h]       % content     \end{listing}      However, when I have a few on the same page, although separated by text, latex decides to group them together, resulting in a single page of nothing but listings. How can I prevent this behaviour and get them to appear where I place them?


title: LaTeX figure rendering incorrectly

text: > **Possible Duplicate:**   >  Keeping tables/figures close to where they are mentioned The following code:               \clearpage     \section{Section 1.2}          This is a paragraph.          The details page should look like the following:          \begin{figure}         \centering         \includegraphics[width=5.5in]{resources/fig1.5.png}         \caption{Figure 1.5}     \end{figure}      Is producing the following output: ![Output](http://i.stack.imgur.com/wG69y.png) As you can see, the figure is displaying above the text. My intention is for the figure to come below the text. How can I force this behavior? I put the `\clearpage` command at the top because otherwise the Section 1.2 heading was appearing at the bottom of the previous page with the text and figure following on the next page (which I did not want). In case it is relevant, I am using `\documentclass{book}`.


title: algorithmic, text after algorithm appears before it

text: > **Possible Duplicate:**   >  How to influence the position of float environments like figure and table > in LaTeX? I am using `algorithmic` package. I have description of an algorithm in `\begin{algorithm} ... \end{algorithm}`, and I have text before it. However, the text appears after algorithm in the pdf. Why does it happen? and how to fix it? thanks.


title: How to put paragraph after a figure in latex?

text: I want to put a paragraph after an image but latex always put the paragraph before the image. how can I do it? Thank you.


title: How to fix the the position of figures in latex?

text: I have a list and I want to display a figure after each list item. I get first two figures correctly, but not the last two. Here is my code:               \begin{enumerate}[leftmargin=0cm,itemindent=.5cm,labelwidth=\itemindent,labelsep=0cm,align=left]     \item     \textbf {Chi-squared distance :} The chi squared distance measures the distance between two histograms having identical bins (16 bins along each dimension). Moreover, both histograms are normalized, i.e. their entries sum up to one. The distance measure $\bf d$ is usually defined (although alternative definitions exist) as \[ d(H_1,H_2) =  \Sigma \frac{ (H_1(I)-H_2(I))^{2} }{ (H_1(I)+H_2(I)) }\]The name of the distance is derived from Pearson's chi squared test statistic $ X^{2} (x,y) = \Sigma( (x_i-y_i)^{2} / x_i)$ for comparing discrete probability distributions (i.e histograms). However, unlike the test statistic, $d(H_1,H_2)$ is symmetric wrt. $H_1$ and $H_2$. The histograms obtained for superpixels are very sparse and only bins with non-zero entries in atleast one of the two histograms are considered. Thus, the bins with zero entries in both  $H_1$ and $H_2$ histograms are discarded. An example of obtained chi-squared distance values is as follows:     \begin{figure}[!h]     \centering     \includegraphics [width=90mm]{chi_sqr.png}     \caption{Variation of chi squared distance for a superpixel over consecutive image frames}     \end{figure}          \item     \textbf{Correlation :} Here, the correlation or similarity between two histograms having identical bins is calculated. A higher value of correlation indicates more similarity and thus similar labels. If the correlation value for a superpixel drops below a certain threshold, a new label should be assigned to that superpixel. Correlation is calculated using \[ d(H_1,H_2) =   \frac{ \Sigma_I (H_1(I)-\overline H_1)(H_2(I)-\overline H_2) }{\sqrt{ \Sigma_I (H_1(I)-\overline H_1)^{2}\Sigma_I (H_2(I)-\overline H_2)^{2}} }\] where \[ \overline H_k = \frac{1}{N}\Sigma_j H_k(j)\]     \begin{figure}[!h]     \centering     \includegraphics [width=90mm]{correl.png}     \caption{Correlation values for a superpixel over consecutive image frames}     \end{figure}          \item     \textbf{Mean squared distance :} MS distance is the sum of the squared differences of the histogram bins. It is computed as follows: \[ d(H_1, H_2) = \Sigma_I (H_1(I) - H_2(I))^2\]     \begin{figure}[!h]     \centering     \includegraphics [width=90mm]{mse.png}     \caption{Variation of mean squared distance for a superpixel over consecutive image frames}     \end{figure}          \item     \textbf{Average Color :} Here, the average color of the region enclosed by each superpixel is computed. For LAB input image, avergae color is caluclated for each channel (L, A, B) separately. The color difference between superpixels in different frames, $d(F_1, F_2)$ is obtained  using \[d(F_1, F_2) = (L_{F_1} - L_{F_2})^2 + (A_{F_1} - A_{F_2})^2 + (B_{F_1} - B_{F_2})^2\]     \begin{figure}[!h]     \centering     \includegraphics [width=90mm]{avg_color.png}     \caption{Variation of average color difference for a superpixel over consecutive image frames}     \end{figure}          \end{enumerate}      Please tell me how to get my figures at the positions specified in the code.


title: LaTeX placing figures in bibliography

text: > **Possible Duplicate:**   >  Keeping tables/figures close to where they are mentioned I am assigning a couple of figures near the end of my document, and it is placing them in the middle of my bibliography instead of in the main text. How do I stop this? I'm currently typing:               \begin{figure}[h]         \centering             \includegraphics[scale=0.75]{some_img} \\             \caption {A caption goes here}     \end{figure}


title: How to bind figure (table) to a section?

text: > **Possible Duplicates:**   >  How to avoid splitting tables between sections   >  How do I ensure that figures appear in the section they're associated with? I have the following problem: when I compile a document with text enclosed within a `\begin{table}...\end{table}` statement it compiles fine but sometimes the Table moves into the previous section. Can I prevent tabular from moving floating environment within the document?


title: Formatting images

text: I'm writing up an assignment for a human biology project at the moment, and have found a very strange formatting glitch that happens whenever I try to type in my document. The issue is, I had my images set up right, however, whenever I type a new paragraph in, all the images get sent down to the bottom of the document, my theory is that because I'm writing more, they get pushed off the page and then to the next available space. However, although the images get pushed down, text does not, so the images are not aligning with the paragraphs that are meant to be describing them. Is there a way to fix this? Here is the code I've used:               \documentclass[12pt, a4paper]{report}     \usepackage{setspace}     \usepackage{graphicx}          \begin{document}          \title{\textbf{Duchenne Muscular Dystrophy}}          \author{xxxxx\\         Year xx,\\         xxxxxxx\\}          \date{\today}          \null  % Empty line     \nointerlineskip  % No skip for prev line     \vfill     \let\snewpage \newpage     \let\newpage \relax     \maketitle     \let \newpage \snewpage     \vfill      \break % page break      And then there are some paragraphs and stuff, then this:               Key:     \begin{itemize}     \item D - Normal Gene     \item d - Duchenne Gene     \end{itemize}          \begin{figure}[ht!]     \centering     \includegraphics[width=70mm, scale=0.5]{punnett.jpg}     \label{overflow}     \end{figure}          From this figure, it is shown that there is a 1 in 4 chance (25\%) of a child having DMD,      and that this child will be male (0\% chance for a girl to have DMD in this case).          In another example, the potential offspring are shown in a case where the father does have     DMD, and the mother has no history of DMD in her family:     \begin{figure}[ht!]     \centering     \includegraphics[width=70mm, scale=0.5]{punnetmale.jpg}     \label{overflow}     \end{figure}          As the mother is homozygous for the normal gene, there is no possibility of offspring     having DMD. This is indicative that this trait is x-linked recessive. Despite these punnett     squares only showing possibilities of inheriting the disorder in males, there is a small chance that female offspring can obtain DMD, as shown in the punnett square for a male with DMD, and a female carrier:      By the way, for some reason those two lines where the sentence seems to break mid-way is because it gets cut off when I try to put it on this forum, but anyway, there's the issue, the code looked fine to me and there are no errors, but visually the images get pushed way out of place. Any ideas? Thanks


title: Turning automatic placing of tables/figures off

text: I have noticed that table or figure is sometimes (I haven't figured the pattern yet) automatically placed before its reference, regardless of the code and `[!h]` (or `[!ht]`). Is it possible to turn this off? Better said, can I stop LaTeX playing with MY figures and tables (and do everything manually)?


title: figures and tables in appendix

text: > **Possible Duplicate:**   >  Keeping tables/figures close to where they are mentioned   >  How to influence the position of float environments like figure and table > in LaTeX? I have an appendix in my document consisting of sections named figures, tables before some sections containing text. In the compiled output, I am getting undesired output. The section title does not start where I would like it to be (at the beginning of the first table). It starts after 2 tables. When I was making an MWE I encountered a couple of strange behaviours. See for yourself. Save a random figure as figure1.png. Though the figure is correct, the output is different depending on whether you type figure1.png or figure.png. The output is still different if you add some sections containing just texts/or remove the textual sections from my example. I would also like my third tabular environment be a table. Please tell me how               \documentclass{article}[12pt] %     \usepackage[capposition=top]{floatrow}     \usepackage{booktabs}% http://ctan.org/pkg/booktabs     \usepackage{array}% http://ctan.org/pkg/array     \usepackage{tabularx}% http://ctan.org/pkg/tabularx     \usepackage{calc}     \usepackage{amsmath}%     \usepackage{amsfonts}%     \usepackage{amssymb}%     \usepackage{graphicx}     \usepackage{breqn}     \usepackage{verbatim}     %\usepackage{biblatex}     \usepackage{apacite}          %-------------------------------------------     \newtheorem{theorem}{Theorem}     \newtheorem{acknowledgement}[theorem]{Acknowledgement}     \newtheorem{algorithm}[theorem]{Algorithm}     \newtheorem{axiom}[theorem]{Axiom}     \newtheorem{case}[theorem]{Case}     \newtheorem{claim}[theorem]{Claim}     \newtheorem{conclusion}[theorem]{Conclusion}     \newtheorem{conjecture}[theorem]{Conjecture}     \newtheorem{corollary}[theorem]{Corollary}     \newtheorem{criterion}[theorem]{Criterion}     \newtheorem{definition}[theorem]{Definition}     \newtheorem{example}[theorem]{Example}     \newtheorem{exercise}[theorem]{Exercise}     \newtheorem{lemma}[theorem]{Lemma}     \newtheorem{notation}[theorem]{Notation}     \newtheorem{problem}[theorem]{Problem}     \newtheorem{proposition}[theorem]{Proposition}     \newtheorem{remark}[theorem]{Remark}     \newtheorem{solution}[theorem]{Solution}     \newtheorem{summary}[theorem]{Summary}     \newenvironment{proof}[1][Proof]{\textbf{#1.} }{\ \rule{0.5em}{0.5em}}     \linespread{1.3}     \setlength{\pdfpagewidth}{8.5in} \setlength{\pdfpageheight}{11in}               \begin{document}          \appendix          \section{Figures}          \begin{figure}[h]             \caption{Spatial coverage of all events of PRIO'S Urban Social Disturbance in Asia and Africa dataset}         \includegraphics[width=0.80\textwidth]{figure1.png}            \floatfoot{Note: The intensity of the shade indicates the number of events over the period 1990-2010.}             \end{figure}                         \section{Tables}               % Table generated by Excel2LaTeX from sheet 'Sheet1'     \begin{table}[htbp]       \caption{Variable sources and features}       \noindent\hspace*{-1cm}\begin{tabularx}{\textwidth+2cm}{     >{\raggedleft\arraybackslash\advance\hsize1em}X     >{\raggedright\arraybackslash\advance\hsize1em }X     >{\raggedright\arraybackslash}X     >{\raggedright\arraybackslash\advance\hsize-1em }X     >{\raggedright\arraybackslash\advance\hsize-1em }X     }         \addlinespace         \toprule         \multicolumn{1}{c}{Variable } & Source & Spatial coverage & Temporal coverage & Frequency \\         \midrule         Urban Social Disturbances & USDAA, PRIO, Oslo & 55 cities (49 countries) & 1960-2010 & Event-based \\         Local food prices & FAO GIEWS database  & 43 markets (in common with USDAA) & 1990-Present (unbalanced) & Monthly \\         Total population & WDI 2010 & 190 countries & 1960-2011 & Annual \\         Urban population (as p.c. of total) & WDI 2010 & 190 countries & 1960-2011 & Annual \\         Internet penetration & WDI 2010 & 177 countries & 1960-2011 & Annual \\         Percapita GDP (constant, 2000) & WDI 2010 & 248 countries & 1960-2011 & Annual \\         Index of democracy & QoG database, U of Gothenberg & 202 countries & 1960-2011 & Annual \\         \bottomrule         \end{tabularx}\hspace*{-1cm}%       \label{Sources}%     \end{table}%          \begin{table}[htbp]       \caption{Local food price series used in the analysis}            \noindent\hspace*{-1cm}         {\tiny         \begin{tabularx}{\textwidth+2cm}{     >{\raggedleft\arraybackslash\advance\hsize1em}X     >{\raggedright\arraybackslash\advance\hsize1em }X     >{\raggedright\arraybackslash}X     >{\raggedright\arraybackslash\advance\hsize-1em }X     >{\raggedright\arraybackslash\advance\hsize-1em }X     }         \addlinespace         \toprule         \multicolumn{1}{c}{Country} & Price series selected &  Retail (R)/Wholesale(W) & Real(R)/Nominal(N) & Location \\         \midrule         Afghanistan & Bread & R     & R     & Kabul \\         Bangladesh & Rice  & W     & N     & Dhaka \\         Cambodia & Rice  & W     & N     & Phnom Penh \\         Cameroon & Maize & R     & N     & Yaonde \\         China & Wheat & R     & N     & NA \\         (for both Beijing and Lhasa) &       &       &       &  \\         DRC   & Cassava & R     & N     & Kinshasa \\         Ethiopia & Sorghum & W     & N     & Addis Ababa \\         Ghana & Maize & R     & R     & Accra \\         Guinea & Imported rice & R     & N     & Conakry \\         India & Rice  & R     & R     & Patna \\               & Wheat & R     & R     & Delhi \\               & Wheat & R     & R     & Mumbai \\         Indonesia & Rice  & R     & R     & NA \\         Kazakhstan & Bread & R     & R     & Almaty \\         Kenya & Maize & W     & N     & Nairobi \\         Kyrgyzstan & Bread & R     & R     & Bishkek \\         Laos  & Glutinous Rice Grade 1 & R     & N     & NA \\         Madagascar & Imported Rice & W     & R     & NA \\         Mali  & Imported Rice & W     & N     & Bamako \\         Mongolia & Wheat & R     & R     & Ulaan Bator \\         Mozambique & Maize & R     & N     & Maputo \\         Myanmar & Rice  & R     & N     & NA \\         Nepal & Rice  & R     & R     & Kathmandu \\         Niger & Imported rice & R     & R     & Niamey \\         Nigeria & Maize & W     & R     & Kano \\         Pakistan & Wheat flour & R     & R     & Lahore \\               & Wheat flour & R     & R     & Karachi \\         Philippines & Regular rice & R     & R     & Manila \\         Senegal & Imported Rice & R     & R     & Dakar \\         Somalia & Sorghum & R     & N     & Mogadishu \\         South Africa   & Wheat & W     & R     & Randfontain \\         Sri Lanka    & White Rice & R     & R     & Colombo \\         Sudan & Sorghum & W     & R     & Khartoum \\         Tajiskistan & Bread & R     & R     & Dushanbe \\         Tanzania & Maize & W     & R     & Dar es Salaam \\         Thailand & 25\% broken rice & W     & R     & Bangkok \\         Togo  & White Maize & R     & R     & Lome \\         Uganda & Maize & W     & R     & Kampala \\         Vietnam & Rice  & R     & R     & Hanoi \\               & 25 \% broken rice & R     & N     & Dong Thap \\         Zambia & White Maize & R     & R     & NA \\         Zimbabwe & Maize & R     & N (USD) & Harare \\         \bottomrule         \end{tabularx}}             \hspace*{-1cm}%       \label{Series}%         \floatfoot{Note: NA stands for National Average.}     \end{table}%          \begin{tabular}{lc} \hline      & (1) \\     VARIABLES & spontevent \\ \hline      &  \\     pos\_price\_shock\_ma & 0.287* \\      & (0.154) \\      &  \\     Observations & 2,226 \\     Number of city\_group & 37 \\      R-squared & -0.032 \\ \hline     \multicolumn{2}{c}{ Robust standard errors in parentheses} \\     \multicolumn{2}{c}{ *** p$<$0.01, ** p$<$0.05, * p$<$0.1} \\     \end{tabular}               %\section{Figures and Tables}          %\section{Steps in the generation of price series}          \end{document}


title: Compile images, controlling their location

text: In my tex file, I have images that are spaced between paragraphs. However, when I compile the file, the images come out almost all on the same page. Is there a command I can put so that the images are located on the pdf in the same place as they were (relative to the paragraphs) in the tex file? Thank you! Edit: Here is an example of part of the tex file. Would a `\FloatBarrier` before and after the image keep the image within the part of text that I want? Example:               For notation, let `$xy$` refer to a crossing made by an x-stick and a y-stick.      We will prove this by contradiction. Without loss of generality, assume that      we have two `$xy$` crossings (the other crossings are equivalent by rotation).      (see image 1).          \begin{figure}     \centering     \includegraphics[scale=.2]{2new.png}     \caption{Assuming we have two xy crossings}     \end{figure}          We have two cases: one where the two crossings share a stick and the second      where they do not. Regarding the former, assume the crossings share an      x-stick, again without loss of generality by symmetry.


title: Forcing a new section to begin after previous captions

text: > **Possible Duplicate:**   >  How to avoid splitting tables between sections I have noticed that, by default, when you open a new section, it could interfere with the contents from the previous section. However, in my case I need the section to begin after all captions from the previous sections (figures, tables etc.) have been drawn. I tried using multiple `\newpage` commands, but doesn't work. Any clever solution to this? By the way, I don't mind setting some global document-level option so that it applies to the whole document (since I want to achieve the same globally).


title: Figure positioning in Sweave

text: I starting learning Sweave today, and I am having difficulty positioning my figures correctly. I am finding that when I use the figure environment, the position of the figure doesn't correspond to its position in the document. Here is a minimal example of a .Rnw file showing with this problem:               %figure appears after both text A and text B     \documentclass[12pt]{article}          \begin{document}     \SweaveOpts{concordance=TRUE}     Text A     \begin{figure}     \begin{center}     <<fig=TRUE, echo=FALSE>>=     hist(rnorm(100))     @     \end{center}     \caption{histogram}     \label{fig:hist}     \end{figure}          Text B     \end{document}      In this example, text A and text B both appear after the figure, which is not what I would expect. Surprisingly, if I don't use the figure environment, the figure is positioned correctly:               %figure appears between text A and text B      \documentclass[12pt]{article}          \begin{document}     \SweaveOpts{concordance=TRUE}     Text A     \begin{center}     <<fig=TRUE, echo=FALSE>>=     hist(rnorm(100))     @     \end{center}     \end{document}      Any ideas?


title: forcing certain figure environments to be on top of page globally?

text: There are certain environments, such as the figure environment and environments that I defined myself that I want to force to appear (by default) on the top of a page, in a global way (instead of using [t], though even that sometimes doesn't work). Can I do that? Also, for some reason, sometimes such environments, or figures, appear in the middle of a page, and there is a lot of white space (no writing at all appears in the page other than the figures). Why does that happen? Can I globally make sure that if there is space for text for a page with a figure, text will appear there?


title: Position of a figure

text: > **Possible Duplicate:**   >  Force figure placement in text   >  Keeping tables/figures close to where they are mentioned   >  How to influence the position of float environments like figure and table > in LaTeX? I'm having a few definitions and some graphics. I want to have the following structure               Definition1          Figure1          Definition2          Figure2          Definition3          Figure3      The problem is that the document looks like this:               Definition1          Figure1          Definition2          Definition3      An on the next page, I suddenly have both figures at the top               Figure2          Figure3      How can I achieve the positioning I want, without LaTeX repositioning the figures?


title: Tikzpicture & caption

text: Using just the `{tikzpicture}` environment I can place the flowchart right between two portions of text like this: ![enter image description here](http://i.stack.imgur.com/PVyI3.png)               \documentclass{article}     \usepackage{float}                                           \usepackage{caption}     \usepackage{tikz}     \usetikzlibrary{arrows,shapes.geometric,positioning}          \begin{document}               \begin{tikzpicture}[       node distance = 2cm,       auto,       decision/.style={diamond, draw, fill=blue!20,          text width=5.5em, align=center, node distance=3cm, inner sep=1pt},       block/.style={rectangle, draw, fill=blue!20,          text width=7em, align=center, rounded corners, minimum height=4em},       line/.style={draw, -latex'},       cloud/.style={draw, ellipse,fill=red!20, node distance=3cm,         minimum height=2em},     %  on grid       ]       % Place nodes       \node [block] (init) {Generating combinations ($2^H$)};            \node [block, left=of init, xshift=1.5cm ,yshift=-3cm]   (W_legali) {$E(W     \ge     W_L$) \\ $n_B = n_B + 1$};       \node [block, right=of init, xshift=-1.5cm , yshift=-3cm] (W_nlegali) {$E(W   <       W_L$) \\ $n_B = n_B$};            \node [block, below=of W_legali]  (fo_legale)  {$\min$ $z_{(W \ge W_L)}$};       \node [block, below=of W_nlegali] (fo_nlegale) {$\min$ $z_{(W < W_L)}$};            \node [decision, below=6cm of init, yshift=-1.5cm]   (decide)                                  {$z_{(W \ge W_L)}$ \\ $\ge$ \\ $z_{(W < W_L)}$};       \node [block, right=of fo_nlegale, xshift=-2cm, yshift=6cm] (update) {Updating $n_B$};            % Draw edges       \path [line] (init) -- node[swap] {$W \ge W_L$} (W_legali);       \path [line] (init) -- node       {$W < W_L$}   (W_nlegali);            \path [line] (W_legali)   -- (fo_legale);       \path [line] (W_nlegali)  -- (fo_nlegale);       \path [line] (fo_legale)  -- (decide);       \path [line] (fo_nlegale) -- (decide);            \path [line] (decide) -| node [near start] {yes} (update);       \path [line] (decide) -| node [near start] {no} ([xshift=-1cm] W_legali.west)                             |- ([yshift=+1cm, xshift=-.2cm] init.north) coordinate (aux)                             -- ([xshift=-.2cm] init.north);       \path [line] (update) |- ([xshift=.4cm] aux) -- ([xshift=.2cm] init.north);     \end{tikzpicture}     \end{document}      But, using the `{figure}` environment, to be able to add a caption, my flowchart moves to another page and it's not between of the text portions anymore. ![enter image description here](http://i.stack.imgur.com/N4GWz.png)               \documentclass{article}     \usepackage{float}                                           \usepackage{caption}     \usepackage{tikz}     \usetikzlibrary{arrows,shapes.geometric,positioning}          \begin{document}          \begin{figure}[h]     \begin{tikzpicture}[       node distance = 2cm,       auto,       decision/.style={diamond, draw, fill=blue!20,          text width=5.5em, align=center, node distance=3cm, inner sep=1pt},       block/.style={rectangle, draw, fill=blue!20,          text width=7em, align=center, rounded corners, minimum height=4em},       line/.style={draw, -latex'},       cloud/.style={draw, ellipse,fill=red!20, node distance=3cm,         minimum height=2em},     %  on grid       ]       % Place nodes       \node [block] (init) {Generating combinations ($2^H$)};            \node [block, left=of init, xshift=1.5cm ,yshift=-3cm]   (W_legali) {$E(W     \ge     W_L$) \\ $n_B = n_B + 1$};       \node [block, right=of init, xshift=-1.5cm , yshift=-3cm] (W_nlegali) {$E(W   <       W_L$) \\ $n_B = n_B$};            \node [block, below=of W_legali]  (fo_legale)  {$\min$ $z_{(W \ge W_L)}$};       \node [block, below=of W_nlegali] (fo_nlegale) {$\min$ $z_{(W < W_L)}$};            \node [decision, below=6cm of init, yshift=-1.5cm]   (decide)                                  {$z_{(W \ge W_L)}$ \\ $\ge$ \\ $z_{(W < W_L)}$};       \node [block, right=of fo_nlegale, xshift=-2cm, yshift=6cm] (update) {Updating $n_B$};            % Draw edges       \path [line] (init) -- node[swap] {$W \ge W_L$} (W_legali);       \path [line] (init) -- node       {$W < W_L$}   (W_nlegali);            \path [line] (W_legali)   -- (fo_legale);       \path [line] (W_nlegali)  -- (fo_nlegale);       \path [line] (fo_legale)  -- (decide);       \path [line] (fo_nlegale) -- (decide);            \path [line] (decide) -| node [near start] {yes} (update);       \path [line] (decide) -| node [near start] {no} ([xshift=-1cm] W_legali.west)                             |- ([yshift=+1cm, xshift=-.2cm] init.north) coordinate (aux)                             -- ([xshift=-.2cm] init.north);       \path [line] (update) |- ([xshift=.4cm] aux) -- ([xshift=.2cm] init.north);     \end{tikzpicture}     \caption{Iterative rules flow chart} \label{fig:flowchart}     \end{figure}     \end{document}


title: How to put text between stacks of images?

text: I need to know how to put text between stacks of images in LaTeX in an elegant way. I have tried to use `\par`, `\linebreak`, `\bigskip`, but the results are not good. Here is the code:                \begin{figure}[ht]         \centering         \subfigure[]{%         \includegraphics[width=2.8in]{thtumsnone.png} &         \label{fig:subfigure1}}         \quad         \subfigure[]{%         \includegraphics[width=2.8in]{tumziseth.png} &         \label{tumsizemetastas}}         \caption{Smth}         \label{fig:tumsizemetastas}         \end{figure}              \\ TEXT TO PLACE HERE %%% What tags to use?              \begin{figure}[ht]         \centering         \subfigure[]{%         \includegraphics[width=2.8in]{thtumsnone.png} &         \label{fig:subfigure1}}         \quad         \subfigure[]{%         \includegraphics[width=2.8in]{tumziseth.png} &         \label{tumsizemetastas}}         \caption{Smth}         \label{fig:tumsizemetastas}         \end{figure}      or:               \begin{figure}[!hbp]        \centering        \includegraphics[scale=0.6]{melikeobhist.png}        \linebreak        \caption{Smth}           \label{fig21}        \end{figure}               \\ TEXT HERE             \begin{figure}[!hbp]        \centering        \includegraphics[scale=0.6]{melikeobhist.png}        \linebreak        \caption{Smth}           \label{fig21}        \end{figure}       What tags to use, in what order?


title: Making a table in LaTeX

text: > **Possible Duplicate:**   >  Keeping tables/figures close to where they are mentioned   >  How to influence the position of float environments like figure and table > in LaTeX? I want to insert a table in my LaTeX document but the problem is when I insert it it isn't placed where I want and I don't understand why this happened. This is the code:               \section{Simulations et Résultats}       Tout au long de cette section nous allons faire différentes simulations en modifiant à chaque fois un paramètre pour voir l'impact de cette modification sur la propagation des données.        \subsection{La création des réseaux:}       Nous allons présenter les différents réseaux crées ainsi que leurs caractéristiques.       \subsubsection{Réseau 1:}       Les deux tableaux ci dessous résument les caractéristiques du réseau 1. En effet les deux réseaux crée présentent les mêmes caractéristiques sauf que le premier réseau est moins connecté que le deuxième:            \begin{table}     \begin{center}     \begin{tabular}{|p{2.8cm}|p{1.7cm}|p{1.7cm}|p{1.7cm}|p{2.1cm}|p{2.7cm}|p{2.3cm}|}       \hline      \bf Nb Pages Totales & \bf Nb Pages Publiques & \bf Nb Pages Amis et leurs Amis & \bf Nb Pages Amis Seulement& \bf  Nb Min amis & \bf  Nb Moy amis & \bf  Nb Max amis \\       \hline       1.1 & 11 & 2&17&11&25.7&60.8 \\            \hline     \end{tabular}     \end{center}          \caption{Caractéristiques du Réseau 1.}     \end{table}


title: How to specify the exact position of floats?

text: How do I specify the exact position of a float? I am not talking about the [t],[b],[h!] etc operators, I want to specify the exact position of the float, i.e. 15cm from top and 15cm from left. Regards


title: Keeping tables/figures close to where they are mentioned

text: Is there any package or a method to force LaTeX to keep floating environments like `table` and `figure` closer to where they are declared?


title: Inserted image is at the top of the page

text: I'm trying to insert an image into my paper however it's being inserted at the very top and not where I want it, my .tex file looks something like this:               % Bunch of text here,     \begin{figure}     \centering     \includegraphics[width=12cm]{images/image.jpg}     \caption{aaa}     \end{figure}     % More text after


title: How to set the default float position, e.g., set it to be H?

text: Is there a way to set the default position option for floats? I want all float to by default to use the option `H`. Then I only need to set position parameter for those floats that I do not want to use `H`.


title: Vertical alignment for tables

text: > **Possible Duplicate:**   >  Set table position to top   >  How to place a float at the top of a floats-only page? I've got this problem... I tried with the search but I couldn't figure out! I've got many tables one after each others, with nothing in the middle               \begin{table}      \begin{tabular}{|r|r|r|r|r|r|r|}      my code here     \end{tabular}     \end{table}          \begin{table}      \begin{tabular}{|r|r|r|r|r|r|r|}       my code here     \end{tabular}     \end{table}      Each table is so big that it automatically goes to a new page. The last one is smaller than the others, it goes to a new page but it is aligned in the middle of the page and I can't move from there to a top alignment! How can I do that?


title: Figure placed at the end of the file

text: > **Possible Duplicate:**   >  Keeping tables/figures close to where they are mentioned   >  How to influence the position of float environments like figure and table > in LaTeX? I'm doing this               \section{Use Case Description}          \begin{figure}[h]      \centering     \caption{Diagramma degli use case}     \includegraphics[width=\textwidth, height=\textheight, keepaspectratio]{UCD.pdf}     \end{figure}          \vskip 0.6cm \textbf{Titolo:} UC Create Tag     ...      and then there's the rest of my file. My problem is that the figure renders correctly but just at the end of the file instead of where I've placed it. If I put no placement parameters, it renders in the next page (as it is supposed to do, I think). I would like to render it before anything else, but `[h]` or `[h!]` didn't work.


title: latex placing image - how can I put image wherever I want

text: I am trying to insert an image in the middle of the page, but it is going to the top of the page. why the hell is it happening? I tried this:               \begin{figure}       \begin{minipage}{\textwidth}         \includegraphics[width=75.5mm]{myimage}       \end{minipage}     \end{figure}      I am looking for solution for 2 hours, not a single sign of success!


title: Figure inside leftbar environment generates error "Not in outer par mode"

text: > ! LaTeX Error: Not in outer par mode. I seek a solution to be able to make this figure inside leftbar environment work:               \documentclass[12pt]{article}     \usepackage{graphicx}     \usepackage{framed}          \begin{document}          \begin{leftbar}          \begin{figure}[h!]       \caption{Mean data points enclosed by shapes are contained within the same group, within 95\% confidence.}     \includegraphics[scale=0.7]{"../Data Analysis Files/InteractionPlotforTransLog10(X+1)Count"}     \end{figure}          \end{leftbar}               \end{document}      @Stefan Kottwitz, your solution is otherwise perfect, but it does introduce this problem of cropping at the end of pages: ![enter image description here](http://i.stack.imgur.com/cWPKl.png)


title: Is there an easy way to have my whole document with a space between paragraphs rather than indentation?

text: I would like to have my whole document showing a blank line (or space) between paragraphs and no indentation. I know how to do it line by line, but is there a way to change that with just one or a few lines at the beginning of the document? Like a package you can install, or a new command?


title: Doublespacing in classicthesis package

text: My school requires the thesis to be in a specific format. I used the following to change the margins in my thesis which is using `classicthesis` package.               \usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}      I also need to change the spacing to be double spaced. Could someone please help me?


title: Spacing between the lines

text: How to set the spacing (vertical) between two lines of the document? What is the standard spacing?


title: Double line spacing

text: I would like to typeset a draft of my document with double linespacing so that my collaborators have space to write in their edits (with a pen). How do I do it?


title: Empty line between paragraphs

text: > **Possible Duplicate:**   >  Is there an easy way to have my whole document with a space between > paragraphs rather than indentation? Adding an empty line between paragraphs does not work, `\newline` does not work , where I am returning back to the wrong `\\\\\\\`, which is very frustrating. When skipping two lines it starts a paragraph... ![enter image description here](http://i.stack.imgur.com/JncoO.png)               \documentclass[]{report}      \usepackage{hyperref}          \section{Software: Accessibility and Usability Evaluation}          \url{www.universaldesign.ie/useandapply/ict/\\itaccessibilityguidelines/applicationsoftware/guidelines}          There are three marks available for each product:          (1-3 where 0 is not applicable, 1 is not supported, 2 partially supported,      3 – not supported)           Please note that NVDA not used for software evaluation for fairness, as both pc applications      and OS accessibility centre must be mutually compatible and will be the first entry point      for the user.


title: Paragraph spacing affecting table of contents

text: > **Possible Duplicate:**   >  Is there an easy way to have my whole document with a space between > paragraphs rather than indentation? I am trying to increase the spacing between paragraphs, using               \setlength{\parskip}{\baselineskip}      and it seems to work fine -- except it also increases the spacing of lines in the table of contents etc. I tried the following as a workaround:               \begin{spacing}{1}     \listoftodos % Remove this for the final document          \tableofcontents          \listoffigures           \listoftables          \printnomenclature      \end{spacing}      but that didn't fix the problem. My question is: Is there any way I can increase the spacing between paragraphs **only** for the actual body of the document and not anywhere else (TOC, etc.)


title: How to cancel the indentation of first line in paragraphs?

text: I just want to cancel the first line indentation in every section paragraph (include the Abstract). Thank you for any kind help.               \documentclass[a4paper]{article}     \usepackage{titling}     \newcommand{\subtitle}[1]{%       \posttitle{%         \par\end{center}         \vskip5em         \begin{center}\LARGE#1\end{center}         \vskip5em}%     }          \usepackage{palatino}     \usepackage[top=1in,bottom=1in,left=1in,right=1in]{geometry}     \usepackage{lipsum}     \usepackage{graphicx}     \usepackage{booktabs,multirow}     \usepackage{amsmath,amssymb}     \usepackage{xcolor}     \usepackage{cite}          \renewenvironment{abstract}       {\small\quotation       {\bfseries\noindent{\large\abstractname}\par\nobreak\smallskip}}       {\endquotation}          \begin{document}          \begin{abstract}     Here goes the abstract.     \end{abstract}     \clearpage          \tableofcontents     \clearpage     \setlength{\parskip} {0.8em}          \section{Test section}     \subsection{Test section}     \subsubsection{Test section}     \paragraph{Test section\\}     This document is for testing.          \end{document}


title: How do I insert an empty line?

text: How can I add an empty line between to paragraphs, thus separating them more strongly?


title: How to insert vertical space between paragraphs

text: > **Possible Duplicate:**   >  Is there an easy way to have my whole document with a space between > paragraphs rather than indentation? Googling didn't give required results. (Many, but not applicable or code doesn't work) Essentially, what I want to do is the same formatting I just did with this question. What I use at the moment is `\\\\\\\`. Being from developers' circle I tend to deal with all kinds of warning. These four slashes give me `badboxes`. How to produce exactly same **correct** formatting I just did now with this text. I appreciate your help. **UPDATE:** I upvoted all the answers, thanks for the contribution. All of your examples work. It seems for two years I never left two empty spaces to break the text...


title: How can I space the lines in the whole document?

text: How can I space the lines in the whole document ?


title: Have new line between paragraphs, no indentation

text: > **Possible Duplicate:**   >  Is there an easy way to have my whole document with a space between > paragraphs rather than indentation? I am sure that this must be a dup, but I can't find the right keywords to search for. So I am posting. Right now my latex paragraphs look like this:               The paragraph does not start out with     an indent.  But when you make a new      paragraph there is an indent.            This is a new paragraph.  Can      you see the indent?            This is another paragraph.       I would like to have no indenting but and an empty line between paragraphs.   This is what I am using to remove the indents:               \setlength{\parindent}{0}      But I am not sure how to add in new lines. I think it is something like this:               \setlength{\parskip}{1}      Happy Canada Day!


title: Why my first text line is indented?

text: Here is my LaTex code:               \documentclass{article}     \usepackage{amsmath}     \usepackage{color}     \pagestyle{empty}     \begin{document}     \definecolor{blu}{RGB}{31,111,130}     \definecolor{gren}{RGB}{39,110,13}     \definecolor{gra}{RGB}{92,102,88}          \scriptsize{\textbf{{\color{blu}     \noindent{\color{gren}Fyysinen} malli k\"{a}ytt\"{a}\"{a}\\ fysiikan lakeja jonkin\\ suureen ennustamisessa.     }}}          \end{document}      Here is my result: ![Example image](http://i.stack.imgur.com/CUHUC.png) I don't want the first line to be indented...Why is this happening? Thnx for any help! =) P.S. This LaTex is generated by using IguanaTex Add-In for Microsoft Powerpoint 2010 =)


title: paragraph line spacing not consistent

text: I'd like to have the first line of a new paragraph right justified but keeping the same text linespacing. I simply use:               \documentclass[a4paper,12pt]{report}          \newcommand{\linespacing}{1.5}          \renewcommand{\baselinestretch}{\linespacing}      and leave one white space line in my `.tex` file (I use TeXWork). Without other commands this works fine in most of the document. However only in some cases the linespacing between two paragraphs is clearly larger (2.0 or even double than the baseline). There are no figures, tables, etc. that could be the reason of this problem. I've tried to use `\setlength{\parindent}{15pt}` (with the `\usepackage{parskip}`) for instance just to see if I could make it consistent all the way through but it didn't work. What should I try? thanks


title: how to not indent all paragraphs in the document

text: > **Possible Duplicate:**   >  Is there an easy way to have my whole document with a space between > paragraphs rather than indentation? I would not indent all paragraph of my document. instead putting `\noindent` at the beginning of the paragraph how can i do in a easy and fast way? there is maybe a package that helps me to do that?


title: How can I get a centered comment 2cm above the bottom of the page?

text: Just as the title states, how can I get a centered comment 2cm above the bottom of the page?


title: Conditional assignment in a loop

text: ## Objective: I want to compile the `temporary.tex` file containing PSTricks code twice. One with `-jobname=Rotated` and the other one with `-jobname=Unrotated`. The resulting `Rotated.ps` will be passed to `ps2pdf` without `-dAutoRotatePages=/None` but the `Unrotated.ps` will be passed to `ps2pdf` with `-dAutoRotatePages=/None`. The following code throws some errors. The error messages can be seen by yourself.               % this input file name is filename.tex     % compile it with pdflatex -shell-escape filename.tex          \documentclass[preview,border=12pt]{standalone}          \usepackage{filecontents}          \begin{filecontents*}{temporary.tex}     \documentclass[pstricks,border=12pt]{standalone}     \begin{document}     \begin{pspicture}(4,2)         \rput{90}(2,1){Marienplatz}     \end{pspicture}     \end{document}     \end{filecontents*}          \usepackage{graphicx,pgffor}          \newif\ifAutoRotatePages          \def\AutoRotatePages{%         \ifAutoRotatePages             % do nothing         \else             -dAutoRotatePages=/None         \fi}          \def\JobName#1{-jobname=#1}          \foreach \outputname/\isautorotate in {Rotated/true,Unrotated/false}     {         \AutoRotatePages\isautorotate         \foreach \compiler/\ext in {latex \JobName{\outputname}/tex,dvips/dvi,ps2pdf \AutoRotatePages/ps}         {             \immediate\write18{\compiler\space \outputname.\ext}         }     }          \begin{document}     \foreach \filename in {Rotated,Unrotated}{\begin{center}\includegraphics{\filename}\end{center}}     \end{document}      How to fix this problem?


title: Biblatex raggedright bibliography with polyglossia hebrew

text: The `xelatex` with `biblatex` can generate `raggedright` bibliography by means of               \raggedright\printbibliography      but adding `hebrew` to `polyglossia`:               \setotherlanguage{hebrew}      disables this functionality, i.e. the Bibliography is justify to the margins and hyphenation works. How to switch off the hyphenation in the Bibliography with the `hebrew` working?


title: Change font type in arabtext

text: I wrote an Arabic paragraph               \begin{arabtext}     \begin{center}          \Large{\textbf{معادلةُ زُمْرةِ إعادة التقنين لنموذجيْ بينر المتعامدُ و المترابط     }}\\ \vspace{0.5cm}     \large{إعدادُ      }\\     \large{\textbf{رامي خليل}}\\ \vspace{0.5cm}     \large{المشرفُ }\par     \large{\textbf{د. عز الدين سمير}}\vspace{0.5cm}     \Large{\textbf{ملخص}}\vspace{0.5cm}      \end{center}       and I want to use a specific font (arabic transparent)


I'm looking for a help for drawing this diagrams: ![Some commutative diagram](http://i.stack.imgur.com/Gt3nh.png) ![Triangle](http://i.stack.imgur.com/KJ3Tb.jpg)


title: Table of Contents inconsistent spacing

text: My Table of Contents shows different spacing between lines when a chapter has sections and subsections and when it doesn't. I need the same spacing above ad below every chapter while keeping sections and subsections single spaced in the ToC. I'd appreciate any help.


title: Bad TOC entries spacing for chapter 10 and beyond

text: When making long documents under `book` class if one needs 10 or more chapters, something weird happens with the table of contents: the space between the number of the chapter and its title disappears, just like it was trying to preserve a beautiful alignment on the left but leading to an incorrect output. ![enter image description here](http://i.stack.imgur.com/rKVAJ.png) Here's a MWE:               \documentclass[spanish, 12pt]{book}          \usepackage[spanish]{babel}     \usepackage[utf8]{inputenc}          \begin{document}          \tableofcontents          \chapter{A}     \newpage     \chapter{B}     \newpage     \chapter{C}     \newpage     \chapter{D}     \newpage     \chapter{E}     \newpage     \chapter{F}     \newpage     \chapter{G}     \newpage     \chapter{H}     \newpage     \chapter{I}     \newpage     \chapter{J}     \newpage     \chapter{K}     \end{document}      To be honest, I have no idea how to fix this. I hope you guys do.