When I include the following figure it doesn't go directly below the text after the semicolon but skips onto the next page (it does however appear below the semicolon). The image is the size I want it to be. I just need to know how to force it to appear on the same page without changing the size. How can I force the figure not only to appear below the semicolon in the following example, but force it not to skip onto the next page?
\documentclass[12pt,a4paper]{article}
\usepackage{float}
\usepackage{graphicx}
\begin{document}
The sequent calculus proof of this uses contraction and is therefore not derivable in linear logic (unless special modalities are used):
\begin{figure}[H]
\includegraphics[width=10cm,scale=18]{prooftreeseqmg2.pdf}
\centering
\end{figure}
\end{document}
Best Answer
Your image is a displayed formula (that could by directly produced with LaTeX, I believe), so treat it as a displayed formula:
There's no rule that says
\includegraphics
should be in afigure
environment. To the contrary, it can go everywhere: as far as TeX is concerned, the image is just like a big box.Note that specifying
scale=18
andwidth=10cm
is redundant: just use the width; it's probably better to say something like(adjust the factor to your liking).
If the PDF image has white margins, use
trim
:experimenting what dimensions are the good ones. The trimming lengths are in the order “left–bottom–right—top”.
Using the image you posted, here's the example:
Remove the
\fbox
that I just added for debugging.