My Table and Figures in Chapter 4 of my thesis are appearing at the end of chapter instead of within the text where I want them to appear. Before these table and figure everything is fine in this chapter and also in the previous chapters. The rest of the tables and figures (only from this chapter) are also appearing at the end of Chapter 4. Tables and figures in Chapter 5 and rest of the thesis are fine and they are appearing where I want them to be. Given below is the code for my table and figure which are causing trouble.   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Table 4.3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{table}[!t] \centering % used for centering table \caption{Abc..} % title of Table {\normalsize}\setlength{\tabcolsep}{4pt} \begin{tabular}{| c || p{5.25cm} | c || p{5.25cm} |}  \hline %inserts double horizontal lines abc &amp; abc &amp; abc &amp; abc \\ \hline \hline  $a$ &amp; b &amp; c &amp; d \\ $a$ &amp; b &amp; c &amp; d \\ $a$ &amp; b &amp; c &amp; d \\ [1ex] % [1ex] adds vertical space \hline %inserts single line \end{tabular} \label{table:nonlin} % is used to refer this table in the text \end{table}  \begin{sidewaysfigure}[!t]%[htbp] \centering \makebox[\textwidth][c]{\includegraphics[width=0.85\textwidth, height=0.50\textwidth]{./Figures/Chapter4/4point7.pdf}} \caption{xyz..} \label{fig:awesome_image} \end{sidewaysfigure}   Any help would be appreciated. Thank you.
3132
For some reason, my figures get pushed to the end of the document. I tried begin{figure}[t], [h] and other options, but none helped. Any ideas how to get the figures to appear much earlier in the document, where they are approximately first mentioned in the .tex file?
20313
In LyX I enter a figure/graphic at the end of a paragraph using Insert > Float > Figure.  I assume this is the command that I want since I want to include a graphic with a description (please let me know if there's a better command for this).  However, when it shows up in the PDF, (i) the figure is inside the paragraph and (ii) the spacing between the bottom of the figure and the remainder of the paragraph is abnormally large. I've tried manually editing the vertical space, but LyX either puts no space or too much space for this particular figure (I've never had this issue before).  I have a MWE below. In this case the spacing issue no longer appears but the figure appears above the paragraph instead of below. How can I put the figure below the paragraph (or precisely where I want it to appear?  (I) Source Code for Paragraph:   \noindent \begin{center}  \begin{figure}  \includegraphics[scale=0.6]{\string"Thesis/blank billard 7\string".jpg}\caption{A Billiard table $B_{\alpha}$ with a barrier of length $\alpha$}  \end{figure}   \par\end{center}   (II) Source Code for Entire Source:   \documentclass[oneside,english]{amsart}  \usepackage[T1]{fontenc}  \usepackage[latin9]{inputenc}  \usepackage{amsthm}  \usepackage{graphicx}  \usepackage{setspace}   \makeatletter  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.  \numberwithin{equation}{section}  \numberwithin{figure}{section}   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.  \title[Short version]{Long version}  \usepackage{mathtools}   \makeatother   \usepackage{babel}  \begin{document}   \subsection{Veech's Examples and a Billiard Interpretation of these Examples}   \begin{doublespace}  \noindent In {[}8{]}, Veech constructs examples of minimal and not uniquely ergodic dynamical systems as follows (see {[}7{]})....  \end{doublespace}   \noindent \begin{center}  \begin{figure}  \includegraphics[scale=0.6]{\string"Thesis/blank billard 7\string".jpg}\caption{A Billiard table $B_{\alpha}$ with a barrier of length $\alpha$}  \end{figure}   \par\end{center}  \end{document}   UPDATE Here is the figure.  [![enter image description here][2]][2]
56327
The LaTeX Wikibook :     Please understand: you do not have to use floating tables. It only   looks more professional. If you want to place your tables where they   lie in your source code, do not use table at all! This is a very   common misunderstanding among newcomers.   LaTeX works with an intricate , but I often prefer immediate placement with the H placement specifier (enabled by the float package).  My understanding is that captions and table/figure numbering require the table/figure environments. Is this really so, or are there ways around that? What other reasons are there for using table/figure if we know that we don't want a particular object to float?
15541
I am importing a data table into a document and want the table to be within the text. When I import with \input{bodyrate}[htpb], the table is placed at the end of the document and [htpb] is printed instead. How do I get the table to be where I import it in the .tex file?  \documentclass[preprint]{aastex} \begin{document} \input{file}[htpb] \end{document}   the table file begins with:  \begin{deluxetable}{lccc} \tablecolumns{4} \tablewidth{0pc}
25722
I want to add an image to my paper but I have a problem.  When I add the image with just \includegraphics[]{} tag, everything works fine, and the picture shows up when I compile my document.  When I use \begin{figure} \includegraphics[]{} \end{figure} - syntax the image does not appear in the compiled document.   The relevant part of my header include is :   \usepackage{graphicx}  \graphicspath{ {pics/} }   And later on I add the image with this block:  %This does not work  \begin{figure}   \centering     \includegraphics[width=.4\textwidth]{generalPolya}   \label{generalPolya} \end{figure}    %This works  \includegraphics[width=.4\textwidth]{generalPolya}   I guess it's some sort of issue in the graphics package, but I've copied the setup from a previous paper I had, so it should work. Any ideas on what's wrong? Thanks in advance.  Edit:  Thanks for all the responses. I created a minimal working example. Apparently multicols messes with the figure tag:  \documentclass[]{article} \usepackage{multicol} % Used for the two-column layout of the document \usepackage{amsmath} \usepackage{graphicx} \graphicspath{ {pics/} } \title{\vspace{-15mm}\fontsize{24pt}{10pt}\selectfont\textbf{Lorem ipsum}} % Article title \begin{document} \maketitle % Insert title \begin{multicols}{2} % %This does not show up \begin{figure}[h]     \includegraphics[width=.4\textwidth]{generalPolya} \end{figure} %This shows up. \begin{center}         \includegraphics[width=.5\textwidth]{chair} \end{center} \end{multicols} \end{document}   What shows up after compiling the document is this    What is wrong with this syntax?
86975
I have the following code which produces the first attached Table. But as you can see in the table, both the table label and the caption all fall on the same line: \documentclass[10pt,journal,compsoc]{IEEEtran}  % *** CITATION PACKAGES *** % \ifCLASSOPTIONcompsoc   % IEEE Computer Society needs nocompress option   % requires cite.sty v4.0 or later (November 2003)   \usepackage[nocompress]{cite} \else   % normal IEEE   \usepackage{cite} \fi  \usepackage{subcaption} %\usepackage{subfig} %\usepackage{subcaption} \usepackage[draft]{graphicx} \usepackage{algorithm,algpseudocode} \usepackage{mathtools} \usepackage{filecontents} \usepackage{lipsum} \usepackage[flushleft]{threeparttable} \usepackage{cite} \usepackage{amssymb} \usepackage{algpseudocode}% http://ctan.org/pkg/algorithmicx \usepackage{mathtools, cases} \usepackage{amsmath,empheq} \usepackage{eqparbox} % for the second example \usepackage{verbatim} \usepackage{varwidth}% http://ctan.org/pkg/varwidth \usepackage{color} \usepackage{xcolor} \usepackage[export]{adjustbox} \usepackage{multirow}  \newcommand{\meq}[2]{%   \eqmakebox[#1][s]{$\displaystyle#2$}% }   % correct bad hyphenation here \hyphenation{op-tical net-works semi-conduc-tor}  %\let\emptyset\varnothing \begin{document}  \begin{table}[!bp] \centering \caption{Evaluation of overall performances on both datasets} \label{tab:default} \resizebox{0.5\textwidth}{!}{% \begin{tabular}{|l|l|l|l|l|l|l|} \hline \multicolumn{7}{|c|}{Datasets}                                                                                  \\ \hline \multicolumn{3}{|c|}{In-House}                                                &amp; \multicolumn{4}{c|}{NSL-KDD}    \\ \hline DR                       &amp; ACC                      &amp; FPR                     &amp; K  &amp; DR      &amp; ACC     &amp; FPR    \\ \hline \multirow{8}{*}{99.75\%} &amp; \multirow{8}{*}{99.72\%} &amp; \multirow{8}{*}{0.06\%} &amp; 1  &amp; 90.53\% &amp; 96.14\% &amp; 0.00\% \\ \cline{4-7}                           &amp;                          &amp;                         &amp; 2  &amp; 94.22\% &amp; 97.65\% &amp; 0.00\% \\ \cline{4-7}                           &amp;                          &amp;                         &amp; 3  &amp; 95.47\% &amp; 98.16\% &amp; 0.00\% \\ \cline{4-7}                           &amp;                          &amp;                         &amp; 4  &amp; 96.10\% &amp; 98.41\% &amp; 0.00\% \\ \cline{4-7}                           &amp;                          &amp;                         &amp; 5  &amp; 96.48\% &amp; 98.57\% &amp; 0.00\% \\ \cline{4-7}                           &amp;                          &amp;                         &amp; 10 &amp; 97.25\% &amp; 98.87\% &amp; 0.02\% \\ \cline{4-7}                           &amp;                          &amp;                         &amp; 20 &amp; 97.57\% &amp; 98.88\% &amp; 0.22\% \\ \cline{4-7}                           &amp;                          &amp;                         &amp; 30 &amp; 97.68\% &amp; 98.40\% &amp; 1.11\% \\ \hline \end{tabular}% } \end{table}  \end{document}   But what I want is a table with the caption format below:  How do I achieve this? Any help will be appreciated.
59835
I have 5 tables and a section after them. After creation of an output file I have two tables on one page, then a section and last 3 tables on next page.  What I want to achieve is to put tables and section below them.  \begin{table}[ht]\footnotesize \centering \begin{tabular}{|ll|} ...... \end{tabular} \label{tab:result} \end{table}  \section{Section below tables}
53771
AFAIK a figure or table should always be placed after the first reference to it in the text.  So I always place the code for my figures and tables after the paragraph which contains the first reference \ref to them. When I then use the command \begin{figure}[t], it is possible that the figure is placed at the top of the same page where it is referenced, so IMHO that is against the rule mentioned above.   Is there a way to force pdflatex to place the floats after the paragraph which precedes them in the source text? (so in my example that would be at the top of the following page or later)
22858
I created a table in LaTeX, but there are some problems with the borders. The borders remain open whereas I want them closed. Also, in the last row, I want the vertical line gone, ie I want just one column in the last row. Can someone please fix it? Here are my code and my table:  \documentclass{article} \usepackage{booktabs}   \begin{document}   \begin{table} [h!] \begin{center} \begin{tabular}{|l|c|c|c|c|} \hline Parameters  &amp; \multicolumn{2}{c}{Model 1} &amp; \multicolumn{2}{c}{Model 2}\\      \midrule  &amp;  Coefficient &amp; 95\% CI &amp;   Coefficient &amp; 95\% CI \\      \midrule     $\beta_{concern_2}$  &amp;   $0.190^{\ast}$ &amp; (0.113, 0.268) &amp; 0.171 &amp; (0.100, 0.241)\\    $\beta_{concern_3}$   &amp;  0.117 &amp;  (0.043, 0.191)  &amp; 0.117 &amp; (0.050, 0.183)\\      $\beta_{concern_4}$ &amp; 0.210  &amp;  (0.139, 0.281)  &amp; 0.190 &amp; (0.127, 0.253)\\       $\beta_{concern_5}$ &amp; 0.204 &amp; (0.135, 0.273)   &amp; 0.111 &amp; ( 0.049, 0.173)\\       $\beta_{breath_2}$  &amp;  0.157 &amp; (0.07,8 0.236) &amp; 0.208 &amp; (0.136, 0.280) \\      $\beta_{breath_3}$ &amp; 0.115 &amp; (0.041, 0.189) &amp; 0.100 &amp; (0.034, 0.166) \\     $\beta_{breath_4}$ &amp; 0.236 &amp;  (0.160, 0.311) &amp; 0.301 &amp; ( 0.234, 0.368)\\       $\beta_{breath_5}$ &amp; 0.092 &amp; (0.020, 0.163) &amp; 0.079 &amp; (0.015, 0.144) \\    $\beta_{weath_2}$  &amp;   0.164 &amp; ( 0.092, 0.236) &amp; 0.137 &amp; (0.071, 0.203) \\     $\beta_{weath_3}$  &amp; 0.160 &amp;  (0.089, 0.231) &amp; 0.199 &amp; (0.135, 0.263) \\    $\beta_{weath_4}$ &amp;  0.141 &amp; (0.067, 0.215) &amp; 0.133 &amp; (0.066, 0.199) \\     $\beta_{weath_5}$ &amp; 0.176 &amp; (0.103, 0.249) &amp;  0.257 &amp; (0.191, 0.323)\\      $\beta_{sleep_2}$  &amp; 0.111 &amp; (0.036, 0.187) &amp; 0.135 &amp; (0.068 0.203)  \\      $\beta_{sleep_3}$  &amp; 0.110 &amp; (0.036 0.184) &amp; 0.176 &amp;  0.110 0.242 \\        $\beta_{sleep_4}$  &amp;  0.131 &amp; (0.056 0.205 &amp; 0.162 &amp; 0.095 0.229 \\       $\beta_{sleep_5}$  &amp; 0.011 &amp; (-0.064, 0.086) &amp; 0.034 &amp; (-0.033, 0.101) \\      $\beta_{act_2}$ &amp;  0.135 &amp; (0.060, 0.209) &amp; 0.033 &amp; (-0.033, 0.100) \\     $\beta_{act_3}  $ &amp;0.195 &amp; (0.121, 0.269) &amp; 0.203 &amp; ( 0.137, 0.268)\\       $\beta_{act_4}  $ &amp; 0.214 &amp; ( 0.139, 0.290) &amp; 0.254 &amp; (0.186 0.321) \\      $\beta_{act_5}  $ &amp; 0.224 &amp; (0.154, 0.294) &amp; 0.158 &amp; (0.095, 0.221) \\ \hline     &amp; *statistically significant at 5\% level \\ \hline \end{tabular} \caption{Regression Coefficients of model 1 and model 2 } \label{beta} \end{center} \end{table}   \end{document}
121589
I checked extensively the forum and the net in order to solve this seemingly simple problem, without success. I know that there are a lot of posts regarding this problem, but I was unable to find the one that was fitting my purpose.  I would like to add an extra line inside the List of Figures and Tables when switching from one chapter to another, when using the scrbook class of ClassicThesis.  So for example it should be:   Figure 1.1 Figure 1.2 Figure 2.1 Figure 3.1   while what I obtain now is:   Figure 1.1 Figure 1.2 Figure 2.1 Figure 3.1   Here is the MWE that reproduces my problem, with a possible solution that I took from , which unfortunately doesn't work in my case:  \documentclass{scrbook} \usepackage{classicthesis} \usepackage{classicthesis-ldpkg} \usepackage{subfig} \usepackage{graphicx} \begin{document}  \makeatletter \let\my@chapter\@chapter \renewcommand*{\@chapter}{%   \addtocontents{lof}{\protect\addvspace{10pt}}%   \my@chapter} \makeatother  \listoffigures  \clearpage  \chapter{1}  \begin{figure} \centering \includegraphics[scale=.9]{fig1} \caption{Figure 1 of the chapter 1} \end{figure}  \begin{figure} \centering \includegraphics[scale=.9]{fig2} \caption{Figure 2 of the chapter 1} \end{figure} 1 \chapter{2}  \begin{figure} \centering \includegraphics[scale=.9]{fig3} \caption{Figure 1 of the chapter 2} \end{figure}  \chapter{3}  \begin{figure} \centering \includegraphics[scale=.9]{fig4} \caption{Figure 1 of the chapter 3} \end{figure}  \end{document}   Thanks for your kind help.
19710
I am new to Latex and I have tried to create a table but it seems not to work correctly - the vertical line is missed. Here is the code:  \begin{table*}[t]   \centering   \begin{center}    \begin{tabular}{|r|l|c|c|c|}     \hline &amp;&amp;\multicolumn{3}{c}{\bf Results}\\     \hline\bf Nr.&amp; \bf Features&amp;\bf Strict &amp;\bf Outer &amp;\bf Inner\\ \hline     1&amp;Morphological F.&amp;100.00&amp;100.00&amp;100.00\\     2&amp;1 + Bla &amp;100.00&amp;100.00&amp;100.00\\     3&amp;2 + Blabla&amp;100.00&amp;100.00&amp;100.00\\     4&amp;3 + blablabla&amp;100.00&amp;100.00&amp;100.00\\     5&amp;4 + blablablabla&amp;100.00&amp;100.00&amp;100.00\\     \hline    \end{tabular}   \end{center}   \caption{\label{font-table} Results. }   \label{tab:1} \end{table*}   Here is the output that I become :(    I think that something is wrong with the 5 line, but it seems I have tried everything :(
100281
EDIT Like some comments below are remarking the table environment doesn't allow tables over more than one page. However the solution works fine  I need to make a table over more than one page. The standard approach seems to be to use the ltablex environment. However, it doesn't work; also I assume that the table environment may also be required for the thesis template I work on (e.g. suppose for the capture).   \documentclass[11pt]{article} \usepackage{booktabs} \usepackage{tabularx} \usepackage{ltablex}  \begin{document}  \begin{table} \caption{Example of an table} \label{tab:daypack}      \begin{tabularx}{\linewidth}{@{}cX@{}}   \toprule \textbf{Column 1} &amp; \textbf{Column 2} \\[6pt] \midrule \endhead $R$ &amp; 1This is an example sentence \\[6pt] $R$ &amp; 2As well as the line before \\[6pt] $A$ &amp; 3Also this is an example \\[6pt] $R$ &amp; 4This is an example sentence \\[6pt] $R$ &amp; 5As well as the line before \\[6pt] $A$ &amp; 6Also this is an example \\[6pt] $R$ &amp; 7This is an example sentence \\[6pt] $R$ &amp; 8As well as the line before \\[6pt] $A$ &amp; 9Also this is an example \\[6pt] $R$ &amp; 10This is an example sentence \\[6pt] $R$ &amp; 11As well as the line before \\[6pt] $A$ &amp; 12Also this is an example \\[6pt] $R$ &amp; 13This is an example sentence \\[6pt] $R$ &amp; 14As well as the line before \\[6pt] $A$ &amp; 15Also this is an example \\[6pt] $R$ &amp; 16This is an example sentence \\[6pt] $R$ &amp; 17As well as the line before \\[6pt] $A$ &amp; 18Also this is an example \\[6pt] $R$ &amp; 19This is an example sentence \\[6pt] $R$ &amp; 20As well as the line before \\[6pt] $A$ &amp; 21Also this is an example \\[6pt] $R$ &amp; 22This is an example sentence \\[6pt] $R$ &amp; 23As well as the line before \\[6pt] $A$ &amp; 24Also this is an example \\[6pt] $R$ &amp; 25This is an example sentence \\[6pt] $R$ &amp; 26As well as the line before \\[6pt] $A$ &amp; 27Also this is an example \\[6pt] $R$ &amp; 28This is an example sentence \\[6pt] $R$ &amp; 29As well as the line before \\[6pt] $A$ &amp; 30Also this is an example \\[6pt] $R$ &amp; 31This is an example sentence \\[6pt] $R$ &amp; 32As well as the line before \\[6pt] $A$ &amp; 33Also this is an example \\[6pt] $R$ &amp; 34This is an example sentence \\[6pt] $R$ &amp; 35As well as the line before \\[6pt] $A$ &amp; 36Also this is an example \\[6pt] $R$ &amp; 37This is an example sentence \\[6pt] \bottomrule \end{tabularx}    \end{table}      \end{document}
9022
Is it possible to automatically include a reference to the position of a labeled object (Table, Figure) in text? By this I mean the following:  Say I have labeled a figure in chapter 1:  \label{fig:one}   Then I refer to it in text by using:  See Figure~\ref{fig:one}   Which produces "See Figure 1.1" as desired. I'd like to be able to have it produce: "See Figure 1.1, above" or "See Figure 1.1, below", automatically detecting whether to produce "above" or "below" depending on whether the figure will be placed above that position on the final page.
113929
Is there an way to avoid this behavior of the pictures    This is have is wrap the picture:  \begin{wrapfigure}{r}{0.5\textwidth}  \vspace{-20pt}   \begin{center}     \includegraphics[width=0.4\textwidth]{./pictures/DBuserTabel.png}%{./Pictures/mainscreen1.png}     \caption{Uklip af User tablen i Databasen}     \label{fig:databaseUserTable}   \end{center}   \vspace{-20pt}   \vspace{1pt} \end{wrapfigure}
117043
Does anyone know how I can prevent the text in a table cell from wrapping?  This is for the header of a table, and the heading is a lot longer than the data under it, but I need it to display on only one line.  It is okay if the column is very wide.  The HTML of my (simplified) table looks like this:  &lt;table&gt;   &lt;thead&gt;     &lt;tr&gt;       &lt;th&gt;         &lt;div&gt;Really long column heading&lt;/div&gt;       &lt;/th&gt;       &lt;th&gt;         &lt;div&gt;Really long column heading&lt;/div&gt;       &lt;/th&gt;       &lt;th&gt;         &lt;div&gt;Really long column heading&lt;/div&gt;       &lt;/th&gt;       &lt;th&gt;         &lt;div&gt;Really long column heading&lt;/div&gt;       &lt;/th&gt;       &lt;th&gt;         &lt;div&gt;Really long column heading&lt;/div&gt;       &lt;/th&gt;       &lt;th&gt;         &lt;div&gt;Really long column heading&lt;/div&gt;       &lt;/th&gt;       &lt;th&gt;         &lt;div&gt;Really long column heading&lt;/div&gt;       &lt;/th&gt;     &lt;/tr&gt;   &lt;/thead&gt;   &lt;tbody&gt;     &lt;tr&gt;       &lt;td&gt;         &lt;div&gt;data&lt;/div&gt;       &lt;/td&gt;       &lt;td&gt;         &lt;div&gt;data&lt;/div&gt;       &lt;/td&gt;       &lt;td&gt;         &lt;div&gt;data&lt;/div&gt;       &lt;/td&gt;       &lt;td&gt;         &lt;div&gt;data&lt;/div&gt;       &lt;/td&gt;       &lt;td&gt;         &lt;div&gt;data&lt;/div&gt;       &lt;/td&gt;       &lt;td&gt;         &lt;div&gt;data&lt;/div&gt;       &lt;/td&gt;       &lt;td&gt;         &lt;div&gt;data&lt;/div&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt; &lt;/table&gt;   The heading itself is wrapped in a div inside the th tag for reasons pertaining to the javascript on the page.    The table is coming out with the headings wrapping onto multiple lines.  This seems to only happen when the table is sufficiently wide, as the browser is trying to avoid horizontal scrolling.  In my case, though, I want horizontal scrolling.  Any ideas?
111142
I am using the  to typeset a preprint. The MNRAS template is divided into two columns and I am using the figure and figure* environment to place graphs either into one column or over the two columns.   However, the figures are put into the document in the order of appearance and figures* are independently put into the document in the order of appearance of figures*. As a result a "Figure 5" (a non* figure) appears in the document before "Figure 1" (a figure*).   How can I force the correct order of appearance of both figures and figures*?    Renumbering the figures is not an option as the journal requires the figures to appear in order of reference in text. I have tried using the afterpage package as a workaround so that Figures 1-4 are typesetted before Figure 5 but unfortunately \afterpage{\clearpage} triggers already after the left-column ending and the whole right column is left blank.
29682
Hi I want to format my chapter of my thesis as shown in the figure. How can I do it? Can you suggest me some fancy latex templates for a phd thesis?