2

I can add text in the right margin:

\marginpar{test}

But how can I add an image.png in the right margin?

2
  • 5
    \marginpar{\includegraphics{image}} Aug 18 '15 at 21:59
  • 2
    You might want to use [width=\marginparwidth] with that. Aug 19 '15 at 0:02
8

I made the sidenotes package for this purpose. Here is an example.

\documentclass{article}

\usepackage{sidenotes} 
\usepackage{lipsum} % provides the dummy text
\usepackage{mwe} % provides the example image

\begin{document}
\lipsum[1]
\begin{marginfigure}%
    \includegraphics[width=\marginparwidth]{example-image-a}%
    \caption{This is in the margin.}%
\end{marginfigure}%
\lipsum[2]

\end{document}

The output:

marginfigure image

You can find more information using the package manual or you can use \documentclass{caesar_book} if you want to start with reasonable margin widths and such. There is a tufte-book class as well and I believe that memoirprovides this functionality as well.

0

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.