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 using XeLaTex on OS/X. wrapfig appears to work perfectly. When I try the following:

{\bf This closing line of a paragraph emphasized}

\begin{wraptable}{r}{0.8\textwidth}
\begin{tabular}{|c|c|c|c|}\hline\hline
table contents, which is all text and numbers
\end{tabular}
\label{exposure}
\end{wraptable}

{\bf This opening line of the next paragraph emphasized}

The table is printed overlying the surrounding text. If I remove the {\bf text} at the beginning and end of the surrounding paragraphs, it works correctly.

share|improve this question
1  
welcome to tex.sx, however it would be much easier to answer your question if you edit your question to be a complete small document that shows the problem (you can use \rule{1cm}{1cm} instead of an image, so it is portable.) Note you can highlight code with the {} button (see my edit to your question) –  David Carlisle May 9 '13 at 19:44
1  
thank you for editing my question- very helpful! –  William May 9 '13 at 20:24
    
It would be much easier to comment on a complete document but you are only leaving .2\textwidth for the text that is wrapping round your figure You haven't shown us what your full text width is but this is likely to be rather small, so perhaps tex can not break the text in which case it will complain about overfull box and it will stick into the table –  David Carlisle May 9 '13 at 20:34

1 Answer 1

It really isn't possible to say anything definite without an example document but I would guess that TeX is just failing to break the text into the very small space left. Using sloppypar is an option, although if the table takes up 80% of the text width, setting it as a standard full width table rather than a wraptable might be more appropriate.

Note the first line overprints in the original version but doesn't in the second at teh expense of stretched white space.

enter image description here

\documentclass{article}
\usepackage{wrapfig}
\begin{document}

\begin{wraptable}{r}{0.8\textwidth}
\begin{tabular}{|c|c|c|c|}
\hline\hline
1&2&3&4\\
1111&2222&3333&4444\\
\hline\hline
\end{tabular}
\label{exposure}
\end{wraptable}
one two three four one two three four
one two three four one two three four
one two three four one two three four
one two three four one two three four

\begin{sloppypar}
\begin{wraptable}{r}{0.8\textwidth}
\begin{tabular}{|c|c|c|c|}
\hline\hline
1&2&3&4\\
1111&2222&3333&4444\\
\hline\hline
\end{tabular}
\label{exposure}
\end{wraptable}
one two three four one two three four
one two three four one two three four
one two three four one two three four
one two three four one two three four
\end{sloppypar}

\end{document}
share|improve this answer

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.