4

I'm new to LaTeX and I've got my first issue with wrapfigure. I want to have an image on the right side of my document. Text on the left.

HEADLINE
text text text text text
text text text text text
text text text IMAGE IMAGE
text text text IMAGE IMAGE
text text text IMAGE IMAGE
text text text text text
text text text text text

Therefore I use:

\section{Impressum}
\label{impressum}

\begin{wrapfigure}[43]{h}[0cm]{6cm}
    \vspace{-12pt}
    \fbox{\includegraphics[width=0.35\textwidth]{screens/savedlocations}}
    \caption[placeholder]{placeholder}
    \label{fig:placeholder}
\end{wrapfigure}

    text text text text text text text text text text text text text text text
 text text text text text text text text text text text text text text text text
 text text text text text text text text text text text text text text text text
 text text text text text text text text text text text text text text text text
 text text text text text text text text text text text text text text text text
 text text text text text text text text text text text text text text text text

But the Image only appears on the end of my document (even after mylistoffigures.

I am wondering why because I used this code five times before this section and it works.

EDIT: Error Message: Package wrapfig Warning: Collision between wrapping environments on input line 233.

LatexCode:

\documentclass[12pt]{scrartcl}

\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage[ngerman]{babel}
\addto\captionsngerman{\renewcommand{\figurename}{Bild}}

\usepackage{chngcntr}
\counterwithout{figure}{section}

\usepackage{geometry}
\geometry{a4paper, left=2.5cm, right=2cm, top=3cm, bottom=3cm}
\setlength{\footskip}{2cm}

\title{TITLE}

\begin{document}
\maketitle
\pagebreak
\tableofcontents
\pagebreak

\section{Einleitung}
\label{sec:einleitung}
text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 


\pagebreak
\section{App Konzept}
\label{sec:app-kozept}


\subsection{Lesen}
\label{subsec:lesen}
text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 


\subsection{Verwalten}
\label{subsec:verwalten}
text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 


\subsection{Navigation}
\label{subsec:navigation}

text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 


\begin{wrapfigure}[43]{h}[0cm]{0cm}
    \vspace{-12pt}
    \fbox{\includegraphics[width=0.35\textwidth]{screens/adddata_full}}
    \caption[Ausgefülltes Daten hinzufügen Fragment]{Ausgefülltes Daten         hinzufügen Fragment}
    \label{fig:adddatafull}

    \vspace{20pt}
    \fbox{\includegraphics[width=0.35\textwidth]{screens/savedrooms_full}}
    \caption[Gespeicherte Räume]{Gespeicherte Räume}
    \label{fig:savedrooms}
\end{wrapfigure}

text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 



\pagebreak
\subsection{Standortverwaltung}
\label{subsec:standwortverwaltung}

\begin{wrapfigure}[43]{h}[0cm]{0cm}
    \vspace{-12pt}
    \fbox{\includegraphics[width=0.35\textwidth]{screens/savedlocations}}
    \caption[Gespeicherte Standorte]{Gespeicherte Standorte}
    \label{fig:savedlocations}

    \vspace{20pt}
    \fbox{\includegraphics[width=0.35\textwidth]{screens/savedlocations_fabs}}
    \caption[Fabs des Fragments]{Fabs des Fragments}
    \label{fig:savedlocations-fabs}
\end{wrapfigure}

text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 



\pagebreak
\section{Impressum}
\label{impressum}

\begin{wrapfigure}[]{h}[0cm]{0cm}
    \fbox{\includegraphics[width=0.35\textwidth]{screens/savedlocations}}
    \caption[placeholder]{placeholder}
    \label{fig:placeholder}
\end{wrapfigure}

text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 
text text text text text text text text text text text text text text text text 

\pagebreak
\listoffigures


\end{document}

EDIT2: Result if I add another Figure:

\section{Impressum}
\label{impressum}

\begin{wrapfigure}[]{h}[0cm]{0cm}
    \fbox{\includegraphics[width=0.35\textwidth]{screens/placeholder}}
    \caption[placeholder]{placeholder}
    \label{fig:placeholder}
\end{wrapfigure}

\begin{wrapfigure}[]{h}[0cm]{0cm}
    \fbox{\includegraphics[width=0.35\textwidth]{screens/placeholder}}
    \caption[placeholder]{placeholder}
    \label{fig:placeholder}
\end{wrapfigure}

text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text 

enter image description here

  • 1
    Welcome to TeX SX! Do you really need to shorten 43 lines? It's about the total number of lines in a normal page. – Bernard Dec 21 '15 at 11:20
  • Yes youre right. But one page earlier I had two pictures in one wrapfigure so I needed the 43 lines. But even with 20 or 10 or zero the Image jumps to the end. – Rod Kimble Dec 21 '15 at 11:26
  • The image is inserted near the bottom of the page? – Bernard Dec 21 '15 at 11:28
  • No. The \section is the first thing I added on a fresh page – Rod Kimble Dec 21 '15 at 11:29
  • Could you post a minimal (non)working code, so we can play with it? Note that, for the width, you should replace 6cm with 0cm: wrapfig will then use the natural width of the figure (0.3\textwidth). – Bernard Dec 21 '15 at 11:35
1

I suppose that your figure is too big. The following setting with width= and height= is only for some demonstration. Often one needs keepaspectratio=true when using both options.

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{wrapfig}
\usepackage{blindtext}
\begin{document}
    \section{Impressum}
    \label{impressum}

    \begin{wrapfigure}[43]{h}[0cm]{0.4\textwidth}\centering
        \vspace{-\normalbaselineskip}
        \fbox{\includegraphics[width=0.35\textwidth,height=39\normalbaselineskip]{screens/savedlocations}}
        \caption[placeholder]{placeholder}
        \label{fig:placeholder}
    \end{wrapfigure}        
    text text text text text text text text text text text text text text text
    text text text text text text text text text text text text text text text text
    text text text text text text text text text text text text text text text text
    text text text text text text text text text text text text text text text text
    text text text text text text text text text text text text text text text text
    text text text text text text text text text text text text text text text text 
\Blindtext      
\end{document}

enter image description here

For two figures use:

\begin{wrapfigure}[43]{h}[0cm]{0.4\textwidth}\centering
    \vspace{-\normalbaselineskip}
    \fbox{\includegraphics[width=0.35\textwidth,height=18\normalbaselineskip]{screens/savedlocations}}
    \caption[placeholder]{placeholder}
    \label{fig:placeholder}
    \bigskip
    \fbox{\includegraphics[width=0.35\textwidth,height=18\normalbaselineskip]{screens/savedlocations}}
    \caption[placeholder]{placeholder}
    \label{fig:placeholder2}
\end{wrapfigure}        
  • I dont get it ... I dont think that the figure is too big. Because It works ~20 miles above with the same code. I will add another image to my question because with another figure it gets more and more curious. – Rod Kimble Dec 21 '15 at 12:00
  • If you have two figures then put both in one \wrapfigure environment (see edited answer) – user2478 Dec 21 '15 at 12:12
  • normally I use just one \wrapfigure this was just for test purpose – Rod Kimble Dec 21 '15 at 12:15
0

I got it! The problem was the wrapfigure above.

    \begin{wrapfigure}[43]{h}[0cm]{0cm}
    \vspace{-12pt}
    \fbox{\includegraphics[width=0.35\textwidth]{screens/savedlocations}}
    \caption[Gespeicherte Standorte]{Gespeicherte Standorte}
    \label{fig:savedlocations}

    \vspace{20pt}
    \fbox{\includegraphics[width=0.35\textwidth]{screens/savedlocations_fabs}}
    \caption[Fabs des Fragments]{Fabs des Fragments}
    \label{fig:savedlocations-fabs}
\end{wrapfigure}

I shortened 43 line but the page wasnt full. So the \wrapfigure laped into the next page -.-

  • 1
    You can use the undocumented \WFclear to stop that from happening. – John Kormylo Dec 21 '15 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.