2

In LyX I enter a figure/graphic at the end of a paragraph using Insert > Float > Figure. enter image description here 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]

  • 2
    note if you don't want the image to move you can just use \includegraphics the only reason for the figure environment is to make the figure a float ie a block that can be moved to help page breaking, – David Carlisle Nov 21 '15 at 18:38
  • I added that because I previously was using "graphics" instead of "float". I removed the \noindent \begin{center} but the problem is still there. – The Substitute Nov 21 '15 at 18:38
  • figures typically go at the top of the current or next page, that isn't a problem it's what they are designed to do. The positioning can be customised, but hard to say without an example. – David Carlisle Nov 21 '15 at 18:54
  • @DavidCarlisle I've edited to include the image I am referring to. I can enter the example you referred to if that's more appropriate. – The Substitute Nov 21 '15 at 19:05
  • 1
    To remove the \noindent and center environment, right click just outside, to the left, of the figure environment, and click Paragraph settings. In that box, check Indent paragraph, and select Paragraph's default (justified). – Torbjørn T. Nov 21 '15 at 20:36
4

Above the float, you should see a box with the text "float: Figure". If you right click it, then select "Settings...", then you should get this box:

enter image description here

Uncheck "Use default placement" and play around with the settings under "Advanced Placement Options". To try David Carlisle's suggestion of htp, select "Here if possible", "Top of page" and "Page of floats".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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