1

i have many many pictures in my appendix. But my appendix sorted in sections.

\appendix
\section{A} 
picture 
.
.
picture
\section{B}
picture
.
picture
.
\section{C}
.

But it shows me in PDF

\section{A}
picture
\section{B}
\section{C}
picture (which should be in A)
picture(which should be in A)
picture(which should be in B)
picture

How can I have the sections stand there, where I want them?

\documentclass[a4paper,11pt]{article}
\usepackage[ngerman]{babel}

\usepackage[utf8]{inputenc}
%Formalia der schriftlichen Arbeit
\usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage[onehalfspacing]{setspace}
\usepackage{pdfpages}
\usepackage{graphicx}
\usepackage{hyperref}

%lineno vgl. https://www.teuderun.de/latex/layout/zeilennummerierung/
\usepackage{lineno} % Zeilennummerierung
\modulolinenumbers[5]
%Aktuell zum Arbeiten auskommentiert. Später muss es genutzt werden!!!
\usepackage{uarial}

\usepackage{url}
\usepackage{caption}

\usepackage{lscape}
\usepackage{longtable} 

\usepackage{chngcntr}
\counterwithin{figure}{section}

\usepackage[numbers]{natbib}



\usepackage{parskip}
%\setlength{\parindent}{10pt}

%Abstand nach Section

\begin{document}

\tableofcontents
\appendix
\section{Aufgabe A1}

\begin{figure}[ht]
    \centering
  \includegraphics[width=.99\textwidth,angle = 270 ]{Aufgaben/A1.pdf}
    \caption{Aufgabe 1}
    \label{A1a}
\end{figure}
\begin{figure}[ht]
    \centering
  \includegraphics[width=.99\textwidth,angle = 270 ]{Aufgaben/A1.pdf}
    \caption{Aufgabe 1}
    \label{A1a}
\end{figure}
\begin{figure}[ht]
    \centering
  \includegraphics[width=.99\textwidth,angle = 270 ]{Aufgaben/A1.pdf}
    \caption{Aufgabe 1}
    \label{A1a}
\end{figure}
\section{B} 
\begin{figure}[ht]
    \centering
  \includegraphics[width=.99\textwidth,angle = 270 ]{Aufgaben/A1.pdf}
    \caption{Aufgabe 1}
    \label{A1a}
\end{figure}
\begin{figure}[ht]
    \centering
  \includegraphics[width=.99\textwidth,angle = 270 ]{Aufgaben/A1.pdf}
    \caption{Aufgabe 1}
    \label{A1a}
\end{figure}
\begin{figure}[ht]
    \centering
  \includegraphics[width=.99\textwidth,angle = 270 ]{Aufgaben/A1.pdf}
    \caption{Aufgabe 1}
    \label{A1a}
\end{figure}
1
  • 1
    Just add \clearpage before \section{B} ...
    – Mensch
    Jan 29, 2018 at 0:55

2 Answers 2

2

In your code you should change some things, for example should be package hyperref called last. Please see my changings marked in the following MWE with <========.

To solve your problem simply use command \clearpage before \section{B}. Then first all outstanding images are printed, then the next page is started with section B ...

\documentclass[a4paper,11pt]{article}

\usepackage[ngerman]{babel}

\usepackage[utf8]{inputenc}
%Formalia der schriftlichen Arbeit
\usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm]{geometry}

\usepackage[demo]{graphicx} % <=========================================

\usepackage[onehalfspacing]{setspace}
\usepackage{pdfpages}

%lineno vgl. https://www.teuderun.de/latex/layout/zeilennummerierung/
\usepackage{lineno} % Zeilennummerierung
\modulolinenumbers[5]
%Aktuell zum Arbeiten auskommentiert. Später muss es genutzt werden!!!
\usepackage{uarial}

\usepackage{url}
\usepackage{caption}

\usepackage{lscape}
\usepackage{longtable} 

\usepackage{chngcntr}
\counterwithin{figure}{section}

\usepackage[numbers]{natbib}

\usepackage{parskip}
%\setlength{\parindent}{10pt}
\usepackage{hyperref} % <===============================================


\begin{document}

\tableofcontents
\appendix
\section{Aufgabe A1}

\begin{figure}[ht]
    \centering
  \includegraphics[width=.99\textwidth,angle = 270 ]{Aufgaben/A1.pdf}
    \caption{Aufgabe 1}
    \label{A1a}
\end{figure}
\begin{figure}[ht]
    \centering
  \includegraphics[width=.99\textwidth,angle = 270 ]{Aufgaben/A1.pdf}
    \caption{Aufgabe 1}
    \label{A1a}
\end{figure}
\begin{figure}[ht]
    \centering
  \includegraphics[width=.99\textwidth,angle = 270 ]{Aufgaben/A1.pdf}
    \caption{Aufgabe 1}
    \label{A1a}
\end{figure}
\clearpage % <==========================================================
\section{B} 
\begin{figure}[ht]
    \centering
  \includegraphics[width=.99\textwidth,angle = 270 ]{Aufgaben/A1.pdf}
    \caption{Aufgabe 1}
    \label{A1a}
\end{figure}
\begin{figure}[ht]
    \centering
  \includegraphics[width=.99\textwidth,angle = 270 ]{Aufgaben/A1.pdf}
    \caption{Aufgabe 1}
    \label{A1a}
\end{figure}
\begin{figure}[ht]
    \centering
  \includegraphics[width=.99\textwidth,angle = 270 ]{Aufgaben/A1.pdf}
    \caption{Aufgabe 1}
    \label{A1a}
\end{figure}
\end{document}

to get the result:

enter image description here

2

Just for fun. This solution puts the section and all of the figures into [p] floats. There is no limit to the number of [p] floats per page. The floats are kept in order, even if some lack captions.

\documentclass{article}

\begin{document}
\tableofcontents
\listoffigures

\appendix
\begin{figure}[p]
\section{first}
\end{figure}
\begin{figure}[p]
\caption{A}
\end{figure}
\begin{figure}[p]
\caption{B}
\end{figure}
\begin{figure}[p]
\caption{C}
\end{figure}
\begin{figure}[p]
\section{second}
\end{figure}
\begin{figure}[p]
\caption{D}
\end{figure}
\begin{figure}[p]
\caption{E}
\end{figure}
\begin{figure}[p]
\caption{F}
\end{figure}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .