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 can't resolve the problem with including pictures. When I add a picture by using \includegraphics my text doesn't flush to the bottom (as it should) but it move up. It happens especially when I add \wrapfigure to the next side and footnote. Here you can see the text on the even page move a bit up. When I add \footnote it move up more. So, lines on the even and odd side don't match. enter image description here. enter image description here

And here is my minimal working preamble:

\documentclass{book}

\usepackage{wrapfig}

\usepackage[
centering,
showframe,
papersize={160mm,235mm},
text={125mm,190.5mm},
]{geometry}

\setlength{\parskip}{0pt}
\setlength{\parindent}{14pt} 

\clubpenalty10000 
\widowpenalty10000 

\sloppy 

\frenchspacing

\usepackage[demo]{graphicx}

I thought maybe \flushbottom would help but didn't (maybe because of \parskip{0pt}). I tried \vspace inside {figure} environment but it didn't work too. I found maybe this would help

 \setlength\floatsep{12pt plus 12pt minus 2pt} 

but wouldn't. Do you know what to do? Thanks for any help.

Sorry for long post but I don't know how to use wrapfigure with lipsum. It is why I showed you only my preamble. I don't know how to put a picture at the top of the page (like on the odd page in my example). In this example text move up with wrapfigure on the next page and move a bit down without it whereas I need it exactly on the bottom line of the frame (When I don't include graphic the text is exactly on the line). Martin, I use {figure} as you can see below.

\documentclass{book}

\usepackage[T1]{fontenc}
\usepackage{venturis}

\usepackage{wrapfig}

\usepackage[
centering,
showframe,
papersize={160mm,235mm},
text={125mm,190.5mm},
]{geometry}

\setlength{\parskip}{0pt}
\setlength{\parindent}{14pt} 

\clubpenalty10000 
\widowpenalty10000 

\sloppy 

\frenchspacing

\usepackage[demo]{graphicx}

\begin{document}

 \begin{figure}[!ht]
    \centering
    \hspace{3pt}\fbox{\includegraphics[width=118mm]{photo.jpg}}
    %\vspace{-10pt}
    \caption*{\footnotesize\centering{lorem}}
 \end{figure}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam fermentum, purus eget ultrices consectetur, odio magna commodo metus, sed blandit ipsum nisl at mi. Maecenas et sapien sapien. Proin quis arcu vel nulla commodo elementum. Fusce id ultrices enim. Aenean quis suscipit quam. Etiam egestas, felis et lobortis auctor, felis felis porttitor nibh, quis placerat quam est hendrerit purus. Nam luctus tincidunt turpis, at bibendum risus semper vitae. Praesent quis tortor sit amet massa aliquam sollicitudin. Curabitur venenatis tempus ligula elementum semper. Maecenas vehicula urna in lectus varius non dignissim felis elementum. Praesent dignissim ultricies massa at faucibus. Nam sed libero enim. Sed euismod mollis tortor, sit amet elementum nulla lacinia ut.

Nullam congue turpis sed arcu mollis sit amet vulputate sapien iaculis. Aliquam eget nulla enim. Praesent pulvinar felis ut risus laoreet suscipit. Nulla id velit purus. In nec est ut ligula pulvinar congue eu id massa. Donec id porta est. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce a dapibus tellus. Phasellus auctor nisi arcu. Proin libero quam, fringilla vitae hendrerit ut, fermentum in lectus. Nulla tempus sem dolor, posuere aliquet velit. In lacus nisl, porttitor euismod lobortis id, blandit id nulla. Vestibulum tristique nunc et eros fringilla pretium. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Fusce dignissim, sapien ac feugiat aliquam, nunc nisl imperdiet dui, quis volutpat massa nisl sed lectus.

Suspendisse imperdiet feugiat tempor. Vivamus tincidunt justo laoreet urna vestibulum aliquet. Mauris sed varius dui. Donec tempus ipsum non dolor euismod id molestie ante condimentum. Nulla vehicula, erat quis accumsan luctus, lorem ligula viverra sem, sit amet laoreet mi mauris non diam. Maecenas augue dui, tincidunt non lacinia vitae, lacinia at quam. Donec dapibus auctor nunc. Proin aliquet sollicitudin luctus. Maecenas sed mi odio. Sed elementum massa sed nisl pulvinar eu iaculis ligula ornare. Sed at pulvinar lorem. Curabitur ac quam sit amet erat ullamcorper ornare. Vestibulum eu tempor lacus. Donec ultrices, sapien vel gravida hendrerit, lorem lacus eleifend ipsum, in tristique justo velit ac tellus. Quisque vestibulum fringilla arcu posuere ultricies. In placerat imperdiet scelerisque. Morbi quis dui vitae neque cursus rutrum vel semper ante. Donec at orci sed nisl iaculis cursus non tempor lorem. Duis eget risus augue, eget viverra felis.

Nulla justo diam, posuere ut egestas non, varius facilisis enim. Donec suscipit, dolor nec lobortis ornare, velit erat interdum tellus, ac elementum orci mauris vitae magna. \begin{wrapfigure}{r}{0.5\textwidth}
%\vspace{-10pt}
\fbox{\includegraphics[width=0.48\textwidth]{photo.jpg}}
\vspace{-22pt} 
\caption*{\footnotesize\centering{lorem}}
\end{wrapfigure}Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam faucibus dui dolor. Quisque ut felis dolor. Aliquam aliquam venenatis leo sed vehicula. Praesent neque justo, facilisis non gravida et, feugiat nec ante. Donec tincidunt, sem sit amet elementum commodo, felis tellus volutpat metus, quis ultrices mi urna et tellus. Ut sit amet scelerisque elit. Aliquam ac magna id lacus accumsan consequat et eu nunc. Nam lorem leo, mattis aliquet congue ultrices, pharetra in nisl. Curabitur cursus neque nec eros pulvinar aliquet.

Pellentesque vestibulum adipiscing dapibus. Donec auctor, dolor a viverra auctor, tellus urna cursus nulla, et imperdiet mauris mauris in arcu. Quisque condimentum, quam eu mollis bibendum, erat augue viverra augue, eu viverra magna sapien in felis. Aliquam scelerisque tempus quam, adipiscing posuere lectus dictum et. Integer feugiat viverra egestas. Cras malesuada dictum felis, eu aliquam erat bibendum vitae. Curabitur ac metus non lorem hendrerit ornare eget eget nisl. Vestibulum ante ante, lobortis eu congue sed, euismod in risus. Sed viverra ornare dui, et condimentum libero pellentesque at. Sed congue est ut purus ornare euismod. Vivamus venenatis dui sit amet magna dignissim suscipit. Nunc eu nunc eu nulla semper auctor. Mauris lacus felis, facilisis tincidunt fermentum a, cursus nec enim. Proin eu placerat libero. Praesent sagittis, lectus ac ultricies ultrices, nulla ante imperdiet risus, molestie porta erat mauris a dui. Quisque consequat lorem ut sem faucibus rutrum.


\end{document}
share|improve this question
1  
@kotspot: Please provide a full minimal example, not just the preamble. You can use the lipsum or blindtext package to insert dummy text. Are you using a figure float for the image or some non-floating environment? I don't think it is caused by \includegraphics. –  Martin Scharrer Feb 22 '11 at 17:03
    
There is also a related question about line misalignment with multiple columns, which isn't really answered yet. –  Martin Scharrer Feb 22 '11 at 17:29
1  
@kotspot: Please do provide a full compilable example, as suggested by Martin. It might be a problem with descenders and the maxdepth as described in this answer of mine, but that's impossible to tell without a full example. –  Hendrik Vogt Feb 22 '11 at 18:08
    
@Hendrik: I just did, but I'm not sure how to apply it here. Please note that this issue does also appear with book class and just lipsum text and some figure. The baselines on both sides do not align. Maybe forcing the image to by n\baselineskip high will fix it? –  Martin Scharrer Feb 22 '11 at 18:21
    
Hendrik, I've just used \pagebreak just before \begin{wrapfigure}. Now text isn't above the line but it's a few pt under it. –  kotsport Feb 22 '11 at 19:24
show 13 more comments

1 Answer

up vote 2 down vote accepted

To me, your first problem looks like a bug in wrapfigure. Without the wrapfigure, the last line of page 1 is nicely sitting on the line drawn by showframe; the descender of the "g" descends below that line as it should. With the wrapfigure, the descender of the "g" is sitting on the line drawn by showframe, which is indeed not desirable. A workaround is to put a \pagebreak immediately after the last word on page 1; in your example code this would be after magna.

Your second problem seems to be of a different nature, and it appears that you found some solution in the comments to the question :-)

share|improve this answer
    
Thanks for your help! –  kotsport Feb 23 '11 at 15:20
1  
@kotspot: Thanks for accepting my answer. You can also upvote it :-) –  Hendrik Vogt Feb 23 '11 at 15:24
    
I agree with blaming wrapfigure. In my tests wrapfigure behaved quite funny. Especially {\begin{wrapfigure}...\end{wrapfigure}} results in the figure being over placed over the text. (I'm already out of votes for today ...) –  Martin Scharrer Feb 23 '11 at 15:59
    
@kotsport: I just realized that I misspelled your user name all the time; somehow I didn't see the "r" - sorry! –  Hendrik Vogt Mar 17 '11 at 14:48
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.