I have this short example derived from this XeTeX CV template, which uses margin notes to show years. You can use the Mandrill picture for pic.jpg, and you could also use the original template to reproduce the issue instead of this SSCE.

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass[10pt, a4paper]{article}

\geometry{a4paper, textwidth=5.5in, textheight=8.5in, marginparsep=7pt, marginparwidth=.6in}

\defaultfontfeatures{Mapping=tex-text} % converts LaTeX specials (``quotes'' --- dashes etc.) to unicode
\setromanfont [Ligatures={Common},Numbers={OldStyle}]{Adobe Caslon Pro}
\setsansfont[Scale=0.9]{Optima Regular} 

\newcommand{\years}[1]{\marginnote{\scriptsize #1}}




\years{2011} Mandrill College\\


Ideally, it should show the following:

But as soon as I include the wrapfigure, this becomes:

The margin note simply disappears. There are no warnings displayed. Now, I've already observed that the placement of the figure relative to where the margin notes should be displayed doesn't matter. In my real CV I'd place the figure top right and the sections with Education etc. would be much further down the page.

So my questions

  • Why does this fail?
  • What do I have to change to have the years displayed again?
  • If I can't use wrapfig to insert a floating figure at the top right no matter what the text, what should I use instead?

Don't start a section right after the wrapfigure. Put some paragraph in between wrapfigure and section:

\lipsum[2]                            %% put a paragraph here

\years{2011} Mandrill College\\


enter image description here

  • Looks good. In my case there was more text before the section which I simply put into one big \paragraph{}. Do you have any idea why this happens, exactly? – slhck Jan 8 '13 at 13:33
  • @slhck wrapfig is written that way. It doesn't like sections or lists following it immediately. – user11232 Jan 8 '13 at 13:34

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.