[Xy-pic] Fwd: color and thickness of frame's outline

Ross Moore ross at ics.mq.edu.au
Sun Mar 16 22:54:33 CET 2008


Hi Jonny,

On 17/03/2008, at 12:39 AM, Jonny Smith wrote:

> Ross,
>
> Yes, your answer helped.
>
> Now I'm trying to label these boxes to include arrows and things.  
> My first try resulted in
>
> %   line thickness standard arrows
> \newcommand{\lthknessStd}{3}
> ...
>
> $$
> \xy
> %
> (0,-90)*+<5pt>+[F*:blue:<10pt>]\txt{First Text}
> ,*+<2pt>+[blue][F*:white:<10pt>]{\txt{First Text}}="First_Text";

There are redundant {....} here. This is enough:

,*+<2pt>+[blue][F*:white:<10pt>]\txt{First Text}="First_Text",

Also, the ; at the end is not needed,
unless you immediately need the previous POS to be
the start 'p' for an arrow, or 2-point calculation.
A simple , is usually adequate.

>
> %
> (0,-120)*+<5pt>+[F*:red:<10pt>]\txt{Second Text}
> ,*+<2pt>+[red][F*:white:<10pt>]{\txt{Second Text}}="Second_Text";
> %
> {\ar@{->}@[blue]@*{[|(\lthknessStd)]}@/^4.5pc/ "First_Text" ;  
> "Second_Text" };
> %
> \endxy
> $$
>
> where this arrow is overlapping the outer frame's outline. I wanna  
> avoid that and thought I simply need to label the outer frames  
> instead of the inner frames.
>
> But I don't know how to do that...
>
> Things like
>
> (0,90)*+<5pt>+[F*:blue:<10pt>]{\txt{First Text}="First_Text"},
> *+<2pt>+[blue][F*:white:<10pt>]\txt{First Text}

This should be OK:

(0,90)*+<5pt>+[F*:blue:<10pt>]i\txt{First Text}="First_Text",
*+<2pt>+[blue][F*:white:<10pt>]\txt{First Text}
%
(0,120)*+<5pt>+[F*:red:<10pt>]i\txt{Second Text}="Second_Text",
*+<2pt>+[red][F*:white:<10pt>]\txt{Second Text},

The 'i' (=invisible) modifier means you get the correct shape,
without actually placing the text twice.

>
> %
> (0,120)*+<5pt>+[F*:red:<10pt>]{\txt{Second Text}="Second_Text"},
> *+<2pt>+[red][F*:white:<10pt>]\txt{Second Text}
> %
> {\ar@{->}@[blue]@*{[|(\lthknessStd)]}@/^4.5pc/ "First_Text" ;  
> "Second_Text" };
> ...
>
> didn't do any good...
>
> Do you know how to make the right syntax?

Try above.
It should work just fine.

>
>
> My next step will then be to define some macro that takes care of  
> these inner and outer frame things. In my posters I have tons of  
> complicated equations and I think it wouldn't be a good idea to  
> copy all these equations. It would be cleaner and easier for me if  
> I add some more arguments giving the color of the outer frame,  
> outline thickness and such.I hope such a macro is not going to give  
> problems with the labels though...

Sure.
This is all doable.
You'll probably need to use \POS at the start of the expansion
of your user-defined macros.

>
>
> Thanks,
>
> J

Hope this helps,

	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