Hi,
I'm now layouting my Bachelor Thesis Electrical Engineering, but there is one thing I can't figure out how to do.
I have a flow diagram (tall and slim) and an other figure (small), which I want to place next to eachother with text inbetween. So I tried wrapfigure with both, one aligned right and one left. But TeXnicCenter&&MikTex can't place them side by side.
With subfigure nor with minipage there is text between the figures.
Is there another solution?
p.s. I'm sorry for my crappy English.
Sketch: (-=text; *=figure)
-----------------------------
***---------------------*****
***---------------------*****
***---------------------*****
------------------------*****
------------------------*****
------------------------*****
------------------------*****
------------------------*****
------------------------*****
------------------------*****
------------------------*****
------------------------*****
------------------------*****
Graphics, Figures & Tables ⇒ two wrapfigures side by side
NEW: TikZ book now 40% off at Amazon.com for a short time.

two wrapfigures side by side
MWE:
Code: Select all
\documentclass[10pt, a4paper, oneside, final]{report}
%%layout options
\usepackage[inner=2cm, outer=2cm,top=2cm,bottom=3cm,footskip=2cm]{geometry} %margins
\usepackage[compact,small]{titlesec} %resizes the titles
\usepackage{fancyhdr} %headers
\usepackage[none]{hyphenat} %no hypenation
\usepackage{afterpage}
%%language options
\usepackage[dutch]{babel} %used language
\usepackage[latin1]{inputenc} %use of ë,ï, etc
\usepackage{amsmath} %math symbols
\usepackage{amssymb} %other symbols
%%table options
\usepackage{tabularx} %chill tables
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
%%figure options
\usepackage{graphicx} %graphics
\usepackage{float} %floating graphicx
\usepackage{wrapfig} %textwrapping
\usepackage{subfig} %enable subfigures
\usepackage{picins}
%%reference options
\usepackage[dutch]{varioref} %references like ``op de volgende pagina''
\usepackage[breaklinks=true]{hyperref} %clickable links
\usepackage[all]{hypcap} %rearanges the captions
\hypersetup{ %setup the links
colorlinks,%
citecolor=black,%
filecolor=black,%
linkcolor=black,%
urlcolor=black
}
%\usepackage{color} %textcolor
%\usepackage{textcomp} %symbols
%\usepackage{listings} %code inclusion
%\usepackage[T1,T5]{fontenc} %??
%\usepackage{microtype} %??
%%renewcommands
\let\origitemize\itemize
\let\origenumerate\enumerate
\let\origdescription\description
\renewenvironment{itemize}
{\origitemize\itemsep=1pt\parskip=0pt\parsep=0pt}
{\endlist}
\renewenvironment{enumerate}
{\origenumerate\itemsep=1pt\parskip=0pt\parsep=0pt}
{\endlist}
\renewenvironment{description}
{\origdescription\itemsep=1pt\parskip=0pt\parsep=0pt}
{\endlist}
%%newcommands
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\newcommand{\gref}[1] {
\hyperref[#1]{\vref{#1}}
}
%usage: \gref{LABELNAME} i.e. \gref{Chick}
\newcommand{\img}[3] {
\begin{figure}[htp]
\centering
\includegraphics[width=\textwidth]{#1}
\caption[justification=raggedright]{#2}
\label{img_#3}
\end{figure}
% \afterpage{\clearpage}
}
\newcommand{\wimg}[5]{
\begin{wrapfigure}{#5}{#4}
\vspace{-20pt}
\begin{center}
\includegraphics[width=#4]{#1}
\end{center}
\vspace{-20pt}
\caption[justification=raggedright]{#2}
\vspace{-10pt}
\label{img_#3}
\end{wrapfigure}
}
\newcommand{\wimgg}[5]{
\piccaption[justification=raggedright]{#2}
\label{#3}
\parpic[#5]{\includegraphics[width=#4]{#1}}
}
\newcommand{\simg}[8] {
\begin{figure}[H]
\centering
\subfloat[#2]{\label{img_#3}\includegraphics[width=0.35\textwidth]{#1}}
\hfill\footnotesize
\subfloat[#5]{\label{img_#6}\includegraphics[width=0.35\textwidth]{#4}}
\caption[justification=raggedright]{#7}
\label{img_#8}
\end{figure}
}
%usage: \img{FILENAME}{CAPTION}{LABEL} i.e. \img{NiceChick}{A nice girl!}{Chick}
\pagestyle{fancyplain}
\begin{document}
text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1 text1
\wimg{./pictures/smallpicture}{caption smallpic}{label smallpic}{0.2\textwidth}{l}
\wimg{./pictures/tallpicture}{caption tallpic}{label tallpic}{0.1\textwidth}{r}
text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2
\end{document}
Last edited by redkuul on Mon Jan 25, 2010 2:55 pm, edited 7 times in total.
-
- Posts: 90
- Joined: Fri Nov 06, 2009 7:29 am
two wrapfigures side by side
That is not a full MWE, please include the rest of the preamble (i.e. the documentclass you are using and the packages you have loaded) in a form that can be directly copy-pasted into a TeX editor and compiled.
Re: two wrapfigures side by side
OK, is it ok now?
as you can see, I'm now trying it with picins/parpic (newcommand \wimgg), it works, but the text is going over the first figure.
as you can see, I'm now trying it with picins/parpic (newcommand \wimgg), it works, but the text is going over the first figure.