TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?
share|improve this question
up vote 3 down vote accepted

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

share|improve this answer
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. – Harish Kumar Jan 8 '13 at 13:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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