It is possible to get two parallel maps (one pointing to the left, the other to the right) between two nodes using pb-diagram? I know it can be done with TikZ, and maybe with some other package, but I use pb-diagram. Note that the option = is not enough. I would like to have also the heads of the arrows (the = option just draws two parallel lines)...


The style file pb-diagram.sty contains a couple of examples of custom arrows. Basically you have to build an appropriate representation using LaTeX's built-in picture environment. Here is an attempt at this. The separation of the two arrows is controlled by \twoarrowsep. If you do not need the diagonal arrows, a smaller value may look better.

Sample output




     \multiply\dg@ZTEMP\m@ne\relax \fi
     \advance\dg@ZTEMP by -\dg@YTEMP
   \else \advance\dg@ZTEMP by \dg@YTEMP \fi
     \divide\dg@XSHIFT by \dg@ZTEMP\relax
   \dg@YSHIFT=#1\relax\multiply\dg@YSHIFT\twoarrowsep\relax\divide\dg@YSHIFT by \dg@ZTEMP\relax


    \node{C} \node{D} \arrow{w,dd} \arrow{n,dd}


The code draws two arrows shifted away from the standard axis by equal amounts in a perpendicular direction. The opposite arrow is actually drawn in two parts, the stem and the head, to avoid some extra calculations. So the picture environment consits of three \put commands.

As in the package itself I have kept to the standard arithmetic operators provided by LaTeX; some other package may give you access to a square root operator, and so could give better adjust ment of the spacing for sloping arrows.

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.