[Xy-pic] Bug in xyps-c.tex?

Ross Moore ross at ics.mq.edu.au
Wed Aug 9 23:59:49 CEST 2006


Hi Johann,

On 10/08/2006, at 1:54 AM, Johann Bauer wrote:

> Hello,
>
> I wonder if there is a little bug in xyps-c.tex. I had stumbled  
> across a
> slight vertical misaligning in a formula. When I wanted to fix it, I
> noticed that it occurred only when both of the extensions dvips and
> color were loaded.
>
> To make it short: In xy.tex, line 272 goes
>
> \xydef@\xymath@{\hbox\bgroup \dimen@=\the\fontdimen22\textfont\tw@
> \xyinside@}
>
> while in xyps-c.tex, the corresponding definition in line 42 says
>
> \xydef@\xyPSmath@{\hbox\bgroup\dimen@=.55ex \checkxyPScolor@  
> \xyinside@}
>
>
> Shouldn't the ".55ex" be replaced by "\the\fontdimen22\textfont\tw@"?

Yes. I think you are correct.
It affects  xypdf-c.tex  as well.

>
> Here is an example where the misplacement occurs:
>
> ------------------
> \documentclass{article}
> \usepackage[dvips,color]{xy}
> \begin{document}
> If the extensions color und dvips are both loaded, the middle minus  
> sign
> is slightly mispositioned:
>
> $-\kern-2pt\xy -<0pt,\fontdimen22\textfont2>*!{-}\endxy\kern-2pt-$
> \end{document}
> ------------------
>
> Luckily, I could fix this by myself, so I consider my problem as  
> solved.
> But maybe someone competent can tell me whether my suggestion makes
> sense or there is some reason for the different length of .55ex.

I'd say the issue wasn't given much thought 12+ years ago.
Interesting that it hasn't affected anyone before now;
at least not to the extent of making a report.


>
> Regards, Johann


Here are patch files for  xyps-c.tex   and  xypdf-c.tex :

-------------  xyps-c.patch  starts below  
---------------------------------
*** xyps-c.tex  Thu Aug 10 07:46:08 2006
--- xyps-c.tex-prev     Thu Aug 10 07:45:40 2006
***************
*** 1,7 ****
! %% xyps-c.tex from $Id: xyps-c.doc,v 3.8 2006/08/10 07:36:50 ross  
Exp $
   %%
   %% Xy-pic ``Colour extension'' PostScript backend support.
! %% Copyright (c) 1993-1996 Ross Moore <ross at maths.mq.edu.au>
   %%
   %% This file is part of the Xy-pic package for graphs and diagrams  
in TeX.
   %% See the companion README and INSTALL files for further  
information.
--- 1,7 ----
! %% xyps-c.tex from $Id: xyps-c.doc,v 3.7 1999/02/16 15:12:50  
krisrose Exp $
   %%
   %% Xy-pic ``Colour extension'' PostScript backend support.
! %% Copyright (c) 1993-1996 Ross Moore <ross at mpce.mq.edu.au>
   %%
   %% This file is part of the Xy-pic package for graphs and diagrams  
in TeX.
   %% See the companion README and INSTALL files for further  
information.
***************
*** 39,45 ****
    \let\xycolor@@=\xyPScolor@@
    \xystandardcolors@
    \xyuncatcodes }
! \xydef@\xyPSmath@{\hbox\bgroup\dimen@=\the\fontdimen22\textfont\tw@  
\checkxyPScolor@ \xyinside@}
   \xydef@\xyPSnomath@{\hbox\bgroup\dimen@=\z@ \checkxyPScolor@  
\xyinside@}
   \xydef@\checkxyPScolor@@{\xycolor at raw@@{}\let\checkxyPScolor@=\relax}
   \xylet@\checkxyPScolor@=\relax
--- 39,45 ----
    \let\xycolor@@=\xyPScolor@@
    \xystandardcolors@
    \xyuncatcodes }
! \xydef@\xyPSmath@{\hbox\bgroup\dimen@=.55ex \checkxyPScolor@  
\xyinside@}
   \xydef@\xyPSnomath@{\hbox\bgroup\dimen@=\z@ \checkxyPScolor@  
\xyinside@}
   \xydef@\checkxyPScolor@@{\xycolor at raw@@{}\let\checkxyPScolor@=\relax}
   \xylet@\checkxyPScolor@=\relax
-------------  xyps-c.patch  ends above  
----------------------------------



-------------  xypdf-c.patch  starts below  
---------------------------------
*** xypdf-c.tex Thu Aug 10 07:57:00 2006
--- xypdf-c.tex-prev    Sat Nov 15 18:40:55 2003
***************
*** 1,7 ****
   %% xypdf-c.tex from $Id: xypdf-c.doc,v $
   %%
   %% Xy-pic ``Colour extension'' PDF backend support.
! %% Copyright (c) 1999-1999 Ross Moore <ross at maths.mq.edu.au>
   %%
   %% This file is part of the Xy-pic package for graphs and diagrams  
in TeX.
   %% See the companion README and INSTALL files for further  
information.
--- 1,7 ----
   %% xypdf-c.tex from $Id: xypdf-c.doc,v $
   %%
   %% Xy-pic ``Colour extension'' PDF backend support.
! %% Copyright (c) 1999-1999 Ross Moore <ross at mpce.mq.edu.au>
   %%
   %% This file is part of the Xy-pic package for graphs and diagrams  
in TeX.
   %% See the companion README and INSTALL files for further  
information.
***************
*** 39,45 ****
    \let\xycolor@@=\xyPDFcolor@@
    \xystandardcolors@
    \xyuncatcodes }
! \xydef@\xyPDFmath@{\hbox\bgroup\dimen@=\the\fontdimen22\textfont 
\tw@ \checkxyPDFcolor@ \xyinside@}
   \xydef@\xyPDFnomath@{\hbox\bgroup\dimen@=\z@ \checkxyPDFcolor@  
\xyinside@}
   \xydef@\checkxyPDFcolor@@{\edef\pdfsaved at color{\pdfcurrent at color}%
    \let\checkxyPDFcolor@=\relax}
--- 39,45 ----
    \let\xycolor@@=\xyPDFcolor@@
    \xystandardcolors@
    \xyuncatcodes }
! \xydef@\xyPDFmath@{\hbox\bgroup\dimen@=.55ex \checkxyPDFcolor@  
\xyinside@}
   \xydef@\xyPDFnomath@{\hbox\bgroup\dimen@=\z@ \checkxyPDFcolor@  
\xyinside@}
   \xydef@\checkxyPDFcolor@@{\edef\pdfsaved at color{\pdfcurrent at color}%
    \let\checkxyPDFcolor@=\relax}
-------------  xypdf-c.patch  ends above  
----------------------------------


Cheers,

	Ross

-----------------------------------------------------------------------
Ross Moore                                         ross at maths.mq.edu.au
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia  2109                            fax: +61 +2 9850 8114
------------------------------------------------------------------------




More information about the xy-pic mailing list