Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using marginpar to put margin figures in a document - there are $n$ pages and $n$ figures so I'd like to have one on each page, anchored to the first line of text on each page - at the moment I put them in in roughly the right place with

\marginpar{
\begin{figure}
\includegraphics[angle=270,width=\marginparwidth]{images/diagram.pdf}
\caption{mycaption}
\label{mylabel}
\end{figure}
}

but when I add or remove text they get moved around unpleasantly - is there a way I can enforce with say \marginpar[page=1]?

share|improve this question

1 Answer

up vote 3 down vote accepted

You can not put a figure in a marguinpar your posted code would produce the error

! LaTeX Error: Not in outer par mode.

To include an image at the same point in each page use something line

\makeatletter
\def\@ooddhead{\hfill
\begin{picture}(0,0)
\put(0,-50){\includgraphics{file\thepage}}
\end{picture}
\makeatother

that will include files file1.pdf on first page file2.pdf on second, etc.

share|improve this answer
Um - code putting figure in marginpar does does work - I should point out I'm using the style file {chi-ext} for extended abstracts... (and the figure in the marginpar is included in the sample file...) the files are at chi2012.acm.org/chi2012extendedformatLaTeX.zip – Joe Dec 22 '12 at 21:46
3  
Standard latex figure environment will not work there, if you are using non standard definitions without telling anyone it is hard to help. It always helps to post complete small documents in your question showing all packages used. – David Carlisle Dec 22 '12 at 22:25

Your Answer

 
discard

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.