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

Ross Moore ross@ics.mq.edu.au
Sun, 20 Oct 2002 10:41:17 +1000 (EST)


> Compare
> 
> 	\documentclass{article}
> 	\usepackage[dvips,graph]{xy}
> 	\newgraphescape{p}#1{}
> 	\begin{document}
> 	\end{document}
> 
> with the same with "dvips," deleted:
> 
> 	\documentclass{article}
> 	\usepackage[graph]{xy}
> 	\newgraphescape{p}#1{}
> 	\begin{document}
> 	\end{document}
> 
> The first example produces the following cryptic error message:
> 
> 
>  ...
> (/usr/local/TeX/texmf/tex/generic/xypic/xyps-ps.tex
> ! Illegal parameter number in definition of \xyPSdictknown@.
> <to be read again>
>                    \DNii@
> l.169  \DNii@
>              {\xywarning@{You did not type Y or N -- try again please}%
> ?

Hmm; that is a strange one.
I can reproduce the problem but don't yet know why it happens.

Put the \newgraphescape  commands *after* \begin{document}
or delay it using \AtBeginDocument and the problem goes away. 
It's related to the fact that Xy-pic isn't fully loaded
until after the \begin{document} has been processed.
 
> 
> while the second example is processed just fine.

I cannot yet see why the \newgraphescape affects the delayed
aspects of loading drivers.
 
> Presumably the dvips feature is breaking the processing of arguments to
> \newgraphescape?  Things *seem* to work ok if I don't try and use
> arguments, though I haven't tried very much yet.


No; it's the other way around.
The error occurs in loading the PostScript dictionary, for special
PostScript effects possible with the dvips back-end.

For some reason something goes wrong after \newgraphescape has been used.
Perhaps some macro retains an expansion, when otherwise it would be
assumed to be empty or undefined.
This accounts for the problem not happening when the \newgraphescape
is done later, rather than earlier.
> 
> Is this a known problem?

Not before now.  :-)

Thanks for the report.
Don't expect a code update soon; but you now have ways to work-around
the difficulty.
 

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.


> _______________________________________________


Hope this helps,

	Ross Moore




> Xy-pic mailing list
> http://tug.org/mailman/listinfo/xy-pic