[Xy-pic] Problem with \newdir{d}

Ross Moore ross at ics.mq.edu.au
Sun Jan 6 23:52:35 CET 2008


On 07/01/2008, at 9:17 AM, Ross Moore wrote:

> Hi Michael,

> Also, you asked about the syntax with  @{<arrow-specifier>} .
> This is a little tricky, as there are 3 separate directionals
> that can be specified here; namely
>     arrow-tail,  arrow-shaft,  and  arrow-head .
>
> e.g.  @{<->}  for a double-headed arrow, specifies all 3 ;
> but  @{>}, @{<} and  @{|}  specify just the arrow tip.
> But  @{<.}  and  @{.>}  specify 2 of the 3 directionals,
> but different ones in each case, so that they do the "natural"
> thing, resulting in a dotted shaft with tail or tip respectively.
>
> There also needs to be a lot of flexibility to allow easy syntax
> for customisation of arrows using user-defined directionals.
> e.g.  \@{d>}  uses a tip-specifier obtained from  \newdir{d>}
> rather than a shaft of  \dir{d} and tip of \dir{>}


> The complete syntax is described as a BNF diagram, in the
> Xy-pic reference.
>
> It works roughly as follows:
>
>    @{{..}{..}{..}}  (3 groupings) sets all 3 pieces, assuming that
> their contents define a valid directional; if not valid, then
> an error message will result at some later stage in the processing.
>
>    @{..whatever..}  parses the ..whatever..  character by character,
> looking for particular characters that have meaning for each part
> of the arrow, in the order:  tail, then shaft, then head.
> If nothing is found that is appropriate for one part, then it is
> left as empty and we move on to examine for the next part.
>
> Characters such as  . - : =  have meaning for the shaft, but not tip
> nor tail.
> Single letters a-z or A-Z have no meaning for any part, but...
>
>   ... if nothing valid is found for the any part, then the whole of
> {..whatever..} is presumed to be meant as a directional for the tip.
> That is, these should give identical results:
>
>     @{{}{}{..whatever..}}  and  @{..whatever..}
>
> unless the  ..whatever..  starts with valid characters for some  
> pieces.
> e.g.
>    @{d>}   is the same as  @{{}{}{d>}}  ( and also  @{d>{}{}} !!)
>
>   but  @{.>}  is the same as  @{{}{.}{>}}  and  @{{}.>}  and  @{.{>}}
>   and various other combinations.
>
> Redundant stuff occurring after valid specifiers will cause an error;
> e.g.   @{.><} , @{.>{}}  etc.

There is another important rule that I forgot to mention:

  If there is exactly 1 character, valid for either tip or tail,
  it is used to specify the tip, retaining the default shaft.
  That is why  @{>}  and  @{<}  do what they do;
  e.g.  @{>}  is equivalent to  @{{}{-}{>}}  and  @{->} , etc.
  and   @{<}  is equivalent to  @{{}{-}{<}}  and  @{-<} , etc.


Also, @{}  is the empty arrow;  equivalently  @{{}{}{}} .


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