Hello everyone,
by "popular demand" the CVS now sports a way to add coordinates (and
do some other tricks). One can now write
\draw ($(1,2) + (3,4)$) -- ($(5,6) + (7,9)$);
and it has the intended meaning. It is now also possible to find
"partway" points on a line between two points conveniently and also a
point projected on a line. Have a look at Chapter 10.4 in the current
CVS manual. Also, the new let operation (Chapter 11.14) for paths is
useful.
Best regards,
Till
Am 23.01.2008 um 13:11 schrieb Till Tantau:
> Hi!
>
> for wrapping things, consider having a look at the "fit" library,
> which is supposed to solve exactly this problem. It's in the CVS (I
> don't know whether it was in the last version... hmmm.)
>
> Till
>
> Am 23.01.2008 um 12:07 schrieb Martin Geisler:
>
>> Hans Meine <meine@...> writes:
>>
>> Hi Hans,
>>
>>> Am Mittwoch, 23. Januar 2008 10:32:08 schrieb Martin Geisler:
>>>> but is there a way to do something similar for the other
>>>> coordinates
>>>> in a path? I hoped one could simply do
>>>>
>>>> \draw ((1,2) + (3,4)) -- ((5,6) + (7,9));
>>>>
>>>> but it does not work.
>>>
>>> I often need something similar; Till pointed me to the possibility
>>> of writing something like ([shift={(-1,-1)}a.north west) in the
>>> "Scope of coordinate transformations" thread which you might want to
>>> look up.
>>
>> Thank you very much for the pointer to the thread -- I had no idea
>> that it was possible to shift a coordinate like that. With suitable
>> styles it is actually not so bad:
>>
>> \tikzstyle{sw}=[shift={(-1mm,-1mm)}]
>> \tikzstyle{ne}=[shift={(1mm,1mm)}]
>>
>> \draw (0,0) node[draw] (A) {$A$};
>> \draw (1,0) node[draw] (B) {$B$};
>> \draw[dashed] ([sw] A.south west) rectangle ([ne] B.north east);
>>
>>>> I have needed such a feature when I wanted to wrap two rectangular
>>>> nodes A and B in a bigger rectangle.
>>>
>>> This is something which is not very uncommon I think, I once solved
>>> that by trial & error positioning. Maybe one should use
>>> \node[matrix]{ ... } around the smaller nodes, which is very
>>> powerful and easy to use as I experienced yesterday in a different
>>> setting.
>>
>> Interesting idea with the matrix node. I have also found another way
>> to wrap things: simply put another TikZ picture inside a node:
>>
>> \draw (3,0) node[draw] {
>> \tikz \draw (0,0) node[draw] {A} (1,0) node[draw] {B};
>> };
>>
>> This works as expected and wraps the two nodes in a outer node with
>> the correct padding. Unfortunately this does not work correctly if I
>> label the nodes -- the labels are associated with the local
>> coordinates instead of the global ones. So if they are names A and B,
>> then
>>
>> \draw (A) -- (B);
>>
>> in the outer picture gives me a line from (p, 0) to (1+p, 0) where p
>> is the padding distance in a node. I can understand why these nested
>> coordinates would fail, it is sort of an abuse of the system :-) I
>> tried the 'remember picture' option, but it did not work, the line
>> was
>> placed somewhere outside my picture when using Beamer.
>>
>> I'll stick to the first solution for now -- thanks for the help!
>>
>> --
>> Martin Geisler
>>
>> VIFF (Virtual Ideal Functionality Framework) brings easy and
>> efficient
>> SMPC (Secure Multi-Party Computation) to Python. See: http://
>> viff.dk/.
>>
>>
>> ---------------------------------------------------------------------
>> -
>> ---
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> pgf-users mailing list
>> pgf-users@...
>> https://lists.sourceforge.net/lists/listinfo/pgf-users
>>
>
> --
> Prof. Dr. Till Tantau <tantau@...>
> http://www.tcs.uni-luebeck.de
>
>
>
>
> ----------------------------------------------------------------------
> ---
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> pgf-users mailing list
> pgf-users@...
> https://lists.sourceforge.net/lists/listinfo/pgf-users
>
--
Prof. Dr. Till Tantau <tantau@...>
http://www.tcs.uni-luebeck.de/mitarbeiter/tantau
|