2

Following is a snippet which shows my problem. I have three large (two half-page, one full-page landscape) which need to stay within the section titled "Schematics and Models." I thought that [H] would do it, but instead it just moves all three images to the end of the document.

A: Why aren't the images immediately following the section header like I expect? B: How can I ensure the images are within the section?

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx} % Required for the inclusion of images
\usepackage{cite}
\usepackage{wrapfig} %allows wrapping text around figures
\newpage
\section{Schematics and Models}

\begin{document}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth,height=\textheight,keepaspectratio]{1_bit_ALU.png}
\caption{Gate level implementation of a 1 bit ALU. C\_o is the carry/borrow out and Q is the result. Inputs are A,B,C\_in, F0 and F1.}
\label{fig:1BSlice}
\end{figure}

\begin{figure}[H]
\centering
\includegraphics[width=\textwidth,height=\textheight,keepaspectratio]{3_bit_test_bench.png}
\caption{Block level implementation of 3 bit ALU consisting of 3 1 Bit ALUs joined in series.}
\label{fig:3BSchematic}
\end{figure}

\begin{figure}[H]
\centering
\includegraphics[angle=270, width=\textwidth, keepaspectratio]{3_bit_result.png}
\caption{Result of running simulation on 3 bit ALU test bench. }
\label{fig:3BResult}
\end{figure}

\section{Simulation Results}
\section{Analyses and Explanations}
\section{Conclusions}

\section{Answers to Questions}
\paragraph{Discuss what is a heirarchical design}
\paragraph{Discuss the advantages of a hierarchical design such as what was accomplished in this lab.}

\end{document}
Daniel B.
  • 155

1 Answers1

4

If you add \clearpage before the next section, all floats will be removed from memory.

But if you are using only H option in figure environment, floats may be unneded. You may consider adding captions only. See, e.g., Label and caption without float

  • Alternatively, use the placeins package. – Mike Renfro Sep 26 '15 at 19:21
  • Can I still use \ref{label} if it's not in a figure environment? – Daniel B. Sep 26 '15 at 19:23
  • @DanielB. Yes. See the link added into my answer. – Przemysław Scherwentke Sep 26 '15 at 19:26
  • Alright. Clearpage mostly fixed the issue, but with the \newpage there, it put the section header on one page, both the smaller images on one page, the larger image on one page. Changing the H to h fixed that, thought I don't really get why. – Daniel B. Sep 26 '15 at 19:28
  • H should only work with the float package included. I suspect if you look in your logs, you'll see all the H formats were replaced with ht. And if you try to set the image's width, height, and set keepaspectratio, one of those will be violated unless the image aspect ratio matches the page's typeblock exactly. – Mike Renfro Sep 26 '15 at 21:12