Generalmisplace figures

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
xconw1ng
Posts: 2
Joined: Sun May 12, 2013 7:44 pm

misplace figures

Post by xconw1ng »

Hi all,

I'm just a beginner in this latex. I'm trying to put certain figure in the right section but it doesn't come out the way it suppose to. Please help. The figures should be in its respective section as follow:

A. Low pass filter
figure 1.
B. Band pass filter
figure 2.
C. High pass filter
figure 3.

Thanks,
Andy

Code: Select all

\documentclass[conference]{IEEEtran}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{cite}
\usepackage{subfigure}

% Additional Options
\usepackage{blindtext}
\usepackage[english]{babel}
\begin{document}
\title{EExxxx\\
tEh tiTTle}    
\author{\authorblockN{Blue Guy}    	
\authorblockA{DivisionO\\PointO\\
Texas State University\\
San Marcos, Texas 78666 \\
Email: blueguy@txstate.edu}
}

%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%
\section{Data / Analysis}
\label{sec:data_analysis}
\blindtext

    %%%%%%%%%%%%%% lowpass
\subsection{Low Pass Filter}
\label{subsec:low_pass_filter}

\begin{figure}[htbp]                        % Figure 1
	\centering
	\includegraphics[width=0.5\textwidth]{lp_db_mag.pdf}
	\caption[lp_db_mag]{Low pass filter.}
	\label{fig:lp_mag}
\end{figure}

    %%%%%%%%%%%%%% bandpass
\subsection{Band Pass Filter}
\label{subsec:band_pass_filter}

\begin{figure}[htbp]                        % Figure 2
	\centering
	\includegraphics[width=0.5\textwidth]{bp_db_mag.pdf}
	\caption[bp_db_mag]{Band pass filter.}
	\label{fig:bp_mag}
\end{figure}

    %%%%%%%%%%%%%% highpass
\subsection{High Pass Filter}
\label{subsec:high_pass_filter}

\begin{figure}[htbp]                        % Figure 3
	\centering
	\includegraphics[width=0.5\textwidth]{hp_db_mag.pdf}
	\caption[hp_db_mag]{High pass filter.}
	\label{fig:hp_mag}
\end{figure}

%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%
\section{Conclusion}
\label{sec:conclusion}
\blindtext

%%%%%%%%%%%%%% Bibliography %%%%%%%%%%%%%%%
\bibliographystyle{IEEEtran}		% this is for IEEEtran bibliography. Keep this
%%%%%%%%%%%%%% Bibliography File %%%%%%%%%%%%%%%
\bibliography{References_Paper}  % must be same as your .bib file name in same folder

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10347
Joined: Mon Mar 10, 2008 9:44 pm

misplace figures

Post by Stefan Kottwitz »

Hi Andy,

welcome to the forum!

You could use the placeins package (\usepackage{placeins}) and its command \FloatBarrier, right after each subsection.

Stefan
LaTeX.org admin
xconw1ng
Posts: 2
Joined: Sun May 12, 2013 7:44 pm

Re: misplace figures

Post by xconw1ng »

Wow, that was simple. Thank you Stefan_K. I guess its one of things that come with experience huh.
Post Reply