I'm trying to draw an image from a mathematical publication (see the crop at the end of my post). You can find a recent version of the drawing at page 37 of my script (PDF). The complete source is here.

I drew a rhomb with those squares in it and shifted all pieces to the right place:

\draw (0,0) -- (4,1) -- (8,0) -- (4,-1) -- (0,0);
\draw[thick] (6,.5) -- (4,1) -- (4,-1) -- (6,-.5)
  [yshift=4cm]  (6,.5) -- (4,1) -- (4,-1) -- (6,-.5);
\draw[thick,dashed] (6,.5) -- (6,-.5)
  [yshift=4cm]  (6,.5) -- (6,-.5);

I did the same with the squares around those figures. Now I want to label each square (R_0, R_1) and draw arrows from one box to another.

I'm looking for a better way than to write something like \draw[->] (2,2) -- (2,0);. So adding nodes sounds like the right idea, but I found no working solution. What would you recommend for drawing arrows and adding some labels?

crop of a drawing


You can use the shapes tikz-library. I am including an example, but you should read section 48.3 Geometric shapes on page 420 from the tikz manual. Here is the example





\node[draw=lightgray,rectangle,inner sep=0.5cm,outer sep=5pt,label=245:$R_0$] (top) {\tikz{
    \node[draw,trapezium,trapezium angle=75,shape border rotate=270,outer sep=0pt] (top trap)
        (top trap.bottom left corner) -- (top trap.bottom right corner);    

\node[draw=lightgray,rectangle,inner sep=0.5cm,below=2cm of top,outer sep=5pt,label=245:$R_0$] (bottom) {\tikz{
    \node[draw,trapezium,trapezium angle=75,shape border rotate=270,outer sep=0pt] (trap)
    \draw[white,postaction={draw=black,dashed}] (trap.top left corner) -- (trap.top right corner);  

\draw[->] (top) -- (bottom) node[pos=0.5,right] {$\varphi|_{R_0}$};


The result is

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.