Graphics, Figures & TablesAll figures have moved after Appendices section

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
absam82
Posts: 13
Joined: Thu Nov 25, 2010 10:00 am

All figures have moved after Appendices section

Post by absam82 »

Hi,
For some unknown reasons all my figures have moved after Appendices section. I cannot recall any changes which would force the complete set of figures to behave like this. As well as I have not added any new \usepackage commands since ages. However, I have included the MWE for you to view potential problems.

Code: Select all

\documentclass[a4paper,11pt,oneside,english]{article}
\usepackage[margin=2.54cm,top=2.54cm]{geometry}
\usepackage{hyperref}
\usepackage{threeparttable}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{verbatim}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage[T1]{fontenc}
\usepackage{txfonts}
\usepackage{setspace}
\usepackage{appendix}
\usepackage[font=small,labelfont=bf,tableposition=top]{caption}
\usepackage{blindtext}
\usepackage{babel}
\usepackage[latin1]{inputenc}

\author{\ldots}
\date{\ldots}
\title{\ldots}
\newpage
\begin{document}
\doublespacing
\maketitle
\include{Abstract/abstract}
\begin{abstract}
\ldots
\end{abstract}
\newpage
\tableofcontents
\newpage
\listoffigures
\listoftables
\newpage
\section{Introduction}
\section{other sections in my paper}
I have included one graph as a sample.
\begin{figure}[hp]
\caption{The Lorenz Curve}\label{gini}
\centering
\includegraphics[width=65mm, height=65mm]{GiniCoefficient.jpg}
\end{figure}
\newpage
\appendix
\appendixpage
\addappheadtotoc
\end{subappendices}
\end{document}
\backmatter 


Any help would be appreciated...
Thanks

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

All figures have moved after Appendices section

Post by frabjous »

I can't replicate the behavior. You might want to read up a bit on how to construct a minimal working example, since it's very hard to diagnose a problem I can't reproduce.

Here's the code I used. I commented out the \include line for the Abstract, since I don't have access to that file. I also commented out the mysterious \end{subappendices} since there was no \begin{subappendices} as well as the mysterious \backmatter after \end{document}. I also added the lipsum package, which is used to create filler text.

Code: Select all

\documentclass[a4paper,11pt,oneside,english]{article}
\usepackage[margin=2.54cm,top=2.54cm]{geometry}
\usepackage{hyperref}
\usepackage{threeparttable}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{verbatim}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage[T1]{fontenc}
\usepackage{txfonts}
\usepackage{setspace}
\usepackage{appendix}
\usepackage[font=small,labelfont=bf,tableposition=top]{caption}
\usepackage{blindtext}
\usepackage{babel}
\usepackage[latin1]{inputenc}
\usepackage{lipsum}
\author{\ldots}
\date{\ldots}
\title{\ldots}
\newpage
\begin{document}
\doublespacing
\maketitle
%\include{Abstract/abstract}
\begin{abstract}
\lipsum[1]
\end{abstract}
\newpage
\tableofcontents
\newpage
\listoffigures
\listoftables
\newpage
\section{Introduction}
\lipsum[1-2]
\section{other sections in my paper}
\lipsum[3]
I have included one graph as a sample.
\lipsum[4-5]
\begin{figure}[hp]
\caption{The Lorenz Curve}\label{gini}
\centering
\includegraphics[width=65mm, height=65mm]{GiniCoefficient.jpg}
\end{figure}
\lipsum[7-16]
%\newpage
\appendix
\appendixpage
\addappheadtotoc
\lipsum[111-112]
%\end{subappendices}
\end{document}
%\backmatter 
The figure was in the middle of the section, as expected.
absam82
Posts: 13
Joined: Thu Nov 25, 2010 10:00 am

Re: All figures have moved after Appendices section

Post by absam82 »

Thank you for your kind advise

Yes, sure. I will go through MWE. I used your code it worked fine. However, when I further looked into my problem, I was able to identify what caused all the figures to be removed at appendices. It is basically letter "p" which appears in \begin{figure}[hp] of my Lorenz curve graph. Once I have removed it the problem was solved. Thank you anyway.
Post Reply