TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do insert image between text and text wrap with shapepar or other package? enter image description here

share|improve this question
Although this is not an exact duplicate, the following post should guide you through the steps using Xfig: tex.stackexchange.com/questions/32997/…. – Werner Nov 12 '11 at 3:07
I used the steps in the link that you passed, but I can not subtract the signal section with -. It does not work. – Regis da Silva Nov 12 '11 at 5:21
up vote 23 down vote accepted

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.



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}
\begin{shapedcutout}{2}{12}{\Margins}% 2 normal lines, 12 shaped lines


enter image description here

share|improve this answer
Many thanks to everyone who helped me, all solutions are used. – Regis da Silva Nov 12 '11 at 12:44

Here is a similar play-by-play of what was described by @KarlOveHufthammer in his excellent answer regarding the coat-of-arms construction using Xfig. I'm running Windows 7 with Cygwin/X, and is therefore also able to use Xfig (version 3.2.5b). I also have transfig (version 3.2.5c-1, also called fig2dev) installed as part of the Cygwin/X distribution setup:

  1. Open Xfig and set up a comfortable view/zoom level that is detailed enough. It does not have to be perfect, since LaTeX will resize the paragraph shape as specified using \shapepar to match whatever text you want to put into it.

    enter image description here

  2. Draw the outer shape of the paragraph. In this case I used the rectangle tool to draw a square.

    enter image description here

  3. Once complete, edit the rectangle and add the comment "+" (without the quotes).

    enter image description here

  4. Now draw the interior cut-out shape. In this case I used the circle tool.

    enter image description here

  5. Once complete, edit the rectangle and add the comment "-" (without the quotes).

    enter image description here

  6. Save the image in Xfig format as (say) myshape.fig.

    enter image description here

    The Xfig file looks like this:

    #FIG 3.2  Produced by xfig version 3.2.5b
    1200 2
    # -
    1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 3000 3000 1500 1500 3000 3000 4500 3000
    # +
    2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
         0 0 6000 0 6000 6000 0 6000 0 0
  7. Execute:

    fig2dev -L shape -n myshape myshape.fig myshape.shape

    The flag -L sets the output language used to shape (that conforms to shapepar). Other languages also exist, but this option should be specified first. The flag -n sets the name to be used within the output file myshape.shape. So, using -L shape -n <name> will create \<name>par. The output myshape.shape from myshape.fig now contains the newly-created macro \myshapepar{<par>} where the paragraph definition in "shape language" is given by \myshapeshape:

  8. Create and compile your TeX file:

    \usepackage{shapepar}% http://ctan.org/pkg/shapepar
    \usepackage{lipsum}% http://ctan.org/pkg/lipsum
    \input{myshape.shape}% Contains \myshapepar{<par>}

    enter image description here

    As mentioned, the size of the shape is not necessary. If you supply \lipsum*[1] instead (a shorter paragraph text), the output resembles:

    enter image description here

    Also note the use of \lipsum*. \shapepar does not allow the use of \par. Line breaking is achieved using \\.

Image insertion is achieved with an overlay, by moving the image to appropriate position using horizontal/vertical skips or otherwise.

share|improve this answer
Thank you, is not working because I could not install the transfig plugin in Ubuntu. – Regis da Silva Nov 12 '11 at 5:34
Your answers are so good that I want to up-vote them twice :) – cmhughes Nov 12 '11 at 5:35
With the shape defined already in the code above, you can just use it without having to install transfig. The answer merely shows how it can be achieved. In your specific case, the answer (shape-wise) matches your post exactly. – Werner Nov 12 '11 at 5:36
@cmhughes: Thanks for the feedback! – Werner Nov 12 '11 at 5:39
Good and useful answer! – Gonzalo Medina Nov 12 '11 at 15:03

Your Answer


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.