summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalc.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalc.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalc.code.tex126
1 files changed, 63 insertions, 63 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalc.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalc.code.tex
index 703494d2a64..561a725307f 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalc.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalc.code.tex
@@ -7,12 +7,12 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalc.code.tex,v 1.9 2013/07/15 12:05:31 tantau Exp $
+\ProvidesFileRCS{tikzlibrarycalc.code.tex}
%
%
% Part I: The let path command
-%
+%
%
@@ -21,11 +21,11 @@
%
% Currently (this may get more fancy in the future), the (coord)s are
% evaluated one by one. If the first evaluates to, say, (10pt,20pt),
-% the macro \p{name1} is set to "10pt,20pt" (without parantheses), the
+% the macro \p{name1} is set to "10pt,20pt" (without parentheses), the
% macro \x{name1} is set to "10pt" and the macro \y{name1} is set to
-% "20pt".
+% "20pt".
%
-% If you use a number for {name}, you need no parantheses, so you
+% If you use a number for {name}, you need no parentheses, so you
% could write:
%
% \draw let
@@ -40,7 +40,7 @@
\let\y=\tikz@cc@doy%
\let\n=\tikz@cc@don%
\pgfutil@ifnextchar i{\tikz@cc@stop@let}{\tikz@cc@handle@line}%
-}
+}%
\def\tikz@cc@handle@line{%
\pgfutil@ifnextchar\p{%
\tikz@cc@handle@coor%
@@ -51,34 +51,34 @@
\tikzerror{``\string\p'' or ``\string\n'' expected}%
}%
}%
-}
+}%
\def\tikz@cc@handle@num\n#1#2=#3{%
\pgfmathparse{#3}%
\expandafter\edef\csname tikz@cc@n@#1\endcsname{\pgfmathresult\ifpgfmathunitsdeclared pt\fi}
\pgfutil@ifnextchar,{\tikz@cc@handle@nextline}{\tikz@cc@stop@let}%
-}
+}%
\def\tikz@cc@handle@coor\p#1#2={%
\def\tikz@cc@coord@name{#1}%
\tikz@scan@one@point\tikz@cc@dolet%
-}
+}%
\def\tikz@cc@dolet#1{%
\pgf@process{#1}%
\expandafter\edef\csname tikz@cc@p@\tikz@cc@coord@name\endcsname{\the\pgf@x,\the\pgf@y}%
\expandafter\edef\csname tikz@cc@x@\tikz@cc@coord@name\endcsname{\the\pgf@x}%
\expandafter\edef\csname tikz@cc@y@\tikz@cc@coord@name\endcsname{\the\pgf@y}%
\pgfutil@ifnextchar,{\tikz@cc@handle@nextline}{\tikz@cc@stop@let}%
-}
+}%
\def\tikz@cc@handle@nextline,{%
\tikz@cc@handle@line%
-}
+}%
\def\tikz@cc@stop@let in{%
\tikz@scan@next@command%
}%
-\def\tikz@cc@dop#1{\csname tikz@cc@p@#1\endcsname}
-\def\tikz@cc@dox#1{\csname tikz@cc@x@#1\endcsname}
-\def\tikz@cc@doy#1{\csname tikz@cc@y@#1\endcsname}
-\def\tikz@cc@don#1{\csname tikz@cc@n@#1\endcsname}
+\def\tikz@cc@dop#1{\csname tikz@cc@p@#1\endcsname}%
+\def\tikz@cc@dox#1{\csname tikz@cc@x@#1\endcsname}%
+\def\tikz@cc@doy#1{\csname tikz@cc@y@#1\endcsname}%
+\def\tikz@cc@don#1{\csname tikz@cc@n@#1\endcsname}%
@@ -93,12 +93,12 @@
\begingroup%
%
% Parse main computation. It's a series of optional factors in front
- % of coordiantes.
- %
+ % of coordinates.
+ %
\pgf@xa=0pt% We accumulate the result in here.
\pgf@ya=0pt%
- \tikz@cc@parse+%
-}
+ \tikz@cc@parse+%
+}%
\def\tikz@cc@parse{%
\pgfutil@ifnextchar${%$
@@ -117,7 +117,7 @@
}%
}%
}%
-}
+}%
%
% The end is reached with $
@@ -126,7 +126,7 @@
\xdef\tikz@marshal{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}%
\endgroup%
\expandafter\tikz@cc@command\expandafter{\tikz@marshal}%
-}
+}%
%
@@ -135,15 +135,15 @@
\def\tikz@cc@add+{%
\def\tikz@cc@factor{1}%
\tikz@cc@factororcoordinate%
-}
+}%
\def\tikz@cc@sub-{%
\def\tikz@cc@factor{-1}%
\tikz@cc@factororcoordinate%
-}
+}%
%
% Check for a factor: If we see a (, its a coordinate...
-%
+%
\def\tikz@cc@factororcoordinate{%
\pgfutil@ifnextchar({%)
% Ok, found coordinate
@@ -151,7 +151,7 @@
}{%
\tikz@cc@parse@factor%
}%
-}
+}%
%
% ... otherwise it's a factor. It ends at ...*(
@@ -160,17 +160,17 @@
\pgfmathparse{#1*\tikz@cc@factor}%
\let\tikz@cc@factor=\pgfmathresult%
\tikz@cc@coordinate(%)
-}
+}%
\def\tikz@cc@coordinate{%
\tikz@scan@absolute\tikz@cc@after@coordinate%
-}
+}%
\def\tikz@cc@after@coordinate#1{%
\pgf@process{#1}%
\pgf@xb=\pgf@x%
\pgf@yb=\pgf@y%
\tikz@cc@mid@checks%
-}
+}%
%
@@ -182,7 +182,8 @@
\expandafter\tikz@cc@mid@checks@active
\else
\expandafter\tikz@cc@mid@checks@nonactive
- \fi}
+ \fi
+}%
\def\tikz@cc@mid@checks@nonactive{%
\pgfutil@ifnextchar!{%
@@ -192,7 +193,7 @@
\advance\pgf@ya by\tikz@cc@factor\pgf@yb
\tikz@cc@parse%
}%
-}
+}%
\def\tikz@cc@mid@nonactive!{%
\pgfutil@ifnextchar({%
@@ -200,7 +201,7 @@
}{%
\tikz@cc@mid@num@nonactive%
}%
-}
+}%
\begingroup
\catcode`\!=\active
@@ -212,7 +213,7 @@
\advance\pgf@ya by\tikz@cc@factor\pgf@yb
\tikz@cc@parse%
}%
- }
+ }%
\gdef\tikz@cc@mid@active!{%
\pgfutil@ifnextchar({%
@@ -220,7 +221,7 @@
}{%
\tikz@cc@mid@num@active%
}%
- }
+ }%
\endgroup
%
@@ -231,11 +232,11 @@
% is (b)
%
-\def\tikz@cc@mid@num@nonactive#1!{\tikz@cc@mid@num{#1}}
+\def\tikz@cc@mid@num@nonactive#1!{\tikz@cc@mid@num{#1}}%
\begingroup
\catcode`\!=\active
- \gdef\tikz@cc@mid@num@active#1!{\tikz@cc@mid@num{#1}}
+ \gdef\tikz@cc@mid@num@active#1!{\tikz@cc@mid@num{#1}}%
\endgroup
\def\tikz@cc@mid@num#1{%
@@ -249,7 +250,7 @@
\let\tikz@cc@mid@factor@one=\pgfmathresult%
\expandafter\tikz@cc@scan@rot\expandafter\tikz@cc@after@num%
\fi%
-}
+}%
\def\tikz@cc@after@num#1{%
\pgf@process{#1}%
@@ -258,7 +259,7 @@
\advance\pgf@xb by\tikz@cc@mid@factor\pgf@x%
\advance\pgf@yb by\tikz@cc@mid@factor\pgf@y%
\tikz@cc@mid@checks%
-}
+}%
@@ -277,7 +278,7 @@
\advance\pgf@xb by\tikz@cc@mid@unit\pgf@x%
\advance\pgf@yb by\tikz@cc@mid@unit\pgf@y%
\tikz@cc@mid@checks%
-}
+}%
%
% Projection case: (a)!(p)!(b)
@@ -302,13 +303,13 @@
\tikz@cc@scan@ex@nonactive}%
\fi
\tikz@next%
-}
+}%
-\def\tikz@cc@scan@ex@nonactive!{}
+\def\tikz@cc@scan@ex@nonactive!{}%
\begingroup
\catcode`\!=\active
- \gdef\tikz@cc@scan@ex@active!{}
+ \gdef\tikz@cc@scan@ex@active!{}%
\endgroup
\def\tikz@cc@after@project#1{%
@@ -326,7 +327,7 @@
\advance\pgf@xb by\pgf@sys@tonumber{\pgf@xc}\pgf@x%
\advance\pgf@yb by\pgf@sys@tonumber{\pgf@xc}\pgf@y%
\tikz@cc@mid@checks%
-}
+}%
%
% Rotational scanner: radius:(x)
@@ -336,7 +337,7 @@
\pgfutil@ifnextchar({%)
\tikz@scan@one@point#1% normal
}%
- {
+ {%
\def\tikz@cc@scan@rot@cmd{#1}%
\ifnum\the\catcode`\:=\active\relax
\expandafter\tikz@cc@scan@one@rot@active%
@@ -344,19 +345,19 @@
\expandafter\tikz@cc@scan@one@rot@nonactive%
\fi
}%
-}
+}%
\def\tikz@cc@scan@one@rot@nonactive#1:{%
\def\tikz@cc@scan@rot@angle{#1}%
\tikz@scan@one@point\tikz@cc@handle@rot%
-}
+}%
\begingroup
\catcode`\:=\active
\gdef\tikz@cc@scan@one@rot@active#1:{%
\def\tikz@cc@scan@rot@angle{#1}%
\tikz@scan@one@point\tikz@cc@handle@rot%
- }
+ }%
\endgroup
\def\tikz@cc@handle@rot#1{%
@@ -375,7 +376,7 @@
}%
\edef\tikz@marshal{\noexpand\tikz@cc@scan@rot@cmd{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}%
\tikz@marshal%
-}
+}%
@@ -383,32 +384,32 @@
%
%
% Part III: Calculation coordinate systems
-%
+%
%
% Tangent cs: Keys are a node and a point. Depending on the type of
-% node, the appropriate tanent computation should be done.
+% node, the appropriate tangent computation should be done.
\tikzdeclarecoordinatesystem{tangent}
{%
\tikzset{cs/.cd,#1}%
\expandafter\ifx\csname tikz@tangent@\tikz@cs@type\endcsname\relax%
- \tikzerror{I do not know how to compute the tangent to
+ \tikzerror{I do not know how to compute the tangent to
a \tikz@cs@type}%
\pgfpointorigin%
\else%
- \expandafter\tikz@scan@one@point\expandafter\tikz@lib@do@tangent\tikz@cs@point%
+ \expandafter\tikz@scan@one@point\expandafter\tikz@lib@do@tangent\tikz@cs@point%
\fi%
-}
+}%
-\tikzset{cs/node/.code=\tikz@cs@unpack{\tikz@cs@node}{\tikz@cs@type}{#1}}
-\tikzset{cs/point/.store in=\tikz@cs@point}
+\tikzset{cs/node/.code=\tikz@cs@unpack{\tikz@cs@node}{\tikz@cs@type}{#1}}%
+\tikzset{cs/point/.store in=\tikz@cs@point}%
-\def\tikz@lib@do@tangent{\csname tikz@tangent@\tikz@cs@type\endcsname}
+\def\tikz@lib@do@tangent{\csname tikz@tangent@\tikz@cs@type\endcsname}%
\def\tikz@tangent@coordinate#1{%
\pgfpointanchor{\tikz@cs@node}{center}%
-}
+}%
\def\tikz@tangent@circle#1{%
{%
@@ -464,7 +465,7 @@
\pgftransforminvert%
\pgf@process{\pgfpointtransformed{}}%
}%
-}
+}%
% Implementation of intersections
@@ -502,7 +503,7 @@
\pgftransforminvert%
\pgf@process{\pgfpointtransformed{}}%
}%
-}
+}%
\def\tikz@intersect@line@and@circle{%
@@ -553,10 +554,10 @@
% and add
\advance\pgf@xa by\pgf@sys@tonumber{\pgf@xc}\pgf@x%
\advance\pgf@ya by\pgf@sys@tonumber{\pgf@xc}\pgf@y%
- %
+ %
% Now, we have a triangle with a right angle at (xa,ya). The
% second point of the triangle is the origin. The third point is
- % sought.
+ % sought.
% Save x/y
\pgf@xc=\pgf@x%
\pgf@yc=\pgf@y%
@@ -601,7 +602,7 @@
\pgftransforminvert%
\pgf@process{\pgfpointtransformed{}}%
}%
-}
+}%
\def\tikz@intersect@circle@and@line{%
% Swap
@@ -610,5 +611,4 @@
\let\tikz@cs@line@a=\tikz@cs@line@b%
\tikz@intersect@line@and@circle%
}%
-}
-
+}%