[Xy-pic] dvips breaks \newgraphescape in graph feature

Michael Abbott michael@araneidae.co.uk
Sun, 20 Oct 2002 07:58:32 +0000 (GMT)


> As for your genealogy symbols problem,
> can you send an example for me to play with.
> I cannot see from the code alone, how the alignment should be.
> Doubtless its just a matter of nudging one or other symbol
> up or down a little bit, using ! modifiers;
>  e.g. !U(.2)  has the effect of lowering a bit, !D(.5) raising more.
>
> Do the symbols come from a font, or are they constructed
> using Xy-pic alone;
>  e.g.  draw a circle, add the + and/or arrow, as an embellishment
> that doesn't contribute to the size.

Actually, the code fragment I posted was a complete example, with a male
and a female symbol side by side.  I'm using a square for males and a
circle for females, and drawing these using xy.

To make the point more clearly, I include a fuller example below.  Here we
have two parents and two siblings shown, and I'll explain my question
afterwards.

\documentclass{article}
\usepackage[dvips,matrix,all]{xy}

\newcommand{\male}{*=<3.5ex>[F-:|<2pt>]{ }}
\newcommand{\female}{*=<4ex>[o][F-:|<2pt>]{}}
\newcommand{\who}[2]{%
    \save+D*++!U{\parbox{1in}{\centering#1\\%
    \footnotesize\textsc{#2}}}\restore}

\newcommand{\point}{*{}}
\newcommand{\child}{\ar@{-}}
\newcommand{\married}{\ar@[|(3)]@{-}}

\begin{document}
\xymatrix{
\male\who{Father\\Surname}{dob} \married[rr] & \point\child[dd] &
\female\who{Mother\\Maiden Name}{dob} \\ \\
\point\child[rr]\child[d] & \point & \point\child[d] \\
\male\who{Brother\\Surname}{dob} &&
\female\who{Sister\\Surname}{dob}
}
\end{document}


So here is my question:

    It is noticeable that the male and female names do not line up
vertically.  This is because the corresponding male/female symbols are not
of the same size (visually this is correct, as otherwise the male square
would look too large).
    The hack I was trying to do was to stretch the lower extent of the
square after placing the outline, but I can't figure out how to do that.
My current workaround is to have separate \whom and \whof macros with
slightly different vertical adjustments.


A couple of passing questions:

Why do lines to *=<3x>[F-]{} go to the center, while lines to either
*=<3x>[F-]{ } or *=<3x>[o][F-]{} respect the boundary?

I have, a couple of times, managed to make TeX hang with 100% CPU while
fighting with Xy-pic.  Are these hangs worth identifying and reporting?


And finally a general remark of frustration:  the more I use TeX the more
I think it is fundamentally horrible, simply because there is no
separation between language and semantics.  Your implementation of Xy-pic
is an astonishing tour de force, and I cannot express enough admiration
for it.  However, it continues to drive me mad: each time I think I
understand something I discover a context in which it doesn't work;  I
suspect that this is a problem fundamental to TeX.