Take the 2-minute tour ×
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 am adding photos into my documents with

\begin{wrapfigure}{r}{0.25\textwidth}
\includegraphics[scale=0.5]{uofw}
    \caption{U of Windsor}
\end{wrapfigure}

but the only way I have found to line the picture up with the right margin is by adjusting the scale of the photo and adjusting the text width. Is there a way for me to have photos automatically line up with the margin so I do not have to mess around with scales?

share|improve this question
    
Have you tried \hfill \includegraphics{uofw}? –  jamaicanworm Apr 19 '12 at 15:57
    
You have to play with \setlength{\wrapoverhang}{0pt} –  Harish Kumar Apr 20 '12 at 0:07
add comment

1 Answer

Let me copy an answer I gave to another question http://tex.stackexchange.com/a/52176/13450 and only adapt it slightly if I may:

Well, actually, I know it's not really an answer to the question but I'd try to avoid wrapfigure altogether. There are two alternative packages called picinpar and picins. picins is often considered the successor of picinpar but I don't like it personally. In its documentation the amount of bad typography is only surpassed by the number of drop shadow effects.

picinpar will not solve all your problems and it doesn't support any floating as the R and L parameters to wrapfig do but it will manage decent spacing, alignment, justification and possibilities to mitigate bad luck. You can (and must) pass the number of lines above the image as an argument. The syntax is a bit cryptic but the following example might illustrate its usage (sorry it's in German), as does the good package documentation. You can also see that the alignment with the right margin happens quite naturally:

picinpar usage example.

share|improve this answer
add comment

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.