Use package cutwin
and run the example with xelatex
because I use an eps image as vector graphic which has no background. Using a png image with clipping may also be possible.
\documentclass{article}
\usepackage{cutwin,graphicx,pstricks,lipsum}
\begin{document}
\opencutcenter
\newcommand\Margins{%
0.4\textwidth, 0.4\textwidth,
0.35\textwidth, 0.35\textwidth,
0.32\textwidth, 0.32\textwidth,
0.3\textwidth, 0.3\textwidth,
0.28\textwidth, 0.28\textwidth,
0.26\textwidth, 0.26\textwidth,
0.26\textwidth, 0.26\textwidth,
0.28\textwidth, 0.28\textwidth,
0.3\textwidth, 0.3\textwidth,
0.32\textwidth, 0.32\textwidth,
0.35\textwidth, 0.35\textwidth,
0.4\textwidth, 0.4\textwidth}
\renewcommand\putstuffinpic{%
\rput(0,-5\normalbaselineskip){%
\includegraphics[width=0.38\textwidth]{tiger}}}
\begin{shapedcutout}{2}{12}{\Margins}% 2 normal lines, 12 shaped lines
\lipsum[1]
\end{shapedcutout}
\end{document}
Many text-comparing tools like diff
use line-by-line comparison. This can be explained by their origin as programmers' tools. When lines are short enough, these tools work well with TeX sources - especially when combined with version control systems. Of course, there are tools like latexdiff
(highly recommended!), which do not take into account line lengths.
Also, since TeX comments start from % and continue to the end of line, short lines make easier to comment the code.
Last but not least, many TeX authors use programmers' editors like Emacs
or vi
, which use hard line wrapping. This makes the code more readable - and TeX source is primarily a code.
Anyway, TeX itself, of course, does not care about your line length.
Best Answer
Just to add another answer here in case anyone else has this question - you can wrap text around figures quite nicely with the wrapfig package. Here's a short example showing left and right aligned images with captions, with the text wrapped around.
This example is also viewable on Overleaf if you want to see the pdf output next to the code.
How it looks:
Edit: Meant to add a note to say I'm one of the developers of Overleaf (formerly WriteLaTeX), and any feedback is appreciated! Thanks :-)