8

I'm working on a textbook with many figures, and I've been using wrapfig to place ones that are less than a full-page wide. However, the results are often just plain awful. Reading around, I was surprised to learn that wrapfig doesn't actually determine and use the optimal placement like most things in LaTeX do, and that it's essentially obligatory to go over your whole document in its near final form and manually move things around to fix figures wrapped in wrapfig. That ain't the LaTeX way! And as this package was last updated in 2003, as far as I can tell, it won't ever be improved.

So what is the best alternative to wrapfig?

7
  • A two-column book. Not only allow a nice placement of figures with 50% widths, but also more readable text (fewer characters per line and margin is always in the same place).
    – Fran
    Nov 15, 2020 at 6:27
  • 1
    Have you tried minipage or subfigure? Or even some combination? I had some success with figure placement in a proposal with these when wrapfig was not cutting it. Nov 15, 2020 at 6:31
  • 1
    For better or worse, it has to be single column. As to subfigure, it was abandoned in 2002 and is officially listed as deprecated. And subfig breaks hyperref and its development stopped in 2005. Nov 15, 2020 at 7:13
  • @GilWilliams instead of subfig or subfigure, you can use subcaption. Also, while this is even more manual than wrapfig I prefer insbox. But this is really 100% manual placement.
    – Skillmon
    Nov 15, 2020 at 10:09
  • 1
    @GilWilliams there is no ready-made solution for real floating figures/tables that are inserted like you want it. The subcaption package provides the subfigure environment you see in the code blocks. It doesn't require the subfigure or subfig packages (and in fact is incompatible with them).
    – Skillmon
    Nov 15, 2020 at 20:15

1 Answer 1

2

This is not really a convincing answer... but note that ConTeXt deals with wrapped figures pretty nicely (even when lists are included, new pages...). Unfortunately, it diverged quite considerably from LaTeX so you need to change your workflow completely, and is not yet as famous as LaTeX. To learn how to use it, read more here.

enter image description here

MWE (compile with context yourfile.tex):

\setupcolors[state=start]
\usemodule[ipsum]

\starttext

\ipsum[before=\blank,after=\blank]

\placefigure[left][fig:logo]{This is an example of a logo.}{\externalfigure[https://cdn.pixabay.com/photo/2014/11/30/14/11/cat-551554_960_720.jpg]}

\ipsum[before=\blank,after=\blank]

\placefigure[right][fig:logo]{}{\externalfigure[https://cdn.pixabay.com/photo/2014/11/30/14/11/cat-551554_960_720.jpg]}

\ipsum[before=\blank,after=\blank]


\placefigure[left][fig:logo]{}{\externalfigure[https://cdn.pixabay.com/photo/2014/11/30/14/11/cat-551554_960_720.jpg]}

\startitemize
\item Hello
\item My
\item Friend
\item Hello
\item My
\item Friend
\item Hello
\item My
\item Friend
\item Hello
\item My
\item Friend
\stopitemize
\stoptext

You must log in to answer this question.

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