3

In my thesis, I need to include the descriptions of 79 items in the appendix. Each description takes about half a page, and includes a picture. I want to always have two of these per page, and have the text (which will be an enumeration) wrap around the picture.

I had imagined that I can create minipages and place two of them per page. First, I realized that I can't have a float within a minipage or another similar environment, so maybe I can't use a minipage or a similar environment? Second, without the minipage, wrapfig places the picture in some weird place. How do I get my layout to look like the mockup?

enter image description here

Here a MWE just to have the text, it compiles to something very different from what I want:

\documentclass[a4paper]{article}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{mwe}

\begin{document}
 \section{The name (preferably as a section)}
 \begin{wrapfigure}{r}{0.5\textwidth}
 \includegraphics[width=0.48\textwidth]{example-image}
 \end{wrapfigure}
 \begin{description}
  \item[Color] red
  \item[Year] 2005
  \item[Something else] This is a feature which needs a longer explanation. It will wrap around. 
  \item[Foo] bar
  \item[And another long item] Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
 \end{description}

  \section{The name of the second one}
 \begin{wrapfigure}{r}{0.5\textwidth}
 \includegraphics[width=0.48\textwidth]{example-image}
 \end{wrapfigure}
 \begin{description}
  \item[Color] green
  \item[Year] 2010
  \item[Something else] This is a feature which needs a longer explanation. It will wrap around. 
  \item[Foo] bar
  \item[And another long item] Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
 \end{description}

\end{document}
rumtscho
  • 989
  • @campa yes, I found similar statements already. I am not set on using the wrapfigure package, or the description list for that matter, I am asking what is a way to create that layout that works, with some reasonable effort (not having to manually position each row or something like that). – rumtscho May 27 '16 at 16:11
  • offtopic: what tool did you use for the mockup? – naphaneal May 27 '16 at 16:20
  • @naphaneal pencil, http://pencil.evolus.vn/ – rumtscho May 27 '16 at 16:21
  • wrapfig and lists are officially unsupported, I think. You cannot wrap a figure with a list environment (itemize, enumerate, etc) without using some particular code. ConTeXt is an exception though. Possible duplicate: [Wrapfigure in an enumerate environment. duplicate] – Alenanno May 27 '16 at 16:52
  • @Alenanno OK, so I might need to use something else to place the figure and list together. Still, I also have that interaction with the "two descriptions per page" thing, which make the matter more complex than just getting the list and picture to play along. – rumtscho May 27 '16 at 16:57
  • @rumtscho I suppose you could "fake" the list and nobody would notice the difference if done properly. – Alenanno May 27 '16 at 17:00
  • 3
    You *surely* don't want to use Comic Sans, do you? ;-) – egreg May 27 '16 at 17:13

1 Answers1

5

Here is a solution with wrapfigure. I replaced the items of a description environment (wrapfigure won't work) with a special formatting of \paragraph with the titlesec package, in order to mimick the layoout of a description environment:

\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{fourier, erewhon}
\usepackage[showframe]{geometry}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{mwe}
\usepackage{appendix}

\usepackage[aftersep]{titlesec}
\titleformat{\paragraph}[runin]{\bfseries\normalsize}{}{0em}{}[]

\titlespacing{\paragraph}{-\leftskip}{\topsep}{\itemsep}

\begin{document}
\appendix
\leftskip =2.5em
\setlength\intextsep{1.3ex}
\renewcommand\thesection{A.\arabic{section}}

\section{The name (preferably as a section)}
\begin{wrapfigure}[12]{r}{0pt}
  \hspace*{-2em}\includegraphics[width=0.48\textwidth]{example-image}\hspace*{2.5em}
\end{wrapfigure}
\paragraph{Color} red
\paragraph{Year} 2005
\paragraph{Something else} This is a feature which needs a longer explanation. It will wrap around.
\paragraph{Foo} bar
\paragraph{And another long item} Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

\section{The name of the second one}\leftskip =2.5em
\begin{wrapfigure}[12]{r}{0pt}
  \hspace*{-2em}\includegraphics[width=0.48\textwidth]{example-image}\hspace*{2.5em}
\end{wrapfigure}
\paragraph{Color} green
\paragraph{Year} 2010
\paragraph{Something else} This is a feature which needs a longer explanation. It will wrap around.
\paragraph{Foo} bar
\paragraph{And another long item} Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

\end{document} 

enter image description here

Bernard
  • 271,350
  • Thank you, I got it working that way. Is there an easy way to also make the A.2 to appear at the exact start of the second half of the page? If yes, I'd love it if you could update the solution with it. But if it requires too much acrobatics, I guess this is good enough for me. – rumtscho May 28 '16 at 12:26