LaTeX forum ⇒ Generalmisplace figures Topic is solved

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

misplace figures

Postby xconw1ng » Sun May 12, 2013 7:53 pm

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

  1. \documentclass[conference]{IEEEtran}
  2. \usepackage{graphicx}
  3. \usepackage{amsmath}
  4. \usepackage{cite}
  5. \usepackage{subfigure}
  6.  
  7. % Additional Options
  8. \usepackage{blindtext}
  9. \usepackage[english]{babel}
  10. \begin{document}
  11. \title{EExxxx\\
  12. tEh tiTTle}
  13. \author{\authorblockN{Blue Guy}
  14. \authorblockA{DivisionO\\PointO\\
  15. Texas State University\\
  16. San Marcos, Texas 78666 \\
  17. Email: blueguy@txstate.edu}
  18. }
  19.  
  20. %%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%
  21. \section{Data / Analysis}
  22. \label{sec:data_analysis}
  23. \blindtext
  24.  
  25. %%%%%%%%%%%%%% lowpass
  26. \subsection{Low Pass Filter}
  27. \label{subsec:low_pass_filter}
  28.  
  29. \begin{figure}[htbp] % Figure 1
  30. \centering
  31. \includegraphics[width=0.5\textwidth]{lp_db_mag.pdf}
  32. \caption[lp_db_mag]{Low pass filter.}
  33. \label{fig:lp_mag}
  34. \end{figure}
  35.  
  36. %%%%%%%%%%%%%% bandpass
  37. \subsection{Band Pass Filter}
  38. \label{subsec:band_pass_filter}
  39.  
  40. \begin{figure}[htbp] % Figure 2
  41. \centering
  42. \includegraphics[width=0.5\textwidth]{bp_db_mag.pdf}
  43. \caption[bp_db_mag]{Band pass filter.}
  44. \label{fig:bp_mag}
  45. \end{figure}
  46.  
  47. %%%%%%%%%%%%%% highpass
  48. \subsection{High Pass Filter}
  49. \label{subsec:high_pass_filter}
  50.  
  51. \begin{figure}[htbp] % Figure 3
  52. \centering
  53. \includegraphics[width=0.5\textwidth]{hp_db_mag.pdf}
  54. \caption[hp_db_mag]{High pass filter.}
  55. \label{fig:hp_mag}
  56. \end{figure}
  57.  
  58. %%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%
  59. \section{Conclusion}
  60. \label{sec:conclusion}
  61. \blindtext
  62.  
  63. %%%%%%%%%%%%%% Bibliography %%%%%%%%%%%%%%%
  64. \bibliographystyle{IEEEtran} % this is for IEEEtran bibliography. Keep this
  65. %%%%%%%%%%%%%% Bibliography File %%%%%%%%%%%%%%%
  66. \bibliography{References_Paper} % must be same as your .bib file name in same folder
  67.  
  68. \end{document}

Tags:

User avatar
Stefan Kottwitz
Site Admin
Posts: 9524
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun May 12, 2013 10:04 pm

Hi Andy,

welcome to the forum!

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

Stefan
Site admin

xconw1ng
Posts: 2
Joined: Sun May 12, 2013 7:44 pm

Postby xconw1ng » Mon May 13, 2013 12:19 am

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


Return to “General”

Who is online

Users browsing this forum: No registered users and 6 guests