[Tex/LaTex] How to place an image in a marginpar and make it position itself according to the top of the image

graphicsmarginparvertical alignment

As demonstrated by the following MWE, I've placed a simple image in the margin of a document. What appears to happen is the caption text is vertically aligned with the line that I type the \marginpar command on, and the image sits above it. Is there any way I can make the top of the image be in line with the line of text in the body where I include the \marginpar command? I need to be able to do this to accurately have an idea where images are going to appear when I typeset a textbook I'm making.


Please don't mind the incredibly not straight line I tried to draw to emphasize my point.

enter image description here


  This is a test.\marginpar{
    \captionof{figure}{Georg Cantor (1845-1918) was a German mathematician, best known as the inventor of set theory, which has become a fundamental theory in mathematics.}}

Best Answer


This worked very well. Probably not the optimal solution, but it does the job for the time being. Thanks very much La Raison.