diff options
author | Karl Berry <karl@freefriends.org> | 2019-04-04 20:55:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-04-04 20:55:44 +0000 |
commit | acab24042d34dd439e1d074820d1da2fa1d591cd (patch) | |
tree | 32881f869e20a69711c5fe86134aa48143d9b1e8 /Master/texmf-dist/tex/generic/pgf/modules | |
parent | 93f5c4643a3d0a596d220ff14756ce68d99afe33 (diff) |
pgf (4apr19)
git-svn-id: svn://tug.org/texlive/trunk@50758 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/modules')
12 files changed, 1476 insertions, 1481 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleanimations.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleanimations.code.tex index 4860107d1c2..d4e82cb1af5 100644 --- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleanimations.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleanimations.code.tex @@ -34,15 +34,15 @@ % times must be given in ascending order. Between the times given in % this way, the values of the attribute will be interpolated; you can % influence the details of how this interpolation is done using -% additional keys. +% additional keys. % % The keys in #2 are given in key-value syntax and can be given in any % order, except that the entry keys must be given in order of -% ascending times. +% ascending times. % % The syntax of the second parameter of the entry key depends on % #1. Currently, these are: -% +% % Attribute Value Type % --------------------------------------- % fill opacity scalar @@ -71,7 +71,7 @@ \def\pgfanimateattribute#1#2{% \pgfanimateattributecode{#1}{\pgfkeys{/pgf/animation/.cd,#2}}% -} +}% % Variant of \pgfanimateattribute @@ -91,7 +91,7 @@ \csname pgf@animation@check@\pgf@animation@attribute\endcsname% \pgfsysanimate{\pgf@animation@attribute}% }% -} +}% @@ -124,8 +124,8 @@ % \fill (0,0) rectangle (1,1); % } -\def\pgfsnapshot#1{\pgfparsetime{#1}\expandafter\pgfsysanimsnapshot\expandafter{\pgftimeresult}} -\def\pgfsnapshotafter#1{\pgfparsetime{#1}\expandafter\pgfsysanimsnapshotafter\expandafter{\pgftimeresult}} +\def\pgfsnapshot#1{\pgfparsetime{#1}\expandafter\pgfsysanimsnapshot\expandafter{\pgftimeresult}}% +\def\pgfsnapshotafter#1{\pgfparsetime{#1}\expandafter\pgfsysanimsnapshotafter\expandafter{\pgftimeresult}}% % The animation attributes @@ -155,23 +155,23 @@ view/.code=\pgf@animate@attr{viewbox}{viewbox}, dash/.code=\pgf@animate@attr{dash}{dash}, none/.code=\pgf@animate@attr{none}{none}, -} +}% \def\pgf@animate@attr#1#2{% \def\pgf@animation@attribute{#1}% \expandafter\let\expandafter\pgfanim@type@parser\csname pgfanim@parse@type@#2\endcsname% -} +}% % The time parser -% +% % #1 = a time -% +% % This macro parses the time in #1, but adds some support for times: -% +% % 1) The postfix operator "s" is added, which has no effect. -% 2) The postfix operator "ms" is added, which devides a number by +% 2) The postfix operator "ms" is added, which divides a number by % 1000, so "2ms" equals "0.002". % 3) The postfix operator "min" is added, which multiplies a number by % 60. @@ -195,11 +195,11 @@ \pgfmathparse{#1}% \expandafter\endgroup% \expandafter\def\expandafter\pgftimeresult\expandafter{\pgfmathresult}% -} +}% \newif\ifpgfanim@m@encountered \newif\ifpgfanim@i@encountered -\pgfmathdeclarefunction{@seconds}{1}{% +\pgfmathdeclarefunction{@seconds}{1}{% \begingroup% \expandafter\pgfmath@x#1pt\relax% \ifpgfanim@m@encountered% @@ -228,7 +228,7 @@ \pgfmath@returnone\pgfmath@x% \endgroup% }% -\pgfmathdeclarefunction{@minutes}{1}{% +\pgfmathdeclarefunction{@minutes}{1}{% \ifpgfanim@i@encountered% \global\pgfanim@i@encounteredfalse% \else% @@ -240,7 +240,7 @@ \pgfmath@returnone\pgfmath@x% \endgroup% }% -\pgfmathdeclarefunction{@hours}{1}{% +\pgfmathdeclarefunction{@hours}{1}{% \begingroup% \expandafter\pgfmath@x#1pt\relax% \pgfmath@x3600\pgfmath@x\relax% @@ -255,23 +255,23 @@ \advance\pgfmath@x by\pgfmath@y% \pgfmath@returnone\pgfmath@x% \endgroup% -} +}% % Sets general animation attributes -% +% % #1 = key-value pairs that are executed for the path /pgf/animation/ -\def\pgfanimationset{\pgfqkeys{/pgf/animation}} +\def\pgfanimationset{\pgfqkeys{/pgf/animation}}% % Sets the target animation scope that should be animated. -% +% % #1 = A name that will be used with an idscope. % % Example: -% +% % \pgfanimateattribute{fill opacity}{whom=some scope, entry={0s}{1}, entry={1s}{0}} % \begin{scope}[name=some scope] % \draw (0,0) -- (1,1); @@ -286,7 +286,7 @@ \let\pgf@anim@whom@id\pgf@anim@id% \let\pgf@anim@whom@type\pgf@anim@type% } -} +}% \def\pgf@anim@decomp#1{% \edef\pgf@temp{#1}% @@ -296,45 +296,45 @@ \else% \expandafter\pgf@anim@decomp@\pgf@temp.\pgf@stop% \fi% -} +}% \def\pgf@anim@decomp@#1.#2\pgf@stop{% \def\pgf@anim@id@name{#1}% \def\pgf@anim@type{#2}% -} +}% % Assigns a name to this animation so that it can be used as an event % id in another animation -% +% % #1 = A name -% +% % The name "previous" is special and always refers to the most recent -% animation before the animation currently being constructed. +% animation before the animation currently being constructed. % % Example: -% +% % \pgfanimateattribute{fill opacity}{name=anim 1, entry={0s}{1}, entry={1s}{0}} % \pgfanimateattribute{fill opacity}{begin on={end,of=anim 1}, entry={0s}{1}, entry={1s}{0}} \pgfanimationset{ - name/.code=\pgfuseid{#1} -} + name/.code=\pgfuseid{#1}, +}% % Configures whether an animation can be restarted -% +% % Some animations can restart when certain events take place. This key -% configures this. Setting it to -% +% configures this. Setting it to +% % "true" allows a restart at any time, % "false" does not allow a restart, % "when not active" allows a restart only, when the element is not -% active. +% active. % % Example: -% +% % \pgfanimateattribute{fill opacity}{entry={0s}{1}, entry={1s}{0}, restart=false} \pgfanimationset{ @@ -343,29 +343,29 @@ restart/true/.code=\pgfsysanimkeyrestartalways, restart/false/.code=\pgfsysanimkeyrestartnever, restart/never/.code=\pgfsysanimkeyrestartnever, - restart/when not active/.code=\pgfsysanimkeyrestartwhennotactive -} + restart/when not active/.code=\pgfsysanimkeyrestartwhennotactive, +}% % Sets the number times an animation should repeat -% +% % #1 = A string of the following form: -% +% % [<empty> | <number> | for <time>] ["accumulating"] -% +% % When empty (the default value) the animation repeats forever. % % When a <number> is provided, the animation will repeat <number> -% times, which need not be an integer. -% -% When a <time> is given, the repeating will stop after this much time. -% +% times, which need not be an integer. +% +% When a <time> is given, the repeating will stop after this much time. +% % When the optional "accumulating" is specified, the repeat % accumulates, otherwise each repeat begins with the original start -% value. +% value. % % Example: -% +% % \pgfanimateattribute{fill opacity}{repeats, entry={0s}{1}, entry={6s}{0}} % \pgfanimateattribute{fill opacity}{repeats=2, entry={0s}{1}, entry={6s}{0}} % \pgfanimateattribute{fill opacity}{repeats=2 accumulating, entry={0s}{1}, entry={6s}{0}} @@ -385,25 +385,25 @@ repeats/.default=, repeat/.style={repeats={#1}}, repeat/.default=, -} +}% \def\pgfanim@parse@acc#1accumulating\pgf@stop{% \pgfanim@parse@noacc{#1}% -} +}% \def\pgfanim@parse@noacc#1{% - \pgfutil@in@{\pgf@stop for}{\pgf@stop#1}% + \pgfutil@in@{\pgf@stop for}{\pgf@stop#1}% \ifpgfutil@in@% \pgfanim@parse@for#1\pgf@stop% \else% \def\pgf@temp{#1}% \ifx\pgf@temp\pgfutil@empty% \pgfsysanimkeyrepeatindefinite% - \else% + \else% \pgfmathparse{#1}% \expandafter\pgfsysanimkeyrepeat\expandafter{\pgfmathresult}% \fi% \fi% -} -\def\pgfanim@parse@for for#1\pgf@stop{\pgfparsetime{#1}\expandafter\pgfsysanimkeyrepeatdur\expandafter{\pgftimeresult}} +}% +\def\pgfanim@parse@for for#1\pgf@stop{\pgfparsetime{#1}\expandafter\pgfsysanimkeyrepeatdur\expandafter{\pgftimeresult}}% @@ -413,30 +413,30 @@ % (relative to the current context). The "begin..." options may be % used multiple times and their effects accumulate, likewise for the % "end..." options. -% +% % #1 = A time -% +% % Example: -% +% % \pgfanimateattribute{fill opacity}{begin=2s, end=2.5s, entry={0s}{1}, entry={1s}{0}} \pgfanimationset{ begin/.code=\pgfparsetime{#1}\expandafter\pgfsysanimkeyoffset\expandafter{\pgftimeresult}{begin}, end/.code=\pgfparsetime{#1}\expandafter\pgfsysanimkeyoffset\expandafter{\pgftimeresult}{end}, -} +}% % Specifies that an animation should begin (or end) when a certain -% event takes place. -% +% event takes place. +% % #1 = A list of key-value pairs. -% +% % The following keys are allowed: -% +% % event=some event : The begin / end is triggered by that event. The % list of allowed events is defined in the SVG -% standard. +% standard. % of=some name : The event does not refer to the current group, % but to the object named "some name", which must % previously have been named \pgfuseid. If some @@ -447,11 +447,11 @@ % repeat=number : The trigger is that an animation has been % repeated number times. % delay=time : A delay, may be negative. -% +% % These keys are executed with the path prefix /pgf/animation/events. -% +% % Some of them are predefined: -% +% % "click" is a shorthand for "event=click" % "focus in" is a shorthand for "event=focusin" % "focus out" is a shorthand for "event=focusout" @@ -468,7 +468,7 @@ % % % Begin after 5s or when clicked: % \pgfanimateattribute{fill opacity}{begin=5s, begin on=click, entry={0s}{1}, entry={1s}{0}} -% +% % % Begin, when an object named "button" is clicked % \pgfanimateattribute{fill opacity}{begin on={click, of=button}, entry={0s}{1}, entry={1s}{0}, name=another animation} % @@ -477,8 +477,8 @@ \pgfanimationset{ begin on/.code={\pgfanim@make@event{#1}{begin}},% - end on/.code={\pgfanim@make@event{#1}{end}} -} + end on/.code={\pgfanim@make@event{#1}{end}}, +}% \def\pgfanim@make@event#1#2{% \let\pgfanim@event@event\pgfutil@empty% @@ -501,7 +501,7 @@ \else% \pgfsysanimkeyaccesskey{\pgfanim@event@key}{\pgfanim@event@delay}{#2}% \fi% -} +}% \pgfkeys{/pgf/animation/events/.cd, event/.store in=\pgfanim@event@event, @@ -530,12 +530,12 @@ mouse move/.style={event=mousemove}, mouse out/.style={event=mouseout}, begin/.style={event=begin}, - end/.style={event=end} -} + end/.style={event=end}, +}% % Specifies the timeline start for a snapshot -% +% % #1 = a time % % Description: @@ -548,18 +548,18 @@ \pgfanimationset{ begin snapshot/.code= \pgfparsetime{#1}\expandafter\pgfsysanimkeysnapshotstart\expandafter{\pgftimeresult} -} +}% -% Specifies the origin for tranforming animations -% +% Specifies the origin for transforming animations +% % #1 = a pgf point % % Specifies the origin of transformations (for instance, a rotate will -% rotate around this point). +% rotate around this point). % % Example: -% +% % \pgfanimateattribute{rotate}{entry={0s}{0}, entry={1s}{90}, origin=\pgfpoint{1cm}{1cm}} \pgfanimationset{ @@ -572,42 +572,42 @@ \noexpand\pgf@anim@save@transform{\noexpand\pgftransformshift{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}% }% \pgf@marshal% - } -} + }, +}% \pgfsysanimkeycanvastransform{{\pgflowlevelsynccm}}{\pgftransforminvert\pgflowlevelsynccm}% -% Specifies the tranforming for the animation coordinate system -% +% Specifies the transforming for the animation coordinate system +% % #1 = code that changes the pgf coordinate system % % Specifies an additional transformation of the coordinate system for -% animations. +% animations. % % Example: -% +% % \pgfanimateattribute{shift}{entry={0s}{\pgfpointorigin}, entry={1s}{\pgfpoint{1cm}{0cm}}, transform=\pgftransformrotate{30}} \pgfanimationset{ transform/.code={% \pgfsysanimkeycanvastransform{#1{\pgflowlevelsynccm}}{\pgftransforminvert\pgflowlevelsynccm}% \pgf@anim@save@transform{#1}% - } -} + }, +}% % Specifies a motion path. -% +% % #1 = pgf commands for constructing a path % % Use this key to specify a motion path for the motion attribute. The % values of the "entry" key specify fractions along this path. % % Example: -% +% % \pgfanimateattribute{motion}{ % entry={0s}{0}, entry={1s}{1}, % along=\pgfpathmoveto{\pgfpointorigin} \pgfpathlineto{\pgfpoint{1cm}{1cm}} @@ -625,18 +625,18 @@ }% \expandafter\pgf@anim@protocol@path@size\pgfanim@the@path\pgf@stop% \expandafter\pgfsysanimkeymovealong\expandafter{\pgfanim@the@path}% -} +}% % Specifies a motion soft path. -% +% % #1 = a pgf soft path (result of calling \pgfsyssoftpath@getcurrentpath) % % Use this key to specify a motion path for the motion attribute when % a softpath has already been constructed. % % Example: -% +% % \pgfanimateattribute{motion}{entry={0s}{0}, entry={1s}{1}, % along softpath=\pgfsyssoftpath@movetotoken {0pt}{0pt}\pgfsyssoftpath@linetotoken {10pt}{10pt}} @@ -644,22 +644,22 @@ along softpath/.code=% \pgf@anim@protocol@path@size#1\pgf@stop% \pgfsysanimkeymovealong{#1}% -} +}% \def\pgf@anim@protocol@path@size{% \pgfutil@ifnextchar\pgf@stop\relax\pgf@anim@protocol@path@size@% -} +}% \def\pgf@anim@protocol@path@size@#1#2#3{% \pgf@protocolanimsizes@direct{#2}{#3}% \pgf@anim@protocol@path@size% -} +}% % Configures whether the motion is rotated along the path. -% +% % Example: -% +% % \pgfanimateattribute{motion}{rotate along, entry={0s}{0}, entry={1s}{1}, % along=\pgfpathmoveto{\pgfpointorigin} \pgfpathlineto{\pgfpoint{1cm}{1cm}}} @@ -668,12 +668,12 @@ rotate along/.default=true, rotate along/true/.code=\pgfsysanimkeyrotatealong, rotate along/false/.code=\pgfsysanimkeynorotatealong, -} +}% % Specifies an entry -% +% % #1 = A time. This time will be parsed using \pgfparsetime % #2 = A value. The format of this value depends on the current type % of the animation attribute. (So for an animation of the "fill @@ -683,15 +683,15 @@ % value will be used. For SVG, this is allowed only when exactly % two entries are specified and this special value is used for % the first one. -% +% % Example: -% +% % \pgfanimateattribute{fill opacity}{entry={0s}{0}, entry={1s}{1}} -\pgfanimationset{entry/.code 2 args=\pgf@anim@entry{#1}{#2}} +\pgfanimationset{entry/.code 2 args=\pgf@anim@entry{#1}{#2}}% \def\pgf@anim@entry#1#2{% \pgf@anim@entry@giventrue% - \pgfparsetime{#1}% + \pgfparsetime{#1}% \edef\pgf@marshal{\noexpand\pgfsysanimkeytime{\pgftimeresult}\pgf@anim@entry@spline\pgf@anim@exit@spline}% \pgf@marshal% \def\pgf@temp{#2}% @@ -700,39 +700,39 @@ \else% \pgfanim@type@parser{#2}% \fi% -} -\def\pgf@special@current@text{current value} +}% +\def\pgf@special@current@text{current value}% \newif\ifpgf@anim@entry@given % Specifies a base value -% +% % #1 = A value. The format is as for the entry key. -% +% % Description: % % Will set the "base" value of the animation, which is a value that is -% used when the animation is not active. +% used when the animation is not active. % % Example: -% +% % \pgfanimateattribute{fill opacity}{base = 0.5, entry={0s}{0.5}, entry={1s}{1}} -\pgfanimationset{base/.code=\pgf@anim@base{#1}} +\pgfanimationset{base/.code=\pgf@anim@base{#1}}% \def\pgf@anim@base#1{% \pgfsysanimkeybase% \pgfanim@type@parser{#1}% -} +}% % Specifies that there is an entry "at infinity". -% +% % When an animation ends, its "effect" can either persist or it can be % removed. Setting "freeze at end" to true will cause it to persist, % otherwise it will be removed. % % Example: -% +% % \pgfanimateattribute{fill opacity}{entry={0s}{1}, entry={1s}{0}, freeze at end} \pgfanimationset{ @@ -740,7 +740,7 @@ freeze at end/.default=true, freeze at end/true/.code=\pgfsysanimkeyfreezeatend, freeze at end/false/.code=\pgfsysanimkeyremoveatend, -} +}% @@ -757,7 +757,7 @@ % value as, say, 1s is 55, at 2s it is 60, and so on. % % Unfortunately, the linear interpolation does not "look" nice in many -% cases since the acceleration of a linear interpolation is zero +% cases since the acceleration of a linear interpolation is zero % during the animation, but infinite at the beginning and at the end; % which looks "jerky". % @@ -803,12 +803,12 @@ }, stay/.code=\let\pgf@anim@exit@spline\pgfsys@stay@text,% jump/.code=\let\pgf@anim@entry@spline\pgfsys@jump@text,% - linear/.style={entry control={1}{1},exit control={0}{0}} -} -\def\pgf@anim@entry@spline@base{{1}{1}} -\def\pgf@anim@exit@spline@base{{0}{0}} + linear/.style={entry control={1}{1},exit control={0}{0}}, +}% +\def\pgf@anim@entry@spline@base{{1}{1}}% +\def\pgf@anim@exit@spline@base{{0}{0}}% -\def\pgf@anim@reset@linear{\let\pgf@anim@entry@spline\pgf@anim@entry@spline@base\let\pgf@anim@exit@spline\pgf@anim@exit@spline@base} +\def\pgf@anim@reset@linear{\let\pgf@anim@entry@spline\pgf@anim@entry@spline@base\let\pgf@anim@exit@spline\pgf@anim@exit@spline@base}% \pgf@anim@reset@linear @@ -838,8 +838,8 @@ \pgfmathsetmacro\pgf@anim@marker@extra@shorten@end{#1}% \edef\pgf@anim@marker@extra@shorten@end{\pgf@anim@marker@extra@shorten@end pt}% \fi% - } -} + }, +}% \def\pgf@anim@marker@extra@shorten@start{0pt}% \def\pgf@anim@marker@extra@shorten@end{0pt}% \def\pgf@anim@marker@shorten@start{0pt}% @@ -865,14 +865,14 @@ \else% \pgf@anim@parser@arrows#1\pgf@stop% \fi% - } -} + }, +}% \def\pgf@anim@parser@arrows#1-#2\pgf@stop{% \pgf@anim@prepare@arrow@start{#1}% \pgf@anim@prepare@arrow@end{#2}% \expandafter\expandafter\expandafter\pgfsysanimkeytipmarkers\expandafter\expandafter\expandafter{\expandafter\pgf@anim@marker@id@start\expandafter}\expandafter{\pgf@anim@marker@id@end}% -} +}% \def\pgf@anim@prepare@arrow@start#1{% \def\pgf@anim@temp{#1}% @@ -888,7 +888,7 @@ }% \let\pgf@anim@marker@shorten@start\pgf@anim@temp% \fi% -} +}% \def\pgf@anim@prepare@arrow@end#1{% \def\pgf@anim@temp{#1}% @@ -903,7 +903,7 @@ }% \let\pgf@anim@marker@shorten@end\pgf@anim@marker@shorten% \fi% -} +}% % Draw an arrow using markers @@ -940,13 +940,13 @@ \expandafter\global\expandafter\let\csname pgfanim@marker@cache@\pgf@anim@marker@id@list\endcsname#2% \expandafter\global\expandafter\let\csname pgfanim@marker@cachel@\pgf@anim@marker@id@list\endcsname#3% \fi% -} +}% \def\pgf@anim@marker@id@test#1#2{% \pgfarrows@getid{#1}{#2}% \expandafter\expandafter\expandafter\pgf@arrow@drawer@shift\csname pgf@ar@ends@\pgf@arrow@id\endcsname% \xdef\pgf@anim@marker@id@list{\pgf@anim@marker@id@list:\pgf@arrow@id\ifpgfarrowswap s\else n\fi\pgfarrows@slant w\the\pgf@xc}% -} +}% \def\pgf@anim@drawer@marker#1#2{% % Prepare: @@ -954,7 +954,7 @@ \pgfarrows@getid{#1}{#2}% % Do shift: \expandafter\expandafter\expandafter\pgf@arrow@drawer@shift\csname pgf@ar@ends@\pgf@arrow@id\endcsname% - % Do slant: + % Do slant: \ifdim\pgfarrows@slant pt=0pt% \else% \pgftransformxslant{\pgfarrows@slant}% @@ -969,11 +969,11 @@ \pgf@arrows@color@setup% \pgflowlevelsynccm\csname pgf@ar@cache@\pgf@arrow@id\endcsname% \pgfsys@endscope% - }% + }% \expandafter}% % Transform to next tip: \expandafter\pgftransformxshift\expandafter{\the\pgf@xc}% -} +}% @@ -986,53 +986,53 @@ % The parsers % Parse no value -% +% % #1 is ignored -% +% % Example: -% +% % entry = {0s}{5+6} \def\pgfanim@parse@type@none#1{% \pgfsysanimvalnone% -} +}% % Parse a scalar -% +% % #1 is a number parsed using \pgfmathparse -% +% % Example: -% +% % entry = {0s}{5+6} \def\pgfanim@parse@type@scalar#1{% \pgfmathparse{#1}% \expandafter\pgfsysanimvalscalar\expandafter{\pgfmathresult}% -} +}% -% Parse a dimension -% +% Parse a dimension +% % #1 is a number parsed using \pgfmathparse -% +% % Example: -% +% % entry = {0s}{5cm + 2pt} \def\pgfanim@parse@type@dimension#1{% \pgfmathparse{#1}% \expandafter\pgfsysanimvaldimension\expandafter{\pgfmathresult pt}% -} +}% % Parse a mapped text -% +% % #1 is a text. It is looked up in \pgf@anim@map@#1 and gets replaced % by what this macro expands to. -% +% % Example: -% +% % entry = {0s}{true} \def\pgfanim@parse@type@mapped#1{% @@ -1044,24 +1044,24 @@ \fi% \expandafter}% \expandafter\pgfsysanimvaltext\expandafter{\pgf@temp}% -} +}% -% Parse a color -% +% Parse a color +% % #1 is a color -% +% % entry = {0s}{blue!20} \def\pgfanim@parse@type@color#1{% \pgfsysanimvalcolor{#1}% -} +}% % Parse a path -% +% % #1 is a sequence of pgf path construction commands -% +% % entry = {0s}{\pgfpathmoveto{\pgfpointorigin} \pgfpathlineto{\pgfpoint{1cm}{1cm}}} \def\pgfanim@parse@type@path#1{% @@ -1075,13 +1075,13 @@ \pgfsyssoftpath@setcurrentpath\pgfanim@save@path% }% \expandafter\pgfanim@parse@type@softpath\expandafter{\pgfanim@the@path}% -} +}% % Parse a softpath -% +% % #1 is a sequence of pgf softpath token commands -% +% % entry = {0s}{\pgfsyssoftpath@movetotoken {0pt}{0pt}\pgfsyssoftpath@linetotoken {10pt}{10pt}} \def\pgfanim@parse@type@softpath#1{% @@ -1103,52 +1103,52 @@ \fi% \expandafter}% \expandafter\pgfsysanimvalpath\expandafter{\pgf@anim@path}% -} +}% \def\pgf@anim@shorten@path{% \pgf@precise@shorteningfalse% \let\pgf@path@shortening@distance\pgf@path@shortening@distance@end% - % + % % Step 1: Split - % + % \pgfprocesssplitpath{\pgf@anim@path}% \pgfprocesssplitsubpath{\pgfprocessresultpathsuffix}% - % + % % Step 2: extract - % + % \expandafter\pgf@parse@end\pgfprocessresultsubpathsuffix\pgf@stop\pgf@stop\pgf@stop% - % + % % Step 3: prep end - % + % \pgf@prep@end% - % + % % Step 4: shorten end - % + % \ifdim\pgf@path@shortening@distance=0pt\else\pgf@do@shorten@end\fi% % \let\pgf@path@shortening@distance\pgf@path@shortening@distance@start% - % + % % Step 5: extract - % + % \expandafter\pgf@parse@start\pgfprocessresultpathsuffix\pgf@stop\pgf@stop\pgf@stop% - % + % % Step 6: prep start - % + % \pgf@prep@start% - % + % % Step 7: shorten start - % + % \ifdim\pgf@path@shortening@distance=0pt\else\pgf@do@shorten@start\fi% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\pgf@anim@path% \expandafter\expandafter\expandafter{\expandafter\pgfprocessresultpathprefix\pgfprocessresultpathsuffix}% -} +}% -% Parse a point -% +% Parse a point +% % #1 is a point % % entry = {0s}{\pgfpoint{1cm}{2cm}} @@ -1157,13 +1157,13 @@ \pgf@process{#1}% \pgf@protocolanimsizes\pgf@x\pgf@y% \expandafter\expandafter\expandafter\pgfsysanimvaltranslate\expandafter\expandafter\expandafter{\expandafter\the\expandafter\pgf@x\expandafter}\expandafter{\the\pgf@y}% -} +}% -% Parse a scaling -% +% Parse a scaling +% % #1 = if #1 contains a comma, the two parts are passed to -% pgfmathparse, otherwise the whole thing is passed to pgfmathparse. +% pgfmathparse, otherwise the whole thing is passed to pgfmathparse. % % entry = {0s}{2} % entry = {0s}{2,1} @@ -1176,18 +1176,18 @@ \pgfmathparse{#1}% \expandafter\pgfsysanimvalscale\expandafter{\pgfmathresult}{\pgfmathresult}% \fi% -} +}% \def\pgfanim@unpack@comma#1,#2\pgf@stop{% \pgfmathsetmacro{\pgf@anim@temp@x}{#1}% \pgfmathsetmacro{\pgf@anim@temp@y}{#2}% \expandafter\expandafter\expandafter\pgfsysanimvalscale\expandafter\expandafter\expandafter{\expandafter\pgf@anim@temp@x\expandafter}\expandafter{\pgf@anim@temp@y}% -} +}% -% Parse a viewbox -% -% #1 consists of two points, each in paranetheses +% Parse a viewbox +% +% #1 consists of two points, each in parentheses % % entry = {0s}{{\pgfpoint{1cm}{2cm}}{\pgfpoint{3cm}{4cm}}} @@ -1195,9 +1195,9 @@ {% \pgfanim@unpack@viewbox#1% \xdef\pgf@anim@caller{\noexpand\pgfsysanimvalviewbox{\the\pgf@x}{\the\pgf@y}{\the\pgf@xa}{\the\pgf@ya}}% - }% + }% \pgf@anim@caller% -} +}% \def\pgfanim@unpack@viewbox#1#2{% \pgfpointtransformed{#2}% \pgf@xa\pgf@x% @@ -1213,13 +1213,13 @@ \pgf@y=\pgf@ya% \pgf@ya=\pgf@yb% \fi% -} +}% % Parse a dash pattern -% +% % #1,#2 is a dash pattern as in \pgfsetdash % % entry = {0s}{{{1pt}{2pt}{3pt}{1pt}}{1pt}} @@ -1230,13 +1230,13 @@ \def\pgf@next{\pgf@strip}% \pgf@strip#1{pgf@stop}% \expandafter\pgfsysanimvaldash\expandafter{\pgf@temp}{#2}% -} +}% -% +% % % Bounding box adjustments in animations. % @@ -1245,10 +1245,10 @@ \def\pgf@protocolanimsizes#1#2{% \edef\pgf@temp{\noexpand\pgf@anim@handle@point{\the#1}{\the#2}}% \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgf@protocolanim@list\expandafter\expandafter\expandafter{\expandafter\pgf@protocolanim@list\pgf@temp}% -} +}% \def\pgf@protocolanimsizes@direct#1#2{% \expandafter\def\expandafter\pgf@protocolanim@list\expandafter{\pgf@protocolanim@list\pgf@anim@handle@point{#1}{#2}}% -} +}% \let\pgf@protocolanim@list\pgfutil@empty \def\pgf@animation@check@translate{% @@ -1256,7 +1256,7 @@ \else% \expandafter\expandafter\expandafter\pgf@animation@check@translate@\expandafter\expandafter\expandafter{\expandafter\pgf@protocolanim@list\expandafter}\expandafter{\pgf@anim@saved@transform}% \fi% -} +}% \let\pgf@animation@check@motion\pgf@animation@check@translate \def\pgf@animation@check@translate@#1#2{% @@ -1279,7 +1279,7 @@ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgf@path@size@hook\expandafter\expandafter\expandafter{% \expandafter\pgf@path@size@hook\expandafter\pgf@anim@bb\pgf@temp}% }{}% -} +}% \def\pgf@anim@handle@point#1#2{% \pgf@x#1\pgf@y#2% \pgf@pos@transform\pgf@x\pgf@y% @@ -1287,8 +1287,8 @@ \ifdim\pgf@x>\pgf@picmaxx\pgf@picmaxx\pgf@x\fi% \ifdim\pgf@y<\pgf@picminy\pgf@picminy\pgf@y\fi% \ifdim\pgf@y>\pgf@picmaxy\pgf@picmaxy\pgf@y\fi% -} - +}% + \newdimen\pgf@anim@dim \def\pgf@anim@bb#1#2#3#4{% (#1,#2) lower left, (#3, #4) upper right @@ -1304,11 +1304,11 @@ \pgf@anim@dim\pgf@size@hook@y% \advance\pgf@anim@dim by#4\relax% \ifdim\pgf@anim@dim>\pgf@picmaxy\global\pgf@picmaxy\pgf@anim@dim\fi% -} +}% \def\pgf@anim@save@transform#1{% \def\pgf@anim@saved@transform{#1}% -} +}% \let\pgf@anim@saved@transform\pgfutil@empty% \endinput diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulebending.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulebending.code.tex index cc9ed651c71..888db712043 100644 --- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulebending.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulebending.code.tex @@ -14,8 +14,8 @@ % This file defines commands for drawing bending arrows and lines. % -\usepgfmodule{nonlineartransformations} -\usepgflibrary{curvilinear} +\usepgfmodule{nonlineartransformations}% +\usepgflibrary{curvilinear}% % Configuration options for arrow tips: @@ -25,13 +25,14 @@ /pgf/arrow keys/flex/.default=1, /pgf/arrow keys/flex'/.code=\pgfarrowsaddtooptions{\pgf@arrows@the@rigidity#1pt\let\pgf@arrow@flex@mode\pgf@arrow@mode@is@flex@prime}, /pgf/arrow keys/flex'/.default=1, - /pgf/arrow keys/bend/.code=\pgfarrowsaddtooptions{\let\pgf@arrow@flex@mode\pgf@arrow@mode@is@bend} -} + /pgf/arrow + keys/bend/.code=\pgfarrowsaddtooptions{\let\pgf@arrow@flex@mode\pgf@arrow@mode@is@bend}, +}% -\def\pgf@arrow@mode@is@flex{1} -\def\pgf@arrow@mode@is@flex@prime{2} -\def\pgf@arrow@mode@is@bend{3} +\def\pgf@arrow@mode@is@flex{1}% +\def\pgf@arrow@mode@is@flex@prime{2}% +\def\pgf@arrow@mode@is@bend{3}% \newdimen\pgf@arrows@the@rigidity @@ -39,21 +40,21 @@ % % Handle the end of a curve % -% +% -% First, the preparation. This is, essenatially, setting up the +% First, the preparation. This is, essentially, setting up the % nonlinear transformation \def\pgf@prep@curveend{ \pgftransformreset% \pgfsetcurvilinearbeziercurve{\pgfpointlastonpath}{\pgfpointsecondlastonpath}{\pgfpointthirdlastonpath}{\pgfpointfourthlastonpath} -} +}% % Second, the shortening. \def\pgf@do@shorten@curvedend{% \expandafter\expandafter\expandafter\pgf@do@shorten@curvedend@unpack\expandafter\pgfpointfourthlastonpath\pgfpointthirdlastonpath% -} +}% \def\pgf@do@shorten@curvedend@unpack\pgfqpoint#1#2\pgfqpoint#3#4{% \pgf@process{\pgfcurvilineardistancetotime{\pgf@path@shortening@distance}}% % Compute new curve: @@ -73,13 +74,13 @@ \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\pgfprocessresultpathsuffix% \expandafter\expandafter\expandafter{\expandafter\pgfprocessresultsubpathprefix\pgfprocessresultsubpathsuffix}% -} +}% % Third, the drawing \def\pgf@do@draw@curvedend{% \pgf@do@draw@curved\pgf@end@tip@sequence% -} +}% \def\pgf@do@draw@curved#1{% {% @@ -89,7 +90,7 @@ \let\pgf@arrow@handle@dot\relax% #1% }% -} +}% \def\pgf@draw@curved#1#2{% % Prepare: @@ -105,9 +106,9 @@ \ifcase\pgf@arrow@flex@mode\relax% \expandafter\expandafter\expandafter\pgf@arrow@drawer@rigid\csname pgf@ar@visual@\pgf@arrow@id\endcsname% like flex \or% - \expandafter\expandafter\expandafter\pgf@arrow@drawer@rigid\csname pgf@ar@visual@\pgf@arrow@id\endcsname% + \expandafter\expandafter\expandafter\pgf@arrow@drawer@rigid\csname pgf@ar@visual@\pgf@arrow@id\endcsname% \or% - \expandafter\expandafter\expandafter\pgf@arrow@drawer@rigid\csname pgf@ar@ends@\pgf@arrow@id\endcsname% + \expandafter\expandafter\expandafter\pgf@arrow@drawer@rigid\csname pgf@ar@ends@\pgf@arrow@id\endcsname% \or% \pgf@arrow@drawer@bend% \fi% @@ -116,8 +117,8 @@ \expandafter}% % Transform to next tip: \expandafter\pgf@xb\the\pgf@xb% -} -\def\pgf@falsetext{false} +}% +\def\pgf@falsetext{false}% \def\pgf@arrow@drawer@rigid@shift#1#2#3{% tip end, back end, line end, sep % Let xa be the actual back end of the current arrow plus the back end: @@ -127,14 +128,14 @@ \pgf@x#1% \advance\pgf@x by\pgfarrowsep% \advance\pgf@xb by-\pgf@x% -} +}% \def\pgf@arrow@drawer@bend{% \pgftransformnonlinear{\pgf@arrow@bending@mode{\pgf@x}{\pgf@y}} \pgftransformscale{-1}% \pgftransformxshift{-\pgf@xa}% - % Do slant: + % Do slant: \ifdim\pgfarrows@slant pt=0pt% \else% \pgftransformxslant{\pgfarrows@slant}% @@ -150,7 +151,7 @@ \endpgfscope% }% \pgf@arrows@bending@hull% -} +}% \def\pgf@arrow@drawer@rigid#1#2#3{% (rigid) start, (rigid) end, dummy % Compute the rigid positions: @@ -169,7 +170,7 @@ \pgf@xc#1% \pgf@xc-\pgf@xc% \pgftransformxshift{+\pgf@xc}% - % Do slant: + % Do slant: \ifdim\pgfarrows@slant pt=0pt% \else% \pgftransformxslant{\pgfarrows@slant}% @@ -183,7 +184,7 @@ \pgflowlevelsynccm\csname pgf@ar@cache@\pgf@arrow@id\endcsname% \endpgfscope% \pgf@arrows@rigid@hull% -} +}% \def\pgf@bending@do@tangent{% \pgf@xb\pgf@xa% @@ -210,7 +211,7 @@ \advance\pgf@xb by-\pgf@xa% \advance\pgf@yb by-\pgf@ya% \pgf@process{\pgfpointnormalised{\pgf@x=\pgf@xb\pgf@y=\pgf@yb}} -} +}% \def\pgf@bending@possible@degenerate{% \ifx\pgf@curvilinear@line@a\pgf@curvilinear@line@b% degenerate! @@ -231,7 +232,7 @@ \else% \pgf@bending@do@tangent@normal% \fi% -} +}% \def\pgf@bending@do@flex{ \pgf@xb\pgf@xa% @@ -248,7 +249,7 @@ \pgf@process{\pgfpointcurveattime{\pgf@xb}{\pgf@curvilinear@line@a}{\pgf@curvilinear@line@b}{\pgf@curvilinear@line@c}{\pgf@curvilinear@line@d}}% \pgf@xb\pgf@x\pgf@yb\pgf@y% \pgftransformarrow{\pgfqpoint{\pgf@xb}{\pgf@yb}}{\pgfqpoint{\pgf@xc}{\pgf@yc}}% -} +}% @@ -266,20 +267,20 @@ \pgf@temp% \pgf@arrow@bending@update@bb% \fi% - \fi% -} + \fi% +}% \def\pgf@arrow@bending@hull@point@first#1#2{% \pgfpointtransformednonlinear{\pgfqpoint{#1}{#2}}% \pgf@xa\pgf@x\pgf@xb\pgf@x% \pgf@ya\pgf@y\pgf@yb\pgf@y% \let\pgf@arrow@hull@point\pgf@arrow@bending@hull@point@other% -} +}% \def\pgf@arrow@bending@hull@point@other#1#2{% \pgfpointtransformednonlinear{\pgfqpoint{#1}{#2}}% \ifdim\pgf@x<\pgf@xa\pgf@xa\pgf@x\else\ifdim\pgf@x>\pgf@xb\pgf@xb\pgf@x\fi\fi% \ifdim\pgf@y<\pgf@ya\pgf@ya\pgf@y\else\ifdim\pgf@y>\pgf@yb\pgf@yb\pgf@y\fi\fi% -} +}% \def\pgf@arrow@bending@update@bb{% \ifdim\pgf@picmaxx=-16000pt\relax% @@ -293,7 +294,7 @@ \ifdim\pgf@xb>\pgf@picmaxx\global\pgf@picmaxx\pgf@xb\fi% \ifdim\pgf@yb>\pgf@picmaxy\global\pgf@picmaxy\pgf@yb\fi% \fi% -} +}% @@ -302,21 +303,21 @@ % % Handle the start of a curve % -% +% -% First, the preparation. +% First, the preparation. \def\pgf@prep@curvedstart{ \pgftransformreset% \pgfsetcurvilinearbeziercurve{\pgfpointfirstonpath}{\pgfpointsecondonpath}{\pgfpointthirdonpath}{\pgfpointfourthonpath}% -} +}% % Second, the shortening. \def\pgf@do@shorten@curvedstart{% \expandafter\expandafter\expandafter\pgf@do@shorten@curvedstart@unpack\expandafter\pgfpointthirdonpath\pgfpointfourthonpath% -} +}% \def\pgf@do@shorten@curvedstart@unpack\pgfqpoint#1#2\pgfqpoint#3#4{% \pgf@process{\pgfcurvilineardistancetotime{\pgf@path@shortening@distance}}% % Compute new curve: @@ -339,14 +340,14 @@ \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\pgfprocessresultpathsuffix% \expandafter\expandafter\expandafter{\expandafter\pgfprocessresultpathsuffix\pgfsubpathend}% -} +}% % Third, the drawing \def\pgf@do@draw@curvedstart{% \pgf@do@draw@curved\pgf@start@tip@sequence% -} +}% diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledatavisualization.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledatavisualization.code.tex index a1122b91370..541c7de8d48 100644 --- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledatavisualization.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledatavisualization.code.tex @@ -9,34 +9,34 @@ \ProvidesFileRCS{pgfmoduledatavisualization.code.tex} -\usepgfmodule{oo,shapes} -\usepgflibrary{fpu} +\usepgfmodule{oo,shapes}% +\usepgflibrary{fpu}% -% This module defines the basic framework for data visualization. +% This module defines the basic framework for data visualization. % In order to visualize data, you first need data. The format for this % data is not specified, indeed, different formats are possible. A % data point is created each time the command \pgfdatapoint is % used. The "parameters" of the data point are just the current values -% of the keys or macros in the current scope. +% of the keys or macros in the current scope. % % A set of data points created using the \pgfdata command. % When a data point is created, a number of signals are emitted, see % the description of \pgfdatapoint. To actually visualize something, % objects should be created that listen to these signals and that -% handle them. +% handle them. % % The following class manages a data visualization \pgfooclass{data visualization} -{ +{% % Class data visualization % % This class is used to "manage" a data visualization. It provides % methods for hooking into the data visualization process and its % constructor initializes the signals that are issued during a data - % visualization. + % visualization. % % When a data visualization object is created, a whole bunch of % signal objects. You should then create objects that connect to @@ -77,20 +77,20 @@ % 12. "at end visualization" code % 13. "end visualization" phase signal % 14. "after visualization" code - \attribute before survey; - \attribute at start survey; - \attribute at end survey; - \attribute after survey; - \attribute before visualization; - \attribute at start visualization; - \attribute at end visualization; - \attribute after visualization; - + \attribute before survey;% + \attribute at start survey;% + \attribute at end survey;% + \attribute after survey;% + \attribute before visualization;% + \attribute at start visualization;% + \attribute at end visualization;% + \attribute after visualization;% + % % Survey counts and handling % - - \attribute survey count=1; + + \attribute survey count=1;% % Each time a survey is done before the visualization is done, this % count is incremented. Normally, there is only one survey, but % objects may request another survey or even more surveys to be @@ -98,28 +98,28 @@ % accessing this count (via the get survey count method), you can % find out which survey is currently being done. - \attribute number of surveys=1; + \attribute number of surveys=1;% % By increasing this count, you can request additional surveys to be % done. - + % Stores the to-be-visualized data - \attribute data; + \attribute data;% + - % Stores the signal objects - \attribute prepare datapoint signal; - \attribute map datapoint signal; - \attribute transform datapoint signal; - \attribute visualize datapoint signal; - \attribute finish datapoint signal; - \attribute survey datapoint signal; - \attribute phase signal; - \attribute path signal; - \attribute direction signal; - \attribute style signal; - - + \attribute prepare datapoint signal;% + \attribute map datapoint signal;% + \attribute transform datapoint signal;% + \attribute visualize datapoint signal;% + \attribute finish datapoint signal;% + \attribute survey datapoint signal;% + \attribute phase signal;% + \attribute path signal;% + \attribute direction signal;% + \attribute style signal;% + + % Constructor % % Inits the signals @@ -139,71 +139,71 @@ % \pgfoothis.get handle(\pgf@dv@me) \pgfkeyslet{/pgf/data visualization/obj}\pgf@dv@me - } + }% % The phase signal will emit the following constants: - \def\pgfdvbeforesurvey{1} - \def\pgfdvbeginsurvey{2} - \def\pgfdvendsurvey{3} - \def\pgfdvaftersurvey{4} - \def\pgfdvbeforevisualization{5} - \def\pgfdvbeginvisualization{6} - \def\pgfdvendvisualization{7} - \def\pgfdvaftervisualization{8} + \def\pgfdvbeforesurvey{1}% + \def\pgfdvbeginsurvey{2}% + \def\pgfdvendsurvey{3}% + \def\pgfdvaftersurvey{4}% + \def\pgfdvbeforevisualization{5}% + \def\pgfdvbeginvisualization{6}% + \def\pgfdvendvisualization{7}% + \def\pgfdvaftervisualization{8}% % The path signale will meit the following constants: - \def\pgfdvpathmovetotoken{5} - \def\pgfdvpathlinetotoken{6} - \def\pgfdvdirectionfromtoken{7} - \def\pgfdvdirectiontotoken{8} - \def\pgfdvdirectionattoken{9} + \def\pgfdvpathmovetotoken{5}% + \def\pgfdvpathlinetotoken{6}% + \def\pgfdvdirectionfromtoken{7}% + \def\pgfdvdirectiontotoken{8}% + \def\pgfdvdirectionattoken{9}% % Method % % Connect the object #1's slot "#2" to the signal named "#3" \method connect(#1,#2,#3) { \pgfoovalueof{#3}.connect(#1,#2) - } - + }% + % Method % % Add data that is to be visualized. The code #1 should call the % \pgfdatapoint macro for each data point it creates. \method add data(#1) { \pgf@dv@stripped@add#1\pgf@stop - } + }% \def\pgf@dv@stripped@add#1\pgf@stop{% \pgfooappend{data}{#1}% - } - + }% + % Setters \method before survey(#1) { \pgfooappend{before survey}{#1} - } + }% \method at start survey(#1) { \pgfooappend{at start survey}{#1} - } + }% \method before visualization(#1) { \pgfooappend{before visualization}{#1} - } + }% \method at start visualization(#1) { \pgfooappend{at start visualization}{#1} - } + }% % Method \method at end survey(#1) { \pgfooprefix{at end survey}{#1} - } + }% \method after survey(#1) { \pgfooprefix{after survey}{#1} - } + }% \method at end visualization(#1) { \pgfooprefix{at end visualization}{#1} - } + }% \method after visualization(#1) { \pgfooprefix{after visualization}{#1} - } + }% % Method @@ -220,9 +220,9 @@ \pgfooget{path signal}\pgf@signalpath \pgfooget{direction signal}\pgf@signaldirection \pgfooget{style signal}\pgf@signalstyle - } + }% + - % Survey method % % Call this method to "survey" the data. This should be done before @@ -247,21 +247,21 @@ \ifnum\c@pgf@counta<\c@pgf@countb \advance\c@pgf@counta by1\relax \pgfooeset{survey count}{\the\c@pgf@counta} - \pgfutil@repeat - } + \pgfutil@repeat + }% % Getter \method get survey count(#1) { \pgfooget{survey count}{#1} - } + }% % Request another survey to be done \method do an additional survey() { \c@pgf@counta=\pgfoovalueof{number of surveys}\relax \advance\c@pgf@counta by1\relax \pgfooeset{number of surveys}{\the\c@pgf@counta} - } - + }% + % Visualize method % % This method will cause the actual visualization. @@ -278,8 +278,8 @@ \pgf@signalphase.emit(\pgfdvendvisualization)% \pgfoovalueof{after visualization} \pgf@signalphase.emit(\pgfdvaftervisualization)% - } -} + }% +}% % @@ -290,7 +290,8 @@ % be. \pgfkeys{/data point/.unknown/.code={% \pgfkeyssetvalue{/data point/\pgfkeyscurrentname}{#1} - }} + }, +}% @@ -312,13 +313,13 @@ % points are produced and handled in order to find out things like % their number or the minimum and maximum values of attributes, so % that axes and picture sizes can be prepared correctly. In the -% visualization phase, data point are actually shown. +% visualization phase, data point are actually shown. % % During the survey phase, for each data point the signal % "surveydatapoint" is emitted. % % During the visualization phase, more signals are emitted. A prepare -% signal is emitted first, giving all objects a +% signal is emitted first, giving all objects a % chance to "prepare" for the data point. Note that it is permissible % for an object to manipulate the data point here (and also % in later on). @@ -326,11 +327,11 @@ % Next, the command \pgfdvmapdatapointtocanvas is called. Mainly, % the effect of this command is to setup the keys /data point/canvas x % and /data point/canvas y, see the description of this command for -% more details. +% more details. % % The next step consists of signaling "visualize data point". Objects % listening to this will cause some form of visualization of the -% data point to occur. +% data point to occur. % % Before the visualization is started, it is checked whether the key % /data point/name is set (to a non-empty value). If so, @@ -344,7 +345,7 @@ \pgf@signalpreparedatapoint.emit()% \pgf@signalmapdatapoint.emit()% \pgf@signalsurveydatapoint.emit()% -} +}% \def\pgfdatapoint@visualizationphase{% \pgf@signalpreparedatapoint.emit()% @@ -355,7 +356,7 @@ }{}% \pgf@signalvisualizedatapoint.emit()% \pgf@signalfinishdatapoint.emit()% -} +}% @@ -373,7 +374,7 @@ % lets listening objects "map" the object by setting up % attributes of the data point. The second asks objects % listening to this signal to transform the current transformation -% matrix. After the signals, we compute where +% matrix. After the signals, we compute where % the origin lies inside this transformed coordinate system. Then the % two keys /data point/canvas x and /data point/canvas y are set to % the values of this position. The local scope ends (but the settings @@ -391,7 +392,7 @@ \noexpand\pgfkeyssetvalue{/data point/canvas y}{\the\pgf@y} }% \pgf@marshal% -} +}% % Help functions for locating a canvas data point % @@ -402,7 +403,7 @@ \def\pgfpointdvdatapoint{% \pgfqpoint{\pgfkeysvalueof{/data point/canvas x}}{\pgfkeysvalueof{/data point/canvas y}}% -} +}% \def\pgfpointdvlocaldatapoint{% {% @@ -413,7 +414,7 @@ \pgf@signaltransformdatapoint.emit()% \pgfpointtransformed{\pgfpointorigin}% }% -} +}% @@ -462,7 +463,7 @@ #3{}% \fi% }% -} +}% % Handle a moveto @@ -471,7 +472,7 @@ % given by the canvas position of the current local data point. \def\pgfpathdvmoveto{% \pgfdv@generic{\pgf@signalpath}{\pgfdvpathmovetotoken}{\pgfpathmoveto} -} +}% % Handle a lineto @@ -480,7 +481,7 @@ % given by the canvas position of the current local data point. \def\pgfpathdvlineto{% \pgfdv@generic{\pgf@signalpath}{\pgfdvpathlinetotoken}{\pgfpathlineto} -} +}% @@ -491,9 +492,9 @@ % #2 = code for setting the attributes of the second point % % The current point should be a point on a line from #1 to -% #2. Both points as well as the current point are +% #2. Both points as well as the current point are % localized on the canvas and a vector pointing from the first point -% to the second one is returned. However, for instance in polar +% to the second one is returned. However, for instance in polar % coordinates the vector may actually "point along" the angle axis. % % Internally, this command first sets up the first data point and then @@ -519,7 +520,7 @@ } }}} } -} +}% @@ -534,7 +535,7 @@ % Run the rendering pipeline on a dataset and/or save the dataset. -% +% % #1 = options with path /pgf/data/ % #2 = optionally data given inline in curly braces. % @@ -543,7 +544,7 @@ % This command is used to define a data set. For a single data % visualization, multiple data sets can be defined, they will % accumulate. Data can be in different formats, as specified by the -% "format" key, and you can define new formats. +% "format" key, and you can define new formats. % % The settings of the following keys are important: % @@ -555,17 +556,17 @@ % % /pgf/data/read from file % determines where the data is. -% +% % /pgf/data/store in group % when nonempty, the data is stored here instead of being fed to the % rendering pipeline % % /pgf/data/use group -% when nonempty, data that has previsouly been stored here using +% when nonempty, data that has previously been stored here using % |define group| is read from here and all other keys are ignored % % If "read from file" is empty, the data is stored in the argument that -% follows. Otherwise, the data is read from the specified source file. +% follows. Otherwise, the data is read from the specified source file. % This data is stored in an internal variable, which is local to the % current group. % @@ -577,7 +578,7 @@ % handler is started for each data set. This works as follows: first, % the handler's startup code is executed. Then for each line of the % data file/the data given inline, the line handler function is -% called. Finally, the data format end handler is called. +% called. Finally, the data format end handler is called. % % The format handler's job is to call \pgfdatapoint each time a % complete data point has been produced. @@ -597,18 +598,18 @@ % \pgfdata[format=space separated columns] % { % % today -% 2000 2300 2100 2200 +% 2000 2300 2100 2200 % 2000 2350 2200 2500 -% 2200 2300 2250 2260 -% 1800 2260 2260 1900 +% 2200 2300 2250 2260 +% 1800 2260 2260 1900 % 2000 2300 2100 2200 % } % % \pgfdata[format=comma separated columns] % { % % yesterday -% 2000, 2350, 2200, 2250 -% 2200, 2300, 2250, 2260 +% 2000, 2350, 2200, 2250 +% 2200, 2300, 2250, 2260 % } % % \pgfdata[read from file=data.csv,format=comma separated columns] @@ -616,7 +617,7 @@ % \dv.survey() % \dv.visualize() -\def\pgfdata{\pgfutil@ifnextchar[{\pgf@datagroup@data@opt}{\pgf@datagroup@data@opt[]}}%} +\def\pgfdata{\pgfutil@ifnextchar[{\pgf@datagroup@data@opt}{\pgf@datagroup@data@opt[]}}%}% \def\pgf@datagroup@data@opt[#1]{% % Ok, add one data thing... \begingroup% @@ -636,10 +637,10 @@ \csname pgf@dv@group@@\pgf@dv@use@group\endcsname% }% \fi% - \endgroup% + \endgroup% \expandafter\pgf@dv@cont@code% \fi% -} +}% \def\pgf@datagroup@data@opt@cont{% \pgfkeysgetvalue{/pgf/data/format}\pgf@dv@format% \expandafter\let\expandafter\pgf@dv@format@catcodes\csname pgfdv@format@\pgf@dv@format @catcodes\endcsname% @@ -653,8 +654,8 @@ \let\pgf@next\pgf@datagroup@grab@external% \fi% \pgf@next% -} - +}% + \def\pgf@datagroup@grab@inline{% \pgfutil@ifnextchar\bgroup{% \begingroup% @@ -662,13 +663,13 @@ \pgf@dv@format@catcodes% \pgf@datagroup@grab@@inline}% {\pgferror{Opening brace expected}}% -} +}% \def\pgf@datagroup@grab@external{% \fi% \endgroup% \pgf@dv@do@adddata{\pgfkeysvalueof{/pgf/data visualization/obj}.add data({{{\pgf@datagroup@do@external}}})}% \pgf@dv@cont@code% -} +}% \def\pgf@dv@do@adddata#1{% \pgfkeysgetvalue{/pgf/data/store in group}\pgf@dv@temp% @@ -677,9 +678,9 @@ \else% \expandafter\pgfutil@g@addto@macro\csname pgf@dv@group@@\pgf@dv@temp\endcsname{#1}% \fi% -} +}% -{\catcode`\^^M=\active% +{\catcode`\^=7 \catcode`\^^M=13 \gdef\pgf@datagroup@grab@@inline#1{% \endgroup% \pgf@dv@do@adddata{\pgfkeysvalueof{/pgf/data visualization/obj}.add data({{{\pgf@datagroup@do@inline#1^^M\pgf@@eol}}})}% @@ -688,7 +689,7 @@ \pgf@dv@cont@code% }% }% -\def\pgf@@eol{\pgf@eol} +\def\pgf@@eol{\pgf@eol}% \def\pgf@do@data#1#2{% \begingroup% @@ -700,7 +701,7 @@ #2% \csname pgfdv@format@\pgfkeysvalueof{/pgf/data/format}@end\endcsname% \endgroup% -} +}% % @@ -716,7 +717,7 @@ \pgf@datagroup@readline% \fi \immediate\closein\r@pgf@reada% -} +}% \def\pgf@partext{\par}% \def\pgf@datagroup@readline{% @@ -731,7 +732,7 @@ \fi% \fi% \ifeof\r@pgf@reada\else\expandafter\pgf@datagroup@readline\fi% -} +}% % @@ -740,9 +741,9 @@ \def\pgf@datagroup@do@inline{% \pgf@dv@handle@line% -} +}% -{\catcode`\^^M=\active% +{\catcode`\^=7 \catcode`\^^M=13 \gdef\pgf@dv@handle@line{% \pgfutil@ifnextchar^^M{\pgf@dv@format@emptyline\expandafter\pgf@dv@handle@line\pgfutil@gobble}% {\pgfutil@ifnextchar\pgf@@eol{\pgfutil@gobble}{\pgf@dv@handle@nonemptyline}}% @@ -751,7 +752,7 @@ \pgf@dv@format@line#1\pgfeol% \pgf@dv@handle@line% }% -} +}% \pgfkeys{ /pgf/data/data visualization obj/.initial=\undefined, @@ -762,7 +763,7 @@ /pgf/data/store in group/.initial=, /pgf/data/new group/.code={\expandafter\global\expandafter\let\csname pgf@dv@group@@#1\endcsname\pgfutil@empty}, /pgf/data/use group/.initial=, -} +}% @@ -799,7 +800,7 @@ \expandafter\def\csname pgfdv@format@#1@line\endcsname#4\pgfeol{#5}% \expandafter\def\csname pgfdv@format@#1@empty\endcsname{#6}% \expandafter\def\csname pgfdv@format@#1@end\endcsname{#7}% -} +}% @@ -826,7 +827,7 @@ % \pgfdatapoint % } -\pgfdeclaredataformat{TeX code}{}{}{#1}{#1 }{}{} +\pgfdeclaredataformat{TeX code}{}{}{#1}{#1 }{}{}% @@ -844,10 +845,10 @@ % x=7, y=6, lo=10 % } -\pgfdeclaredataformat{named}{}{}{#1}{\pgf@dv@parse@named#1,\pgf@stop}{}{} +\pgfdeclaredataformat{named}{}{}{#1}{\pgf@dv@parse@named#1,\pgf@stop}{}{}% \def\pgf@dv@parse@named{% \pgfutil@ifnextchar\pgf@stop{\pgfdatapoint\pgfutil@gobble}{\pgf@dv@parse@named@} -} +}% \def\pgf@dv@parse@named@#1=#2,#3\pgf@stop{% \foreach \pgf@dv@temp in {#2} {% \def\pgf@dv@tempb{/data point/#1=}% @@ -855,7 +856,7 @@ \expandafter\expandafter\expandafter{\expandafter\pgf@dv@tempb\pgf@dv@temp}% \pgf@dv@parse@named#3\pgf@stop% } -} +}% @@ -868,12 +869,12 @@ % A table consists of a head line, which contains the attribute names % of the values that will be found in the following lines. Each line % (except for the headline) contains one data point. -% +% % Inside each line the data points are separated by a separator like a % comma or a space or a colon. The separator can be configured using % the key /pgf/data/separator (leave the separator empty or set it to % \space for a space as separator). The default separator is a comma. -% +% % Some tables will miss the headline. In this case, using the % /pgf/data/headline key you can provide a headline yourself. % @@ -911,14 +912,14 @@ \let\pgf@dv@separator\space \fi \expandafter\def\expandafter\pgf@dv@till@separator% - \expandafter##\expandafter1\pgf@dv@separator{\pgf@dv@table@handle{##1}} + \expandafter##\expandafter1\pgf@dv@separator{\pgf@dv@table@handle{##1}} \expandafter\def\expandafter\pgf@dv@till@separator@head% - \expandafter##\expandafter1\pgf@dv@separator{\pgf@dv@head@handle{##1}} + \expandafter##\expandafter1\pgf@dv@separator{\pgf@dv@head@handle{##1}} \ifx\pgf@dv@headline\pgfutil@empty % Ok, read headline from file \pgfdv@firstlinetrue \else - % Headline already set + % Headline already set \pgfdv@firstlinefalse \expandafter\pgf@dv@parse@headline\expandafter{\pgf@dv@headline} \fi @@ -933,27 +934,27 @@ \c@pgf@counta=0\relax% keep track of attribute number \def\pgf@marshal{\pgf@dv@parse@table#1} \expandafter\expandafter\expandafter\pgf@marshal% - \expandafter\pgf@dv@separator\expandafter\pgfeol\pgf@dv@separator + \expandafter\pgf@dv@separator\expandafter\pgfeol\pgf@dv@separator \pgfdatapoint } \fi } -{} % ignore empty lines -{} % no special end code +{}% ignore empty lines +{}% no special end code \newif\ifpgfdv@firstline \pgfkeys{ /pgf/data/separator/.initial={,}, /pgf/data/headline/.initial= -} -\def\pgf@dv@spacetext{\space} +}% +\def\pgf@dv@spacetext{\space}% \def\pgf@dv@parse@table{% \pgfutil@ifnextchar"% Special, but ignored right now... {\pgferror{csv with quotes not yet implemented}} {\pgf@dv@till@separator} -} +}% \def\pgf@dv@table@handle#1{% \def\pgf@temp{#1}% \ifx\pgf@temp\pgfeoltext% @@ -969,8 +970,8 @@ \pgfkeyssetvalue{/data point/\pgf@dv@target}{#1} \let\pgf@next=\pgf@dv@parse@table% \fi% - \pgf@next% -} + \pgf@next% +}% @@ -978,14 +979,14 @@ \c@pgf@counta=0\relax% keep track of attribute number \def\pgf@marshal{\pgf@dv@doparse@headline#1} \expandafter\expandafter\expandafter\pgf@marshal% - \expandafter\pgf@dv@separator\expandafter\pgfeol\pgf@dv@separator -} + \expandafter\pgf@dv@separator\expandafter\pgfeol\pgf@dv@separator +}% \def\pgf@dv@doparse@headline{% \pgfutil@ifnextchar"% Special, but ignored right now... {\pgferror{csv with quotes not yet implemented}} {\pgf@dv@till@separator@head} -} +}% \def\pgf@dv@head@handle#1{% \def\pgf@temp{#1}% \ifx\pgf@temp\pgfeoltext% @@ -996,10 +997,10 @@ \pgfkeyssetvalue{/pgf/data/table/attribute \the\c@pgf@counta}{#1} \let\pgf@next=\pgf@dv@doparse@headline% \fi% - \pgf@next% -} + \pgf@next% +}% -\def\pgfeoltext{\pgfeol} +\def\pgfeoltext{\pgfeol}% % @@ -1012,16 +1013,16 @@ % math engine is used. In the future, something fancy build on luatex % might be used, so it would we should not rely directly on the % fpu library code. -% +% % The system works as follows: First, you "enter" a number into the % engine. When you do so, it is converted into some internal % representation that cannot be accessed any more and is called a % "math variable" henceforth. All commands of the % math system only work on math variables. -% +% % In order to "exit" a value stored in a math variable from the % engine, some other macros can be used. -% +% % Operations like addition or multiplication take two math variables % and store the result in another math variable. @@ -1031,95 +1032,95 @@ % % #1 = a math variable (a macro name) that is to store the value % #2 = an expression describing a number -% +% % % Description: -% +% % The #2 should be an expression that evaluates to a number. However, % due to the way the pgf math engine(s) work, currently, there are % several restrictions/the syntax is not as simple as one might % hope. Fortunately, the syntax is hopefully compatible with % easier-to-use future systems. -% +% % The syntax is as follows: #2 may be -% +% % 1. a simple high-precision number. This number is currently directly % passed to \pgfmathfloatparsenumber, so typical permissible values % are "100" or "10000000000000" or "nan" or "-5.673543345345e9000" -% +% % 2. a mathematical expression, which *must* be surrounded by -% parantheses. From a "mathematical" point of view these -% parantheses are superfluous, but the they are used to help pgf +% parentheses. From a "mathematical" point of view these +% parentheses are superfluous, but the they are used to help pgf % distinguish expressions from high-precision numbers. (If, in the % future, expressions may contain high precision numbers, the -% parantheses will simply be ignored.) -% +% parentheses will simply be ignored.) +% % The expression is evaluated using \pgfmathparse, which means that % TeX-precision is used. This means, for instance, that numbers % larger than about 16500 will create error messages. -% +% % The advantage is that you may say write things like "(5+6)" or % "(pi/2)". -% +% % 3. In case #2 starts with an exclamation mark (indicating an % "escape"), everything following the mark is simply evaluated by % TeX. The effect of evaluating #2 should be that the math % variable "\pgfdvmathvalue" is set to some value. This value will % then be transferred to #1. -% +% % 4. In case #2 is the result of calling \pgfdvmathexitbyserializing, the % "serialized" value is restored. The idea is that the serialized % will turn its internal representation of a number into something % that can be stored as a text somewhere. -% +% % Currently, "@" at the beginning of #2 is used to indicate that % what follows is a serialized version of a math variable. -% +% % In order to determine which of the above cases is to be used for a % variable, the first symbol #2 is checked, *after* the first symbol -% of #2 has been expanded once (using \expandafter once). +% of #2 has been expanded once (using \expandafter once). % % Example: % % \pgfdvmathenter{\mymacro}{20000000000000} % \pgfdvmathenter{\mymacro}{(5+pi)} % \pgfdvmathenter{\mymacro}{!\pgfdvmathadd{\pgfdvmathvalue}{\a}{\b}} -% +% % \pgfdvmathenter{\foo}{5} % \pgfdvmathexitbyserializing{\somevalue}{\foo} % \pgfdvmathenter{\mymacro}{\somevalue} \def\pgfdvmathenter#1#2{% \expandafter\pgfdvmathenter@check\expandafter#1#2\pgfdvmath@end% -} +}% \def\pgfdvmathenter@check#1{% \pgfutil@ifnextchar @{\pgfdvmath@internal#1}{% \pgfutil@ifnextchar ({\pgfdvmath@expression#1}{%) \pgfutil@ifnextchar !{\pgfdvmath@execute#1}{\pgfdvmath@normal#1}}}% -} +}% \def\pgfdvmath@internal#1@#2\pgfdvmath@end{% \def#1{#2}% -} +}% \def\pgfdvmath@expression#1(#2)#3\pgfdvmath@end{% \pgfmathparse{#2}% \pgfmathfloatparsenumber{\pgfmathresult}% \let#1=\pgfmathresult% -} +}% \def\pgfdvmath@execute#1!#2\pgfdvmath@end{% #2% \let#1=\pgfdvmathvalue% -} +}% \def\pgfdvmath@normal#1#2\pgfdvmath@end{% \pgfmathfloatparsenumber{#2}% \let#1=\pgfmathresult% -} +}% % Print a math variable in the math engine using \pgfmathprintnumber % -% #1 = math variable +% #1 = math variable % % Description: % @@ -1132,15 +1133,15 @@ \def\pgfdvmathexitbyprinting#1{% \pgfmathprintnumber{#1}% -} +}% % Exit a math variable as a number in a scientific and portable number -% format in a macro +% format in a macro % % #1 = macro in which to store the value -% #2 = math variable +% #2 = math variable % % Description: % @@ -1154,18 +1155,18 @@ \def\pgfdvmathexitbyscientificformat#1#2{% \edef#1{\pgfmathfloatvalueof#2}% -} +}% % Exit a math variable as a "serialized" (= string-based) -% version. +% version. % % #1 = macro in which to store the value -% #2 = math variable +% #2 = math variable % % Description: -% +% % The serialized version can be reentered using % \pgfmathenter and is similar to \pgfdvmathexitbyscientificformat, % but exiting and entering are (a bit) faster. @@ -1177,7 +1178,7 @@ \def\pgfdvmathexitbyserializing#1#2{% \edef#1{@#2}% -} +}% @@ -1203,19 +1204,19 @@ \def\pgfdvmathadd#1#2#3{% \pgfmathfloatadd{#2}{#3}% \let#1=\pgfmathresult% -} +}% \def\pgfdvmathsub#1#2#3{% \pgfmathfloatsubtract{#2}{#3}% \let#1=\pgfmathresult% -} +}% \def\pgfdvmathmul#1#2#3{% \pgfmathfloatmultiply{#2}{#3}% \let#1=\pgfmathresult% -} +}% \def\pgfdvmathdiv#1#2#3{% \pgfmathfloatdivide{#2}{#3}% \let#1=\pgfmathresult% -} +}% % Multiply by small number % @@ -1234,20 +1235,20 @@ % \pgfdvmathadd{\b}{\a}{0.2} % % \b now stores 400 -\def\pgfdvmathmulfixed#1#2#3{% +\def\pgfdvmathmulfixed#1#2#3{% \pgfmathfloatmultiplyfixed{#2}{#3}% \let#1=\pgfmathresult% -} +}% % Log, ln and exponent functions -% +% % #1 = a math variable % #2 = a math variable -% +% % Description -% +% % \pgfdvmathln will compute #1 = ln(#2) % \pgfdvmathlog will compute #1 = log_{10}(#2) % \pgfdvmathexp will compute #1 = exp(#2) @@ -1256,18 +1257,18 @@ \def\pgfdvmathln#1#2{% \pgfmathfloatln{#2}% \let#1=\pgfmathresult% -} +}% \def\pgfdvmathlog#1#2{% \pgfmathfloatln{#2}% \pgfmathfloatmultiply{\pgfmathresult}{\pgfdvmathalwaysloge}% \let#1=\pgfmathresult% -} +}% \def\pgfdvmathexp#1#2{% \pgfmathfloatexp{#2}% \let#1=\pgfmathresult% -} +}% \def\pgfdvmathpowten#1#2{% \pgfmathfloattofixed{#2}% @@ -1291,16 +1292,16 @@ \fi \fi \let#1=\pgfmathresult% -} +}% % Floor functions -% +% % #1 = a math variable % #2 = a math variable -% +% % Description -% +% % Sets #1 to the largest integer less or equal to #2 \def\pgfdvmathfloor#1#2{% @@ -1323,7 +1324,7 @@ \or\let#1=#2% \fi% }% -} +}% % Advanced unary operations @@ -1345,7 +1346,7 @@ \def\pgfdvmathunaryop#1#2#3{% \csname pgfmathfloat#2\endcsname{#3}% \let#1=\pgfmathresult% -} +}% % Advanced binary operations @@ -1369,7 +1370,7 @@ \def\pgfdvmathbinop#1#2#3#4{% \csname pgfmathfloat#2\endcsname{#3}{#4}% \let#1=\pgfmathresult% -} +}% @@ -1390,7 +1391,7 @@ \def\pgfdvmathifless#1#2#3#4{% \pgfmathfloatlessthan{#1}{#2}% \ifpgfmathfloatcomparison#3\else#4\fi% -} +}% @@ -1398,7 +1399,7 @@ % % % Standard objects for data visualization -% +% % @@ -1407,7 +1408,7 @@ % \pgfooclass{linear transformer} -{ +{% % Class linear transformer % % This class is a transformer class. It reacts to the transform @@ -1417,22 +1418,22 @@ % current value of this.origin. If the current value is 1, the % system is shifted to this.origin + this.unit vector. For other % values of /data point/this.attribuate, the shift is interpolated - % between these two values. + % between these two values. + - - \attribute attribute; + \attribute attribute;% % The attribute (/data point/this.attribute) by which % the unit vector is multiplied. If it is empty (which is % different from 0), no transformation is done at all. - \attribute origin = \pgfpointorigin; + \attribute origin = \pgfpointorigin;% % The shift in case the /data point/this.attribute is 0. - \attribute unit vector; + \attribute unit vector;% % The coordinate system is additionally shifted by this amount % times the current value of /data point/this.attribute. - + % Constructor % % #1 = attribute that is being transformed. Example: x @@ -1443,20 +1444,20 @@ \pgf@process{#2} \edef\pgf@temp{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}} \pgfoolet{unit vector}\pgf@temp% - } + }% % Method \method default connects() { \pgfoothis.get handle(\pgf@dv@me) \pgfkeysvalueof{/pgf/data visualization/obj}.connect(\pgf@dv@me,transform,transform datapoint signal) - } - + }% + % Setter \method set origin(#1) { \pgf@process{#1} \edef\pgf@temp{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}} \pgfoolet{origin}\pgf@temp% - } + }% % Slot % @@ -1479,9 +1480,8 @@ \fi% \fi% \fi% - } - -} + }% +}% % @@ -1489,7 +1489,7 @@ % \pgfooclass{interval mapper} -{ +{% % Class interval mapper % % This interval mapper reacts to the map datapoint signal. Its purpose is to @@ -1507,15 +1507,15 @@ % It is permissible to specify an additional non-linear % transformation function f. In this case, for an input value x the % position of f(x) inside the interval [f(a),f(b)] is determined and - % this position is linearly mapped to [c,d]. + % this position is linearly mapped to [c,d]. % % For example, if f(x) = log_10 (x) and the first range [a,b] = % [10,1000] and the second range is [1,2], then 10 is mapped to 1, % 100 is mapped to 1.5 (since f(100) = 3 lies in the middle % between f(10) = 2 and f(1000) = 4) and 100000 is mapped to 3. - - \attribute in; + + \attribute in;% % The name of the input attribute. If the value of this attribute % is empty or undefined, no mapping is done. % @@ -1523,30 +1523,30 @@ % has a value different from \relax, it will always be used instead % of the in attribute itself. This can be useful to temporarily % set a constant value to a key inside a mapping chain. - % + % % If the subkey /is min or max is set to "min" or "max", the mapping % will always be done to the respective out min or out max values. - \attribute out; + \attribute out;% % The name of the output attribute. - - \attribute trans; + + \attribute trans;% % Stores (more or less) the transformation function. - \attribute out min; + \attribute out min;% % Start of the second range (the value of c). - \attribute out min; + \attribute out min;% % End of the second range (the value of d). - \attribute trans in min; + \attribute trans in min;% % Transformed value of the start of the first range (the value % f(a)). - \attribute scale; + \attribute scale;% % The scaling factor, that is, the value of (f(b)-f(a))/(d-c). - + % Constructor % % #1 = input attribute. Example: velocity. @@ -1568,13 +1568,13 @@ #3% }% \fi% - } + }% % Method \method default connects() { \pgfoothis.get handle(\pgf@dv@me) \pgfkeysvalueof{/pgf/data visualization/obj}.connect(\pgf@dv@me,map,map datapoint signal) - } + }% % Method % @@ -1584,7 +1584,7 @@ % #4 = out interval maximum % % This method will (re)compute the correct mappings for the interval - % mapper. + % mapper. \method set interval values(#1,#2,#3,#4) { {% \pgfdvmathenter{\pgf@in@interval@min}{#1} @@ -1604,18 +1604,18 @@ \pgfoovalueof{trans} \let\pgf@in@interval@max@transformed=\pgfvalue \pgfdvmathsub{\pgf@diff@in@transformed}{\pgf@in@interval@max@transformed}{\pgf@in@interval@min@transformed} - % + % % Precompute the scaling - % + % \pgfdvmathdiv{\pgf@scale}{\pgf@out@diff}{\pgf@diff@in@transformed}% \pgfoolet{scale}{\pgf@scale}% }{% \pgfoolet{scale}\pgf@dv@no@scale% }% }% - } - \def\pgf@dv@no@scale{noscale} - + }% + \def\pgf@dv@no@scale{noscale}% + % Slot \method map() { \pgfooget{scale}\pgf@dv@scale @@ -1650,18 +1650,18 @@ \fi% \fi% \fi% - } + }% \def\pgf@dv@set@out@min{% \pgfkeyslet{/data point/\pgfoovalueof{out}/is min or max}\pgf@min@text% \pgfooget{out min}{\pgf@minmax@temp}% \pgf@dv@set@out@now% - } + }% \def\pgf@dv@set@out@max{% \pgfkeyslet{/data point/\pgfoovalueof{out}/is min or max}\pgf@max@text% \pgfooget{out max}{\pgf@minmax@temp}% \pgf@dv@set@out@now% - } + }% \def\pgf@dv@set@out@now{% \pgfkeysgetvalue{/data point/\pgfoovalueof{out}/offset}\pgf@dv@external@offset% \ifx\pgf@dv@external@offset\relax\else% @@ -1673,8 +1673,8 @@ \fi \fi \pgfkeyslet{/data point/\pgfoovalueof{out}}\pgf@minmax@temp% - } - + }% + \def\pgf@dv@mapper@trans{ \pgfooget{trans in min}{\pgf@dv@trans@in@min}% \pgfooget{scale}{\pgf@dv@scale}% @@ -1692,7 +1692,7 @@ \fi \pgfdvmathexitbyserializing{\pgf@temp}{\pgfvalue}% \pgfkeyslet{/data point/\pgfoovalueof{out}}\pgf@temp% - } + }% \def\pgf@dv@mapper@pos@check{% \pgfkeysgetvalue{/data point/\pgfoovalueof{in}/out pos}\pgf@dv@pos@value% @@ -1708,8 +1708,8 @@ \pgfdvmathexitbyserializing{\pgf@temp}{\pgf@out@val}% \pgfkeyslet{/data point/\pgfoovalueof{out}}\pgf@temp% \fi\fi% - } - + }% + \def\pgf@dv@mapper@goto@mid{% % Ok, compute transformed min position: \pgfooget{out min}{\pgf@out@interval@min} @@ -1719,8 +1719,8 @@ \pgfdvmathadd{\pgf@out@val}{\pgf@out@interval@min}{\pgf@out@interval@max}% \pgfdvmathexitbyserializing{\pgf@temp}{\pgf@out@val}% \pgfkeyslet{/data point/\pgfoovalueof{out}}\pgf@temp% - } -} + }% +}% @@ -1730,7 +1730,7 @@ \newif\ifpgf@dvignore \pgfooclass{scaling mapper} -{ +{% % Class scaling mapper % % A scaling mapper is (mainly) used to scale an attribute in such a way @@ -1747,16 +1747,16 @@ % and a interval mapper for then mapping the values to the scaled % values. Additionally, interval objects are needed. - \attribute in; + \attribute in;% % The to-be-scaled attribute; - \attribute out; + \attribute out;% % The attribute storing the scaled value. - \attribute in range obj; + \attribute in range obj;% % This interval keep track of the range of the in attribute - - \attribute scaling spec; + + \attribute scaling spec;% % A specification of how the scaling should be performed. % % The format is the following: @@ -1777,24 +1777,24 @@ % that deforms the linear mapping. In case f is specified, % f(#1) is mapped to #2 and f(#3) is mapped to #4. - \attribute spec maps min; + \attribute spec maps min;% % When the scaling spec maps "min" to some value, rather than some % specific value to that value, then spec maps min will be set to % \pgfutil@firstoftwo, otherwise to \pgfutil@secondoftwo - \attribute spec maps max; + \attribute spec maps max;% % Like spec maps min - \attribute function; + \attribute function;% % Stores the function - - \attribute interval mapper; + + \attribute interval mapper;% % Stores the interval mapper object - - \attribute range surveyor; + + \attribute range surveyor;% % Stores the range surveyor object - - + + % Constructor % % #1 = in attribute @@ -1825,54 +1825,54 @@ % % % The interval mapper: - % + % \pgfoonew{interval mapper}=new interval mapper(#1,#2,#4) \pgfoovalueof{interval mapper}.default connects() - } + }% % Method \method default connects() { \pgfoothis.get handle(\pgf@dv@me) \pgfkeysvalueof{/pgf/data visualization/obj}.connect(\pgf@dv@me,phase,phase signal) - } + }% % Getter % % Returns an interval object that stores the range of the in - % attribute. + % attribute. \method get in range interval() { \pgfooget{in range obj}\pgfdvinrangeinterval - } - - + }% + + % Getter % % Returns the out attribute. - % + % \method get out() { \pgfooget{out}\pgfdvout - } + }% % Getter % % Returns the function attribute. - % + % \method get function(#1) { \pgfooget{function}#1 - } + }% % Method % % #1 = a included in value - % + % % This method only affects the survey. The value #1 is recorded as % if it were encountered for the in attribute at some point. - % + % \method include in value(#1) { \pgfoovalueof{range surveyor}.include attribute value({#1}) - } + }% + - % Method % % #1 = value for the attribute @@ -1880,7 +1880,7 @@ % Sets the attribute to the (evaluated) given value (evaluation % using \pgfmathparse). When the value is evaluated, the values of % \pgfdvmin and \pgfdvmax will be set to the minimum and maximum - % values of the in interval. (See \pgfdvmathenter with the "!"-notation). + % values of the in interval. (See \pgfdvmathenter with the "!"-notation). % % In case #1 is set to the special value "min", it evaluates to % \pgfdvmin, when set to "max" it evaluates to \pgfdvmax. @@ -1902,14 +1902,14 @@ \fi% \pgfdvmathexitbyserializing{\pgf@dv@serial}{\pgf@dv@value}% \pgfkeyslet{/data point/\pgfoovalueof{in}}\pgf@dv@serial% - } + }% \def\pgf@dv@lib@set@mm{ \pgfooget{in range obj}\pgfdvinrangeinterval \pgfdvinrangeinterval.get min and max()% - } + }% - - % Slot + + % Slot \method phase(#1) { \ifx#1\pgfdvendsurvey % Ok, we setup the interval mapper. @@ -1925,9 +1925,9 @@ \pgf@lib@dv@min@at,\pgf@lib@dv@max@at) \fi \fi - } + }% + - % Internal helper \def\pgf@lib@dv@parse@scaling#1 at#2and #3 at#4\pgf@stop{% \def\pgf@lib@dv@min{#1}% @@ -1952,10 +1952,10 @@ \pgfdvmathexitbyserializing{\pgf@lib@dv@min@at}{\pgf@lib@dv@min@at@mv} \pgfdvmathexitbyserializing{\pgf@lib@dv@max}{\pgf@lib@dv@max@mv} \pgfdvmathexitbyserializing{\pgf@lib@dv@max@at}{\pgf@lib@dv@max@at@mv} - } - \def\pgf@min@text{min} - \def\pgf@max@text{max} -} + }% + \def\pgf@min@text{min}% + \def\pgf@max@text{max}% +}% @@ -1966,13 +1966,13 @@ % \pgfooclass{range surveyor} -{ +{% % Class range surveyor % % A range surveyor is used only in the survey phase. Its job is to % determine the minimum and maximum values of an attribute that are % "seen" during the survey phase. Based on this value, the size of, - % say, an axis can be detemined later on. + % say, an axis can be determined later on. % % You can also set the key "sub attributes" of the attribute. In % this case, this key should contain -- as the name suggests -- a @@ -1984,12 +1984,12 @@ % "/data point/velocity", then "/data point/velocity/sub attributes" % should be set to "\pgfdvsub{/min}\pgfdvsub{/max}". - \attribute attribute; + \attribute attribute;% % The to-be-surveyed attribute - \attribute interval obj; + \attribute interval obj;% % The interval object that protocols the minimum and maximum - % values. + % values. % Constructor @@ -2000,27 +2000,27 @@ \method range surveyor(#1,#2) { \pgfooset{attribute}{#1} \pgfoolet{interval obj}#2 - } + }% % Method \method default connects() { \pgfoothis.get handle(\pgf@dv@me) \pgfkeysvalueof{/pgf/data visualization/obj}.connect(\pgf@dv@me,survey,survey datapoint signal) - } + }% % Method % % #1 = a value - % + % % Adjust the interval as if during the survey this value were - % encountered + % encountered \method include attribute value(#1) { \pgf@dv@assign@val@stripped#1\pgf@stop% \pgfoovalueof{interval obj}.adjust(\pgf@dv@range@surv) - } + }% \def\pgf@dv@assign@val@stripped#1\pgf@stop{% \def\pgf@dv@val{#1} - } + }% % Slot % @@ -2032,7 +2032,7 @@ \let\pgfdvsub\pgf@dv@range@surv@sub \pgfdvsub{}% \pgfkeysvalueof{/data point/\pgfoovalueof{attribute}/sub attributes} - } + }% \def\pgf@dv@range@surv@sub#1{ \pgfkeysgetvalue{/data point/\pgfoovalueof{attribute}#1}\pgf@dv@val% @@ -2044,7 +2044,7 @@ \pgfoovalueof{interval obj}.adjust(\pgf@dv@range@surv)% \fi% \fi% - } + }% \def\pgf@dv@range@surv{% \pgfdvmathenter{\pgf@dv@value}{\pgf@dv@val}% @@ -2059,8 +2059,8 @@ \else% \pgfdvmathifless{\pgfdvmax}{\pgf@dv@value}{\let\pgfdvmax\pgf@dv@value}{}% \fi% - } -} + }% +}% @@ -2068,19 +2068,19 @@ % Visualizers % -\usepgflibrary{plothandlers} +\usepgflibrary{plothandlers}% \pgfooclass{plot handler visualizer} -{ +{% % Class plot handler visualizer % % This visualizer uses one or more plot handlers to visualize data points. - % As the data points are processed, the canvas positions of the data + % As the data points are processed, the canvas positions of the data % points are recorded. At the end of a group of data points, the % recorded stream of canvas position is visualized (rendered) - % using plot handlers. For instance, when the lineto plot handler + % using plot handlers. For instance, when the lineto plot handler % is used, the data points are connected by straight lines, when the % curveto plot handler is used, they are connected by smooth curves % and so on. @@ -2092,7 +2092,7 @@ % You can specify a "filter", which will cause only those data % points to be visualized by the visualizer that pass the test. The % filter should set \pgfdvfilterpassedfalse for to-be-filtered data - % point. + % point. % % You can specify "projection code" that changes the canvas x and % canvas y positions. This projection code allows you to draw, say, @@ -2103,35 +2103,35 @@ % the visualizer, should store code that is to be executed directly % before and after the stream of coordinates is created. Typically, % these keys will store commands to use the path created by the plot - % handler. + % handler. - \attribute handlers; + \attribute handlers;% % The to-be-used handlers - - \attribute name; + + \attribute name;% % The attribute - - \attribute filter=\pgfdvnamedvisualizerfilter; + + \attribute filter=\pgfdvnamedvisualizerfilter;% % Filter code - - \attribute positions; + + \attribute positions;% % An internal protocol of the positions on the stream - - \attribute cache; + + \attribute cache;% % An internal cache. Positions are first inserted into this % cache. Every 100 steps this cache is moved to positions. The idea % behind this is that it will avoid the quadratic time increase that % is normally caused when a protocol is build in TeX. - - \attribute projection code; + + \attribute projection code;% % This code is empty by default. However, you can set it for % instance to the following - % + % % \pgfkeyssetvalue{/data point/y=0}\pgfdvmapdatapointtocanvas - % + % % in order to visualize the data point with its y-coordinate % replaced by 0. - + % Constructor % % #1 = A name @@ -2141,24 +2141,24 @@ \method plot handler visualizer(#1,#2) { \pgfooset{name}{#1} \pgfooset{handlers}{#2} - } - + }% + % Method \method default connects() { \pgfoothis.get handle(\pgf@dv@me) \pgfkeysvalueof{/pgf/data visualization/obj}.connect(\pgf@dv@me,protocol,visualize datapoint signal) \pgfkeysvalueof{/pgf/data visualization/obj}.connect(\pgf@dv@me,phase,phase signal) - } + }% % Setter \method set filter(#1) { \pgfooset{filter}{#1} - } + }% % Setter \method set projection code(#1) { \pgfooset{projection code}{#1} - } + }% % Slot \method protocol() { @@ -2167,7 +2167,7 @@ \ifpgfdvfilterpassed% \pgf@dv@line@cache@it \fi% - } + }% \def\pgf@dv@line@cache@it{ % Cache it @@ -2199,14 +2199,14 @@ \let\pgf@dv@cache\pgfutil@empty \fi \pgfoolet{cache}\pgf@dv@cache - } - + }% + % Slot \method phase(#1) {% \ifx#1\pgfdvendvisualization% \pgfoothis.render()% \fi% - } + }% % Internal method \method render() { @@ -2227,19 +2227,19 @@ \endpgfscope \pgfoolet{positions}\pgfutil@empty \pgfoolet{cache}\pgfutil@empty - } + }% - \def\pgf@dv@ph#1#2{\ifpgfdvnewstream\pgfplotstreamstart\pgfdvnewstreamfalse\fi\pgfplotstreampoint{\pgfqpoint{#1}{#2}}} - \def\pgf@dv@outliner{\ifpgfdvnewstream\else\pgfplotstreamend\pgfdvnewstreamtrue\fi} -} + \def\pgf@dv@ph#1#2{\ifpgfdvnewstream\pgfplotstreamstart\pgfdvnewstreamfalse\fi\pgfplotstreampoint{\pgfqpoint{#1}{#2}}}% + \def\pgf@dv@outliner{\ifpgfdvnewstream\else\pgfplotstreamend\pgfdvnewstreamtrue\fi}% +}% \newif\ifpgfdvnewstream \newcount\pgf@lib@dv@cache@count \pgfkeys{% /data point/outlier/.initial=, - /data point/outlier/.default=true -} + /data point/outlier/.default=true, +}% % A possible filter for unnamed visualizers @@ -2250,10 +2250,10 @@ % % In a data visualization with multiple visualizers, data points % typically "belong" only to a single visualizer. It is, thus, -% necessary to filter data points accoring to the current +% necessary to filter data points according to the current % visualizer. This current visualizer is assumed to be stored in /data % point/visualizer. -% +% % When objects allow you to set a filter, you can use this filter to % test against /data point/set being equal to #1. @@ -2264,14 +2264,14 @@ \else \pgfdvfilterpassedfalse \fi% -} +}% % A filter for named visualizer -% +% % Description: -% +% % This filter works like \pgfdvvisualizerfilter, only it assumes the % the object defines a "name" attribute. In this case, the value of % /data point/set is tested against this attribute. @@ -2283,12 +2283,12 @@ \else \pgfdvfilterpassedfalse \fi% -} +}% \pgfooclass{rectangle visualizer} -{ +{% % Class rectangle visualizer % % This visualizer visualizes a datapoint as a rectangle. It needs @@ -2296,33 +2296,33 @@ % point/<name>/attribute 2 store two attributes names a1 to a2. Then, % provided the current value of /data point/set equals name, for % each data point a rectangle between (a1/min,a2/min) and - % (a1/max,a2/max) is created. - + % (a1/max,a2/max) is created. + - \attribute name; + \attribute name;% % The name - - \attribute a1; - \attribute a2; + + \attribute a1;% + \attribute a2;% % The attributes, filled from /data point/<name>/attribute 1 and 2 - + % Constructor % - % #1 = first attribute - % #2 = second attribute + % #1 = first attribute + % #2 = second attribute % \method rectangle visualizer(#1) { \pgfooset{name}{#1} - } + }% % Method \method default connects() { \pgfoothis.get handle(\pgf@dv@me) \pgfkeysvalueof{/pgf/data visualization/obj}.connect(\pgf@dv@me,visualize,visualize datapoint signal) \pgfkeysvalueof{/pgf/data visualization/obj}.connect(\pgf@dv@me,phase,phase signal) - } - + }% + % Slot \method phase(#1) {% \ifx#1\pgfdvbeginsurvey% @@ -2331,8 +2331,8 @@ \pgfkeyssetvalue{\pgfoovalueof{a1}/sub attributes}{\pgfdvsub{/min}\pgfdvsub{/max}} \pgfkeyssetvalue{\pgfoovalueof{a2}/sub attributes}{\pgfdvsub{/min}\pgfdvsub{/max}} \fi% - } - + }% + % Slot \method visualize() { { @@ -2342,7 +2342,7 @@ \pgf@dv@rect@do \fi } - } + }% \def\pgf@dv@rect@do{ \pgfkeysgetvalue{\pgfoovalueof{a1}/min}\pgf@dv@amin @@ -2371,8 +2371,8 @@ \fi\fi \fi\fi \fi\fi - } -} + }% +}% \newcount\pgf@lib@dv@cache@count @@ -2383,12 +2383,12 @@ % \pgfooclass{label visualizer} -{ +{% % Class label visualizer % % The job of this class is to visualize a label of a curve or some % other object. - % + % % The idea is as follows: This class monitors a certain % attribute. When this attribute reaches a certain value for the % first time, the following happens: A normalized vector of the line @@ -2397,29 +2397,29 @@ % coordinate system is shifted so that the current data point is at % the origin. Then, some drawing code is executed. - \attribute attribute; + \attribute attribute;% % The monitored attribute - \attribute filter; + \attribute filter;% % Filter code, see plot handler visualizer doc. - - \attribute threshold; + + \attribute threshold;% % When the attribute exceeds this threshold, the drawing code is % executed - \attribute before canvas position=; + \attribute before canvas position=;% % Stores canvas position of the data point before the interesting one - - \attribute canvas position=; + + \attribute canvas position=;% % Stores canvas position of the data point - \attribute code; + \attribute code;% % To-be-executed code when the label should be drawn - - + + % Constructor % - % #1 = attribute + % #1 = attribute % #2 = a macro, storing the threshold % #3 = code % #4 = filter code @@ -2430,14 +2430,14 @@ \pgfoolet{threshold}\pgf@temp \pgfooset{code}{#3} \pgfooset{filter}{#4} - } + }% % Method \method default connects() { \pgfoothis.get handle(\pgf@dv@me) \pgfkeysvalueof{/pgf/data visualization/obj}.connect(\pgf@dv@me,test,visualize datapoint signal) \pgfkeysvalueof{/pgf/data visualization/obj}.connect(\pgf@dv@me,phase,phase signal) - } + }% % Slot \method test() { @@ -2451,7 +2451,7 @@ \pgf@dv@label@vis@record \fi% \fi% - } + }% \def\pgf@dv@label@vis@record{ % Record current position @@ -2479,8 +2479,8 @@ }% \fi\fi% \fi% - } - + }% + % Slot \method phase(#1) {% \ifx#1\pgfdvendvisualization% @@ -2490,9 +2490,8 @@ \pgfoovalueof{code} \endscope \fi% - } - -} + }% +}% @@ -2500,12 +2499,12 @@ % Style sheets % \pgfooclass{style attribute} -{ +{% % Class style attribute - % + % % Instances of this class are used to select a style based on the % current value of an attribute. - % + % % Instances of this class monitor an attribute. Whenever the "style" % signal is raised, the object investigates the current value of the % attribute. It then looks up /pgf/data visualization/style @@ -2514,27 +2513,27 @@ % /pgf/data visualization/style sheets/<name of style sheet>/default % style is executed with the value as a parameter. - \attribute attribute; + \attribute attribute;% % The name of the attribute - \attribute style sheet name; + \attribute style sheet name;% % The styling function % Constructor % % #1 = attribute (including, if present, /data point/) - % #2 = style sheet name + % #2 = style sheet name % \method style attribute(#1,#2) { \pgfooset{attribute}{#1} \pgfooset{style sheet name}{#2} - } + }% % Method \method default connects() { \pgfoothis.get handle(\pgf@dv@me) \pgfkeysvalueof{/pgf/data visualization/obj}.connect(\pgf@dv@me,invoke style,style signal) - } + }% % Slots \method invoke style() { @@ -2550,22 +2549,22 @@ \pgfkeysalso{\pgf@temp/default style/.expand once=\pgf@dv@temp@val} } \fi\fi% - } -} + }% +}% % Declares a new style sheet -% -% #1 = name of style sheet +% +% #1 = name of style sheet % #2 = settings -% +% % Description: -% +% % This is a shortcut for doing a /.cd to /pgf/data visualization/style sheets/#1 \def\pgfdvdeclarestylesheet#1#2{ \pgfkeys{/pgf/data visualization/style sheets/#1/.cd,#2} -} +}% @@ -2580,22 +2579,22 @@ % \pgfooclass{legend} -{ +{% % Class legend - % + % % This class is used to collect entries into a legend. The idea is % that, say, for each line of a picture you would like to have an % entry in a legend. Then you prepare these entries and send % them to a legend container object. It will collect the entries - % and, at the end, arrange them in rows and columns by + % and, at the end, arrange them in rows and columns by % separating them using \pgfdvnextcell and \pgfdvendrow. % % By surrounding the resulting arrangement by a call to \pgfmatrix or % a call to \halign you can then create a legend. - % + % % To specify how the entries should be arranged, a size % specification and two directions are needed. - % + % % For the size specification you specify either the ideal number of % columns and the maximum number of rows or you specify the ideal % number of rows and the maximum number of columns. In the first @@ -2610,10 +2609,10 @@ % columns that the ideal number -- to ensure that no column contains % more than the desired number. The case is symmetric, but with the % roles of columns and rows exchanged. - % + % % Here is an example: You specify that you want 2 columns, ideally, % each having a maximum of 4 entries. Here is what you would get: - % + % % Number of entries & Number of resulting columns ... & ... and rows % 1 & 1 & 1 % 2 & 2 & 1 @@ -2629,7 +2628,7 @@ % 12 & 3 & 4 % 13 & 4 & 4 % - % + % % Once the number of columns and rows has been computed, the next % step is to "fill" the table. For this, eight strategies may be % specified: right then down, right then up, left then down, left @@ -2639,14 +2638,14 @@ % arrangement. However, once the maximum number of elements in a row % has been reached, the a new row should be started that is placed % above ("up") then just-assembled row. - % - % - % + % + % + % % % Example: - % + % % You create an object \legend and then call - % + % % \pgfoofnew \legend=new legend(columns,2,3,down then right) % \legend.add entry(first) % \legend.add entry(second) @@ -2655,37 +2654,37 @@ % \legend.add entry(fifth) % \legend.add entry(sixth) % \legend.add entry(seventh) - % \legend.get arrangment(\arrangement) - % + % \legend.get arrangement(\arrangement) + % % Then \arrangment will expand to - % + % % first \pgfdvnextcell fourth \pgfdvnextcell seventh \pgfdvendrow % second \pgfdvnextcell fifth \pgfdvnextcell third \pgfdvendrow % third \pgfdvendrow sixth \pgfdvnextcell \pgfdvendrow - % + % % By saying \let\pgfdvendrow=\\ and \let\pgfdvnextcell=&, you % can use \arrangment inside a table. - - - \attribute entries; - % Collectes the entries - \attribute columns or rows; + + \attribute entries;% + % Collects the entries + + \attribute columns or rows;% % Specifies whether columns or rows are specified - \attribute ideal; + \attribute ideal;% % The ideal number of columns/rows - \attribute max; + \attribute max;% % The maximum number of entries per column/row - \attribute strategy; + \attribute strategy;% % Specifies how the matrix should be filled - - \attribute number of entries=0; + + \attribute number of entries=0;% % Counts the number of entries that have been stored - - + + % Constructor % % #1 = "columns" or "rows" -> specifies whether the ideal number and @@ -2699,11 +2698,11 @@ \pgfooset{ideal}{#2} \pgfooset{max}{#3} \pgfooset{strategy}{#4} - } + }% % Method \method default connects() { - } + }% % Method \method add entry(#1) { @@ -2711,19 +2710,19 @@ \c@pgf@counta=\pgfoovalueof{number of entries}\relax% \advance\c@pgf@counta by1\relax% \pgfooeset{number of entries}{\the\c@pgf@counta} - } + }% % Method \method get arrangement(#1) { { - % + % % Step 1: Compute the desired number of rows or columns - % - % + % + % % Compute the ideal number of entries per row/column (called % "target" in the following) and entries per colum/row (called % "per target" in the following) - % + % % if (number of entries > ideal) \ifnum\pgfoovalueof{number of entries}>\pgfoovalueof{ideal}\relax% % { @@ -2762,9 +2761,9 @@ \c@pgf@counta=\pgfoovalueof{number of entries}\relax% \c@pgf@countb=1\relax% \fi% - % - % Ensure that counta = rows, countb = columns - % + % + % Ensure that counta = rows, countb = columns + % \pgfooget{columns or rows}\pgf@temp \ifx\pgf@temp\pgf@dv@columnstext% \c@pgf@countc=\c@pgf@counta\relax @@ -2772,14 +2771,14 @@ \c@pgf@countb=\c@pgf@countc\relax \fi %\edef\temp{rows: \the\c@pgf@counta, columns: \the\c@pgf@countb}\temp - % - % Now arrange the matrix - % + % + % Now arrange the matrix + % \csname pgf@dv@legend@init@\pgfoovalueof{strategy}\endcsname \expandafter\let\expandafter\pgf@dv@updater\csname pgf@dv@legend@update@\pgfoovalueof{strategy}\endcsname \pgfooget{entries}\pgf@temp \expandafter\pgf@dv@legend@arrange\pgf@temp\pgf@stop - % + % % Now assemble the matrix % \edef\pgf@dv@row@list{1,...,\the\c@pgf@counta} @@ -2807,24 +2806,24 @@ } \let#1\pgf@dv@matrix \global\let\pgf@dv@matrix\relax - } - - \def\pgf@dv@first@mark{\pgf@dv@first@mark} - + }% + + \def\pgf@dv@first@mark{\pgf@dv@first@mark}% + \def\pgf@dv@legend@arrange{% \pgfutil@ifnextchar\pgf@stop{\pgfutil@gobble}{\pgf@dv@legend@handle@entry} - } + }% \def\pgf@dv@legend@handle@entry#1{ \expandafter\def\csname pgf@dv@legend@entry@\the\c@pgf@countc @\the\c@pgf@countd\endcsname{#1}% \pgf@dv@updater% \pgf@dv@legend@arrange% - } + }% \expandafter\def\csname pgf@dv@legend@init@down then right\endcsname{% \c@pgf@countc=1\relax% \c@pgf@countd=1\relax% - } + }% \expandafter\def\csname pgf@dv@legend@update@down then right\endcsname{% \advance\c@pgf@countc by1\relax @@ -2832,25 +2831,25 @@ \c@pgf@countc=1\relax% \advance\c@pgf@countd by1\relax% \fi% - } + }% \expandafter\def\csname pgf@dv@legend@init@right then down\endcsname{% \c@pgf@countc=1\relax% \c@pgf@countd=1\relax% - } - + }% + \expandafter\def\csname pgf@dv@legend@update@right then down\endcsname{% \advance\c@pgf@countd by1\relax \ifnum\c@pgf@countd>\c@pgf@countb\relax% \c@pgf@countd=1\relax% \advance\c@pgf@countc by1\relax% \fi% - } + }% \expandafter\def\csname pgf@dv@legend@init@up then right\endcsname{% \c@pgf@countc=\c@pgf@counta\relax% \c@pgf@countd=1\relax% - } + }% \expandafter\def\csname pgf@dv@legend@update@up then right\endcsname{% \advance\c@pgf@countc by-1\relax @@ -2858,12 +2857,12 @@ \c@pgf@countc=\c@pgf@counta\relax% \advance\c@pgf@countd by1\relax% \fi% - } - + }% + \expandafter\def\csname pgf@dv@legend@init@right then up\endcsname{% \c@pgf@countc=\c@pgf@counta\relax% \c@pgf@countd=1\relax% - } + }% \expandafter\def\csname pgf@dv@legend@update@right then up\endcsname{% \advance\c@pgf@countd by1\relax @@ -2871,12 +2870,12 @@ \c@pgf@countd=1\relax% \advance\c@pgf@countc by-1\relax% \fi% - } - + }% + \expandafter\def\csname pgf@dv@legend@init@left then up\endcsname{% \c@pgf@countc=\c@pgf@counta\relax% \c@pgf@countd=\c@pgf@countb\relax% - } + }% \expandafter\def\csname pgf@dv@legend@update@left then up\endcsname{% \advance\c@pgf@countd by-1\relax @@ -2884,12 +2883,12 @@ \c@pgf@countd=\c@pgf@countb\relax% \advance\c@pgf@countc by-1\relax% \fi% - } - + }% + \expandafter\def\csname pgf@dv@legend@init@up then left\endcsname{% \c@pgf@countc=\c@pgf@counta\relax% \c@pgf@countd=\c@pgf@countb\relax% - } + }% \expandafter\def\csname pgf@dv@legend@update@up then left\endcsname{% \advance\c@pgf@countc by-1\relax @@ -2897,12 +2896,12 @@ \c@pgf@countc=\c@pgf@counta\relax% \advance\c@pgf@countd by-1\relax% \fi% - } - + }% + \expandafter\def\csname pgf@dv@legend@init@left then down\endcsname{% \c@pgf@countc=1\relax% \c@pgf@countd=\c@pgf@countb\relax% - } + }% \expandafter\def\csname pgf@dv@legend@update@left then down\endcsname{% \advance\c@pgf@countd by-1\relax @@ -2910,12 +2909,12 @@ \c@pgf@countd=\c@pgf@countb\relax% \advance\c@pgf@countc by1\relax% \fi% - } - + }% + \expandafter\def\csname pgf@dv@legend@init@down then left\endcsname{% \c@pgf@countc=1\relax% \c@pgf@countd=\c@pgf@countb\relax% - } + }% \expandafter\def\csname pgf@dv@legend@update@down then left\endcsname{% \advance\c@pgf@countc by1\relax @@ -2923,10 +2922,10 @@ \c@pgf@countc=1\relax% \advance\c@pgf@countd by-1\relax% \fi% - } - - \def\pgf@dv@columnstext{columns} -} + }% + + \def\pgf@dv@columnstext{columns}% +}% @@ -2935,17 +2934,17 @@ % \pgfooclass{interval} -{ +{% % Class interval % % Instances of this class store intervals. When either the min or % the max value is empty, this corresponds to "not yet set", (not to - % "infinity). + % "infinity). - \attribute min; + \attribute min;% % The minimum value of the interval - - \attribute max; + + \attribute max;% % The maximum value of the interval % Constructor @@ -2956,25 +2955,25 @@ \method interval(#1,#2) { \pgfooset{min}{#1} \pgfooset{max}{#2} - } + }% % Method \method default connects() { - } + }% % Sets the minimum/maximum to a new value \method set min(#1) { \pgfooset{min}{#1} - } + }% \method set max(#1) { \pgfooset{max}{#1} - } + }% \method let min(#1) { \pgfoolet{min}{#1} - } + }% \method let max(#1) { \pgfoolet{max}{#1} - } + }% % Getter % @@ -2983,9 +2982,9 @@ \method get min and max() { \pgfooget{min}\pgfdvmin \pgfooget{max}\pgfdvmax - } + }% - % Adjusts the mimum and maximum values + % Adjusts the minimum and maximum values % % #1 = some code. When this code is executed, the values of % \pgfdvmin and \pgfdvmax will be set to the current values of @@ -3002,13 +3001,13 @@ \pgfoolet{min}\pgfdvmin \pgfoolet{max}\pgfdvmax }% - } -} + }% +}% \pgfooclass{count} -{ +{% % Class count % % This class can be used to count the number of data points that are @@ -3018,70 +3017,70 @@ % the counter. You can specify that certain data points should % not have an effect on the counter. - - \attribute attribute; + + \attribute attribute;% % The attribute that will be set to the current value of the counter - - \attribute val=0; + + \attribute val=0;% % The current value of the counter - - \attribute max=0; + + \attribute max=0;% % The current value of the counter - - \attribute step=1; + + \attribute step=1;% % The stepping by which the counter is incremented for each % datapoint - - \attribute start val=0; + + \attribute start val=0;% % The start value of the counter - \attribute filter=; + \attribute filter=;% % This attribute stores some code that is executed for each % data point. If the data point sets the TeX-if ifpgfdvfilterpassed to % true, then the counter is not incremented. - + % Constructor % % #1 = The attribute in which the counter value is stored % \method count(#1) { \pgfooset{attribute}{#1} - } + }% % Method \method default connects() { \pgfoothis.get handle(\pgf@dv@me) \pgfkeysvalueof{/pgf/data visualization/obj}.connect(\pgf@dv@me,apply,prepare datapoint signal) \pgfkeysvalueof{/pgf/data visualization/obj}.connect(\pgf@dv@me,phase,phase signal) - } + }% % Getter \method get max(#1) { \pgfooget{max}{#1} - } + }% % Setter \method set value(#1) { \pgfooset{val}{#1} \pgfkeyssetvalue{/data point/\pgfoovalueof{attribute}}{#1}% - } + }% % Setter \method set start value(#1) { \pgfooset{start val}{#1} \pgfooset{max}{#1} - } + }% % Setter \method set filter(#1) { \pgfooset{filter}{#1} - } + }% % Setter \method set step(#1) { \pgfooset{step}{#1} - } + }% % Slot \method apply() { @@ -3097,17 +3096,17 @@ \pgfooget{max}\pgfmathresult% \pgfkeyslet{/data point/\pgfoovalueof{attribute}/max}\pgfmathresult% \fi% - } + }% - % Slot + % Slot \method phase(#1) { \ifx#1\pgfdvbeginsurvey \pgfooeset{val}{\pgfoovalueof{start val}} \else \ifx#1\pgfdvbeginvisualization \pgfooeset{val}{\pgfoovalueof{start val}} \fi\fi - } -} + }% +}% \newif\ifpgfdvfilterpassed @@ -3115,7 +3114,7 @@ \pgfooclass{accumulator} -{ +{% % Class accumulator % % This class is used to keep track of the sum of the values of some @@ -3124,12 +3123,12 @@ % all previous data points with respect to this % attribute. Furthermore, the subkey attribute/prev key will hold % the previous sum, which is sometimes also useful to have access - % to. + % to. - \attribute attribute; + \attribute attribute;% % The attribute to-be-accumulated - - \attribute sum; + + \attribute sum;% % The initial value of the sum % Constructor @@ -3138,19 +3137,19 @@ \method accumulator(#1) { \pgfooset{attribute}{#1} \pgfoothis.reset() - } + }% % Method \method default connects() { \pgfoothis.get handle(\pgf@dv@me) \pgfkeysvalueof{/pgf/data visualization/obj}.connect(\pgf@dv@me,apply,prepare datapoint signal) \pgfkeysvalueof{/pgf/data visualization/obj}.connect(\pgf@dv@me,phase,phase signal) - } + }% % Slot \method apply() {% % Save old sum - \pgfkeysgetvalue{/data point/\pgfoovalueof{attribute}/sum}\pgf@temp% + \pgfkeysgetvalue{/data point/\pgfoovalueof{attribute}/sum}\pgf@temp% \pgfkeyslet{/data point/\pgfoovalueof{attribute}/prev sum}\pgf@temp% % Add new attribute... \pgfkeysgetvalue{/data point/\pgfoovalueof{attribute}}{\pgf@temp@b}% @@ -3162,7 +3161,7 @@ % Record in attribute \pgfdvmathexitbyscientificformat{\pgf@dv@serial@sum}{\pgf@dv@sum} \pgfkeyslet{/data point/\pgfoovalueof{attribute}/sum}\pgf@dv@serial@sum - } + }% % Method % @@ -3174,7 +3173,7 @@ \pgfdvmathexitbyserializing{\pgf@dv@zero}{\pgf@dv@temp} \pgfkeyslet{/data point/\pgfoovalueof{attribute}/prev sum}{\pgf@dv@zero} \pgfkeyslet{/data point/\pgfoovalueof{attribute}/sum}{\pgf@dv@zero} - } + }% % Slot \method phase(#1) { @@ -3183,8 +3182,8 @@ \else \ifx#1\pgfdvbeginvisualization \pgfoothis.reset() \fi\fi - } -} + }% +}% @@ -3204,19 +3203,13 @@ /data point/always 0/.initial=0, /data point/always 1/.initial=1, /data point/always empty/.initial=, - /data point/always pgfusepath stroke/.initial=\pgfusepath{stroke} -} + /data point/always pgfusepath stroke/.initial=\pgfusepath{stroke}, +}% -\pgfdvmathenter{\pgfdvmathalwaysloge}{0.434294481903252} -\pgfdvmathenter{\pgfdvmathalwayslnten}{2.302585092994046} -\pgfdvmathenter{\pgfdvmathalwayszero}{0} -\pgfdvmathenter{\pgfdvmathalwaysone}{1} +\pgfdvmathenter{\pgfdvmathalwaysloge}{0.434294481903252}% +\pgfdvmathenter{\pgfdvmathalwayslnten}{2.302585092994046}% +\pgfdvmathenter{\pgfdvmathalwayszero}{0}% +\pgfdvmathenter{\pgfdvmathalwaysone}{1}% \endinput - - - - - - diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledecorations.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledecorations.code.tex index 500e0c7bad1..8c939d5cb41 100644 --- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledecorations.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledecorations.code.tex @@ -19,8 +19,8 @@ % These should be moved. % -\def\pgfgetpath#1{\pgfsyssoftpath@getcurrentpath{#1}} -\def\pgfsetpath#1{\pgfsyssoftpath@setcurrentpath{#1}} +\def\pgfgetpath#1{\pgfsyssoftpath@getcurrentpath{#1}}% +\def\pgfsetpath#1{\pgfsyssoftpath@setcurrentpath{#1}}% % Required registers. @@ -40,10 +40,10 @@ \newdimen\pgfdecorationsegmentlength \pgfdecorationsegmentamplitude2.5pt \pgfdecorationsegmentlength10pt -\def\pgfdecorationsegmentangle{45} -\def\pgfdecorationsegmentaspect{0.5} -\def\pgfmetadecorationsegmentamplitude{2.5pt} -\def\pgfmetadecorationsegmentlength{1cm} +\def\pgfdecorationsegmentangle{45}% +\def\pgfdecorationsegmentaspect{0.5}% +\def\pgfmetadecorationsegmentamplitude{2.5pt}% +\def\pgfmetadecorationsegmentlength{1cm}% \pgfkeys{% /pgf/decoration/.code={\pgfkeys{/pgf/decoration/.cd,#1}}, @@ -58,8 +58,8 @@ end radius/.initial=2.5pt, radius/.style={start radius=#1,end radius=#1}, path has corners/.is if=pgfdecoratepathhascorners, - reverse path/.is if=pgf@decorate@inputsegmentobjects@reverse -} + reverse path/.is if=pgf@decorate@inputsegmentobjects@reverse, +}% \newif\ifpgfdecoratepathhascorners \newif\ifpgf@decorate@inputsegmentobjects@reverse @@ -105,14 +105,14 @@ #3% \let\state\pgf@orig@state% }% -} +}% -\def\pgf@decorate@state#1{\pgfutil@ifnextchar[{\pgf@decorate@@start#1}{\pgf@decorate@@start#1[]}}%} +\def\pgf@decorate@state#1{\pgfutil@ifnextchar[{\pgf@decorate@@start#1}{\pgf@decorate@@start#1[]}}%}% \def\pgf@decorate@@start#1[#2]#3{% \pgfutil@namedef{pgf@decorate@@\pgf@decorate@name @#1@options}{#2}% \pgfutil@namedef{pgf@decorate@@\pgf@decorate@name @#1@code}{#3}% -} -\long\def\pgf@mod@dec@firstofone#1{#1} +}% +\long\def\pgf@mod@dec@firstofone#1{#1}% % Test whether something is a decoration @@ -125,7 +125,7 @@ % % \pgfifdecoration{zigzag}{Exists}{Does not exist} -\def\pgfifdecoration#1#2#3{\pgfutil@ifundefined{pgf@decorate@@#1@initial}{#3}{#2}} +\def\pgfifdecoration#1#2#3{\pgfutil@ifundefined{pgf@decorate@@#1@initial}{#3}{#2}}% @@ -153,13 +153,13 @@ #3% \let\state\pgf@orig@state% }% -} +}% -\def\pgf@metadecoration@state#1{\pgfutil@ifnextchar[{\pgf@metadecoration@@state#1}{\pgf@metadecoration@@state#1[]}}%} +\def\pgf@metadecoration@state#1{\pgfutil@ifnextchar[{\pgf@metadecoration@@state#1}{\pgf@metadecoration@@state#1[]}}%}% \def\pgf@metadecoration@@state#1[#2]#3{% \pgfutil@namedef{pgf@metadecoration@@\pgf@metadecoration@name @#1@options}{#2}% \pgfutil@namedef{pgf@metadecoration@@\pgf@metadecoration@name @#1@code}{#3}% -} +}% % Test whether something is a meta-decoration @@ -172,7 +172,7 @@ % % \pgfifmetadecoration{zigzag}{Exists}{Does not exist} -\def\pgfifmetadecoration#1#2#3{\pgfutil@ifundefined{pgf@metadecoration@@#1@initial}{#3}{#2}} +\def\pgfifmetadecoration#1#2#3{\pgfutil@ifundefined{pgf@metadecoration@@#1@initial}{#3}{#2}}% @@ -185,9 +185,9 @@ % % Decorate a path. % -% \pgfdecoratebeforecode and \pgfdecorateaftercode can be used to +% \pgfdecoratebeforecode and \pgfdecorateaftercode can be used to % execute code before and after the decoration. -% +% % #1 - the name of the decoration. % #2 - a (non-empty) path specification. % @@ -211,8 +211,8 @@ % \pgfusepath{stroke,fill} % } % \state{final}{} -% } -% +% } +% % \pgfpicture % \pgfdecoratepath{circles} % { @@ -224,7 +224,7 @@ \long\def\pgfdecoratepath#1#2{% \pgfdecoration{{#1}{\pgfdecoratedpathlength}{\pgfdecoratebeforecode}{\pgfdecorateaftercode}}% #2% - \endpgfdecoration} + \endpgfdecoration}% @@ -232,8 +232,8 @@ % \pgfdecoratecurrentpath % % Decorate the current/existing path, but (unavoidably) destroys it. -% -% \pgfdecoratebeforecode and \pgfdecorateaftercode can be used to +% +% \pgfdecoratebeforecode and \pgfdecorateaftercode can be used to % execute code before and after the decoration. % % #1 - the name of the decoration. @@ -270,7 +270,7 @@ \pgfsetpath\pgfutil@empty% \pgfdecoration{{#1}{\pgfdecoratedpathlength}{\pgfdecoratebeforecode}{\pgfdecorateaftercode}}% \pgfsetpath\pgf@decorate@currentpath% - \endpgfdecoration} + \endpgfdecoration}% @@ -281,8 +281,8 @@ % % Definitions: % -% `existing path' -% - any unsed path exsiting prior to the environment. +% `existing path' +% - any unused path existing prior to the environment. % % `decorated path' % - the path that is being decorated. @@ -295,34 +295,34 @@ % 1. Any existing path is saved. % 2. Construction commands are executed forming the decorated path. % 3. If the first command in the decorated path is not a `move to', -% the last known position from the exisiting path is inserted. -% 4. The saved existing path is reinstalled. +% the last known position from the existing path is inserted. +% 4. The saved existing path is reinstalled. % 5. The decoration automaton is executed along the decorated path. -% +% % Parameters: % % #1 - a comma separated list of decoration specifications. -% +% % A decoration specification takes the format: % % {<name>}{<distance>}{<before code>}{<after code>} % % The decoration <name> is applied to a section of the decorated -% path from the last point on the decorated path the decoration +% path from the last point on the decorated path the decoration % automaton reached to <distance> from that point. -% -% When <distance>} is parsed, the dimension +% +% When <distance>} is parsed, the dimension % \pgfdecoratedreminingdistance holds the distance remaining on the % entire decorated path, and the macro \pgfdecoratedpathlength holds -% the total length of the entire decorated path. -% After <distance> is parsed, both are set to to the value of -% <distance> for the automaton to decorate current section of the +% the total length of the entire decorated path. +% After <distance> is parsed, both are set to to the value of +% <distance> for the automaton to decorate current section of the % decorated path. % % <before code> is executed just before the decoration automaton % starts and <after code> is executed just after the automaton stops. % If <before code> or <after code> are empty, they can be omitted. -% The macros \pgfdecoratedpathfirst and \pgfdecoratedpathlast +% The macros \pgfdecoratedpathfirst and \pgfdecoratedpathlast % will be set up as the first and last points on the current section % of the decorated path. % @@ -337,7 +337,7 @@ % \pgfdecorationpath % - any unused decoration path. % -% \pgfpointdecoratedpathlast +% \pgfpointdecoratedpathlast % - the last point on the decorated path. % % Examples (require pgfdecorations library): @@ -353,9 +353,9 @@ % \pgfpathcurveto{\pgfpoint{0cm}{4cm}}{\pgfpoint{5cm}{0cm}}{\pgfpoint{5cm}{4cm}} % \endpgfdecoration % \pgfusepath{stroke} -% \endpgfpicture -% -% +% \endpgfpicture +% +% % \pgfpicture % \pgfdecoration % { @@ -396,11 +396,11 @@ % \pgfpathmoveto{\pgfpointorigin} % \pgfpathcurveto{\pgfpoint{0cm}{4cm}}{\pgfpoint{5cm}{0cm}}{\pgfpoint{5cm}{4cm}} % \endpgfdecoration -% -% \endpgfpicture -% -% -% +% +% \endpgfpicture +% +% +% % \pgfdeclaredecoration{polygons}{move}{ % \state{move}[width=7.5pt, next state=polygon]{} % \state{polygon}[width=7.5pt, next state=move] @@ -415,23 +415,23 @@ % \pgfpathmoveto{\pgfpointdecoratedpathlast} % } % } -% +% % \pgfpicture % \pgfdecoration % { % {polygons}{45pt}, % {lineto}{30pt} % {\pgfpathmoveto{\pgfpointdecoratedpathfirst}} -% { +% { % \pgfsetstrokecolor{yellow!50!orange} -% \pgfusepath{stroke} +% \pgfusepath{stroke} % }, % {polygons}{45pt}, % {lineto}{30pt} % {\pgfpathmoveto{\pgfpointdecoratedpathfirst}} -% { +% { % \pgfsetstrokecolor{green!50!blue} -% \pgfusepath{stroke} +% \pgfusepath{stroke} % }, % {polygons}{\pgfdecoratedremainingdistance} % } @@ -439,15 +439,15 @@ % \pgfpathcurveto{\pgfpoint{0cm}{4cm}}{\pgfpoint{5cm}{0cm}}{\pgfpoint{5cm}{4cm}} % \endpgfdecoration % \endpgfpicture -% -% +% +% % \pgfpicture % \pgfpathmoveto{\pgfpointorigin} % \pgfpathcurveto{\pgfpoint{0cm}{4cm}}{\pgfpoint{5cm}{0cm}}{\pgfpoint{5cm}{4cm}} % \pgfgetpath\temppath % \pgfsetstrokecolor{red} % \pgfusepath{stroke} -% +% % \pgfset{decoration text={Here is some text all the way along this curve!}} % \pgfdecoration{{text}{\pgfdecoratedremainingdistance}} % \pgfsetpath\temppath @@ -457,16 +457,16 @@ \def\pgfdecoration#1{% \begingroup% \def\pgf@decorate@decorationlist{#1}% - \pgf@decoration@env% -} + \pgf@decoration@env% +}% \def\endpgfdecoration{% \pgf@decoration@endenv% \ifx\pgfdecoratedpath\pgfutil@empty% \else% - % + % % Perform the decoration(s). - % + % \pgf@decorate@for\pgf@temp:=\pgf@decorate@decorationlist\do{% \ifx\pgf@temp\pgfutil@empty% \else% @@ -475,24 +475,24 @@ }% \fi% \pgfgetpath\pgfdecorationpath% - % + % % Take stuff outside the group. - % + % \global\let\pgf@decorate@decorationpathtemp\pgfdecorationpath% \global\let\pgf@decorate@decoratedpathtemp\pgfdecoratedpath% \global\let\pgf@decorate@existingpathtemp\pgfdecorateexistingpath% \global\let\pgfpoint@decorated@pathlasttemp\pgfpoint@decorated@pathlast% \endgroup% - % + % % Are we in LaTeX? - % + % \pgfutil@ifnextchar\@checkend{\aftergroup\pgf@decorate@installmacrosatend}% {\pgf@decorate@installmacrosatend}% -} +}% -% Enviroment \pgfmetadecoration \endpgfmetadecoration +% Environment \pgfmetadecoration \endpgfmetadecoration % % Decorate a path with decoration automatons! % @@ -502,21 +502,21 @@ % \state{line to}[width=1cm, next state=zigzag] % { % \decoration{lineto} -% \beforedecoration{\pgfpathmoveto{\pgfpointdecoratedpathfirst}} +% \beforedecoration{\pgfpathmoveto{\pgfpointdecoratedpathfirst}} % \afterdecoration % { % \pgfsetstrokecolor{black} -% \pgfusepath{stroke} +% \pgfusepath{stroke} % } % } % \state{zigzag}[width=2cm, next state=line to] % { -% \decoration{zigzag} +% \decoration{zigzag} % \beforedecoration{\pgfpathmoveto{\pgfpointdecoratedpathfirst}} % \afterdecoration % { % \pgfsetstrokecolor{red} -% \pgfusepath{stroke} +% \pgfusepath{stroke} % } % } % \state{final} @@ -526,11 +526,11 @@ % \afterdecoration % { % \pgfsetstrokecolor{black} -% \pgfusepath{stroke} +% \pgfusepath{stroke} % } % } % } -% +% % \pgfpicture % \pgfmetadecoration{fancy line} % \pgfpathmoveto{\pgfpointorigin} @@ -541,13 +541,13 @@ % \endpgfpicture % \def\pgfmetadecoration#1{% - \begingroup% + \begingroup% \let\decoration\pgf@metadecoration@decoration% \let\beforedecoration\pgf@metadecoration@beforedecoration% \let\afterdecoration\pgf@metadecoration@afterdecoration% \def\pgf@metadecoration@name{#1}% \pgf@decoration@env% -} +}% \def\endpgfmetadecoration{% \pgf@decoration@endenv% @@ -575,7 +575,7 @@ \pgf@decorate@invoke{% {\pgf@decorate@tempname}{\pgfdecoratedremainingdistance}% {\pgf@decorate@tempbefore}{\pgf@decorate@tempafter}% - }% + }% \fi% \pgfgetpath\pgfdecorationpath% % @@ -588,17 +588,17 @@ \endgroup% % % Are we in LaTeX? - % + % \pgfutil@ifnextchar\@checkend{\aftergroup\pgf@decorate@installmacrosatend}% {\pgf@decorate@installmacrosatend}% -} +}% -% Internal macro for the decoration enironment. +% Internal macro for the decoration environment. % \def\pgf@decoration@env{% \pgfgetpath\pgfdecorateexistingpath% @@ -606,15 +606,15 @@ \let\pgfdecorationpath\pgfutil@empty% \let\pgfdecoratedpath\pgfutil@empty% \let\pgfpoint@decorated@pathlast\pgfpointorigin% - \edef\pgfpoint@decorate@existingpathlast{\pgf@x\the\pgf@path@lastx\pgf@y\the\pgf@path@lasty}% - % + \edef\pgfpoint@decorate@existingpathlast{\pgf@x\the\pgf@path@lastx\pgf@y\the\pgf@path@lasty}% + % % Begin a group so transformations don't mess things up. - % - \bgroup% -} + % + \bgroup% +}% \def\pgf@decorate@path@check@moveto#1{% - \expandafter\pgf@decorate@path@@check@moveto#1\pgf@decorate@stop\pgf@decorate@@stop} + \expandafter\pgf@decorate@path@@check@moveto#1\pgf@decorate@stop\pgf@decorate@@stop}% \def\pgf@decorate@token@stop{\pgf@decorate@stop}% \def\pgf@decorate@path@@check@moveto#1#2#3#4\pgf@decorate@@stop#5#6{% @@ -626,17 +626,17 @@ \else% #6% \fi% -} +}% \def\pgf@decoration@endenv{% - \egroup% + \egroup% \pgftransformreset% - % + % % Save the existing soft path and restore the existing path. - % + % \pgfgetpath\pgfdecoratedpath% \pgfsetpath\pgfdecorateexistingpath% - % + % \ifx\pgfdecoratedpath\pgfutil@empty% \pgferror{I cannot decorate an empty path}% \else% @@ -644,7 +644,7 @@ % If the path consists of a single moveto token, make it % a very small horizontal line. % - \pgf@decorate@path@check@moveto\pgfdecoratedpath{% + \pgf@decorate@path@check@moveto\pgfdecoratedpath{% \advance\pgf@x by0.0001pt\relax% \edef\pgfdecoratedpath{% \expandafter\noexpand\pgfdecoratedpath% @@ -652,13 +652,13 @@ }% }% {}% - % + % % Remove special round tokens and get points. - % + % \pgfprocessround{\pgfdecoratedpath}{\pgfdecoratedpath}% - % + % % Parse the soft path into a series of decorated input segment objects. - % + % \pgf@decorate@parsesoftpath{\pgfdecoratedpath}{\pgf@decorate@inputsegmentobjects}% % % Setup further options @@ -670,24 +670,24 @@ \ifpgf@decorate@inputsegmentobjects@reverse% \pgf@decorate@inputsegmentobjects@reverse{\pgf@decorate@inputsegmentobjects}{\pgf@decorate@inputsegmentobjects}% \fi% - % + % \let\pgf@decorated@remainingdistance\pgf@decorate@totalpathlength% - % + % \let\pgfpoint@decorated@totalpathfirst\pgfpoint@decorated@firstparsed% \let\pgfpoint@decorated@totalpathlast\pgfpoint@decorate@lastnonmovetoparsed% - % + % \let\pgfpoint@decorated@pathfirst\pgfpoint@decorated@totalpathfirst \let\pgfpoint@decorated@pathlast\pgfpoint@decorated@totalpathlast% - % + % % Set up the first input segment. - % + % \let\pgf@decorate@currentinputsegmentobjects\pgf@decorate@inputsegmentobjects% \let\pgf@decorate@transformtoinputsegment\pgfutil@empty% \pgf@decorate@getnextinputsegmentobject\pgf@decorate@nextinputsegmentobject% \pgf@decorate@processnextinputsegmentobject% \pgf@decorate@distancetomove0pt\relax% \fi% -}% +}% @@ -697,7 +697,7 @@ \let\pgfdecoratedpath\pgf@decorate@decoratedpathtemp% \let\pgfdecorateexistingpath\pgf@decorate@existingpathtemp% \let\pgfpoint@decorated@pathlast\pgfpoint@decorated@pathlasttemp% -} +}% \let\pgfdecorationpath\pgfutil@empty \let\pgfdecoratedpath\pgfutil@empty @@ -712,8 +712,8 @@ \def\pgf@decorate@for#1:=#2\do#3{% \def\pgf@decorate@for@var{#1}% \def\pgf@decorate@for@action{#3}% - \expandafter\pgf@decorate@@for#2,\pgf@stop,} - + \expandafter\pgf@decorate@@for#2,\pgf@stop,}% + \def\pgf@decorate@@for#1,{% \ifx#1\pgf@stop% \expandafter\let\pgf@decorate@for@var\pgfutil@empty% @@ -722,7 +722,7 @@ \pgf@decorate@for@action% \expandafter\pgf@decorate@@for% \fi% -} +}% % Invoke a decoration. @@ -730,8 +730,8 @@ % #1 - {<name>}{<distance>}{<before code>}{<after code>} % \def\pgf@decorate@invoke#1{% - \pgf@decorate@@invoke#1\pgf@decorate@invoke\pgf@decorate@invoke\pgf@decorate@invoke\pgf@stop} - + \pgf@decorate@@invoke#1\pgf@decorate@invoke\pgf@decorate@invoke\pgf@decorate@invoke\pgf@stop}% + \def\pgf@decorate@@invoke#1#2#3#4#5\pgf@stop{% \pgfutil@ifundefined{pgf@decorate@@#1@initial}% {% @@ -802,7 +802,7 @@ \global\pgf@y\pgf@y% }% \edef\pgfpoint@decorated@pathlast{\pgf@x\the\pgf@x\pgf@y\the\pgf@y}% - \fi% + \fi% {% \pgftransformreset% \pgf@decorate@transformtoinputsegment% @@ -813,7 +813,7 @@ % % Execute user-defined code after decoration. % - \pgf@decorate@aftercode% + \pgf@decorate@aftercode% % % Update the input segment objects. % @@ -821,7 +821,7 @@ \let\pgf@decorate@inputsegmentobjects\pgf@decorate@inputsegmentobjects@aftersplit% \let\pgfpoint@decorated@pathfirst\pgfpoint@decorated@pathlast% }% -} +}% @@ -855,7 +855,7 @@ % \pgfpointdecoratedinputsegmentfirst % -% The first point of the current sub-path. +% The first point of the current sub-path. % \def\pgfpointdecoratedinputsegmentfirst{% {% @@ -865,11 +865,11 @@ \global\pgf@x\pgf@x% \global\pgf@y\pgf@y% }% -}% +}% % \pgfpointdecoratedinputsegmentlast % -% The final point of the current sub-path. +% The final point of the current sub-path. % \def\pgfpointdecoratedinputsegmentlast{% {% @@ -882,7 +882,7 @@ }% -\def\pgf@final@text{final} +\def\pgf@final@text{final}% % Run a normal decoration. % @@ -891,8 +891,8 @@ \ifx\pgf@decorate@current@state\pgf@final@text% \let\pgf@decorate@next\relax% \fi% - \pgf@decorate@next% -} + \pgf@decorate@next% +}% \def\pgf@decorate@do@state{% \let\pgf@decorate@next\relax% @@ -908,9 +908,9 @@ \let\pgf@decorate@next\pgf@decorate@do@code% \fi% \pgf@decorate@next% -} +}% -\def\pgf@decorate@setter{\pgfqkeys{/pgf/decoration automaton}} +\def\pgf@decorate@setter{\pgfqkeys{/pgf/decoration automaton}}% \pgf@decorate@repeatstate-1\relax @@ -937,7 +937,7 @@ \let\pgf@decorate@current@state\pgf@decorate@next@state% \fi% \pgf@decorate@run% -} +}% \pgfkeys{ /pgf/decoration automaton/width/.code=\def\pgf@decorate@width{#1}\pgf@decorate@switch@if#1 to final\pgf@stop,% @@ -958,7 +958,7 @@ }, /pgf/decoration automaton/auto end on length/.code=\pgf@decorate@auto@end{#1}, /pgf/decoration automaton/auto corner on length/.code=\pgf@decorate@auto@corner{#1}, -} +}% \def\pgf@decorate@auto@end#1{% \ifx\pgf@decorate@next\relax% @@ -995,7 +995,7 @@ \fi% \fi% \fi% -} +}% \def\pgf@decorate@auto@corner#1{% \ifpgfdecoratepathhascorners% @@ -1015,7 +1015,7 @@ \fi% \fi% \fi% -} +}% \def\pgf@decorate@switch@if#1to #2\pgf@stop{% \ifx\pgf@decorate@next\relax% @@ -1032,7 +1032,7 @@ \fi% \fi% \fi% -} +}% \def\pgf@decorate@switch@ifinputsegment#1to #2\pgf@stop{% \ifx\pgf@decorate@next\relax% @@ -1043,7 +1043,7 @@ \let\pgf@decorate@next\pgf@decorate@run% \fi% \fi% -} +}% @@ -1056,7 +1056,7 @@ % % \pgfsetdecorationsegmenttransformation{\pgftransformyshift{5pt}} % -\def\pgfsetdecorationsegmenttransformation#1{\def\pgf@decorate@additionaltransform{#1}} +\def\pgfsetdecorationsegmenttransformation#1{\def\pgf@decorate@additionaltransform{#1}}% \let\pgf@decorate@additionaltransform\pgfutil@empty% @@ -1064,16 +1064,16 @@ \def\pgf@metadecoration@decoration#1{% \edef\pgf@decorate@tempname{#1}% -} +}% \def\pgf@metadecoration@beforedecoration#1{% \def\pgf@decorate@tempbefore{#1}% -} +}% \def\pgf@metadecoration@afterdecoration#1{% \def\pgf@decorate@tempafter{#1}% -} +}% -\def\pgf@final@text{final} +\def\pgf@final@text{final}% % Run a meta decoration. % @@ -1082,8 +1082,8 @@ \ifx\pgf@metadecoration@current@state\pgf@final@text% \let\pgf@metadecoration@next\relax% \fi% - \pgf@metadecoration@next% -} + \pgf@metadecoration@next% +}% \def\pgf@metadecoration@do@state{% \let\pgf@metadecoration@next\relax% @@ -1104,7 +1104,7 @@ \let\pgf@metadecoration@next\pgf@metadecoration@do@code% \fi% \pgf@metadecoration@next% -} +}% \def\pgf@metadecoration@do@code{% % @@ -1128,16 +1128,16 @@ % \let\pgf@metadecoration@current@state\pgf@metadecoration@next@state% \pgf@metadecoration@run% -} +}% -\def\pgf@metadecoration@setter{\pgfqkeys{/pgf/meta-decoration automaton}} +\def\pgf@metadecoration@setter{\pgfqkeys{/pgf/meta-decoration automaton}}% \pgfkeys{ /pgf/meta-decoration automaton/width/.code=\def\pgf@metadecoration@width{#1}\pgf@metadecoration@switch@if#1 to final\pgf@stop,% /pgf/meta-decoration automaton/switch if less than/.code=\pgf@metadecoration@switch@if#1\pgf@stop,% /pgf/meta-decoration automaton/switch if input segment less than/.code=\pgf@metadecoration@switch@ifinputsegment#1\pgf@stop,% /pgf/meta-decoration automaton/next state/.store in=\pgf@metadecoration@next@state,% -} +}% \def\pgf@metadecoration@switch@if#1to #2\pgf@stop{% \ifx\pgf@metadecoration@next\relax% @@ -1147,7 +1147,7 @@ \let\pgf@metadecoration@next\pgf@metadecoration@run% \fi% \fi% -} +}% \def\pgf@metadecoration@switch@ifinputsegment#1to #2\pgf@stop{% \ifx\pgf@metadecoration@next\relax% @@ -1157,7 +1157,7 @@ \let\pgf@metadecoration@next\pgf@metadecoration@run% \fi% \fi% -} +}% @@ -1168,7 +1168,7 @@ \advance\pgfdecoratedcompleteddistance\pgf@decorate@distancetomove% \advance\pgfdecoratedremainingdistance-\pgf@decorate@distancetomove% \pgf@decorate@@movealongpath% -} +}% \def\pgf@decorate@@movealongpath{% \advance\pgfdecoratedinputsegmentcompleteddistance\pgf@decorate@distancetomove% \advance\pgfdecoratedinputsegmentremainingdistance-\pgf@decorate@distancetomove% @@ -1185,7 +1185,7 @@ \fi% \fi% \pgf@next% -} +}% \def\pgf@decorate@@@movealongpath{% % @@ -1206,9 +1206,9 @@ \pgfdecoratedremainingdistance0pt\relax% \fi% \fi% -} +}% -% Return the next input segment object in a macro +% Return the next input segment object in a macro % \def\pgf@decorate@getnextinputsegmentobject#1{% \ifx\pgf@decorate@currentinputsegmentobjects\pgfutil@empty% @@ -1218,12 +1218,12 @@ \let\pgf@next\pgf@decorate@@getnextinputsegmentobject% \fi% \pgf@next% -} +}% \def\pgf@decorate@@getnextinputsegmentobject{% - \expandafter\pgf@decorate@@@getnextinputsegmentobject\pgf@decorate@currentinputsegmentobjects\pgf@stop} + \expandafter\pgf@decorate@@@getnextinputsegmentobject\pgf@decorate@currentinputsegmentobjects\pgf@stop}% \def\pgf@decorate@@@getnextinputsegmentobject#1#2\pgf@stop{% \expandafter\def\pgf@decorate@temp{#1}% - \def\pgf@decorate@currentinputsegmentobjects{#2}} + \def\pgf@decorate@currentinputsegmentobjects{#2}}% % Process the next input segment object. % @@ -1232,7 +1232,7 @@ \let\pgf@decorate@currentinputsegmentobject\pgf@decorate@nextinputsegmentobject% \pgf@decorate@getnextinputsegmentobject\pgf@decorate@nextinputsegmentobject% % - % If the current input segment object is a moveto, execute the + % If the current input segment object is a moveto, execute the % object macro and get the next input segment object. % \pgf@decorate@is@closepath@false% @@ -1289,7 +1289,7 @@ \pgfmath@smuggleone\pgfdecoratedangletonextinputsegment% \endgroup% \let\pgfdecorationnextinputsegmentobject\pgf@decorate@temp% -} +}% % @@ -1302,15 +1302,15 @@ % % These allow comparison with \ifx using % -% \pgfdecorationcurrentinputsegment +% \pgfdecorationcurrentinputsegment % \pgfdecorationnextinputsegment % \pgfdecorationcurrentprevioussegment % -\def\pgfdecorationinputsegmentmoveto{moveto} -\def\pgfdecorationinputsegmentlineto{lineto} -\def\pgfdecorationinputsegmentcurveto{curveto} -\def\pgfdecorationinputsegmentclosepath{closepath} -\def\pgfdecorationinputsegmentlast{last} +\def\pgfdecorationinputsegmentmoveto{moveto}% +\def\pgfdecorationinputsegmentlineto{lineto}% +\def\pgfdecorationinputsegmentcurveto{curveto}% +\def\pgfdecorationinputsegmentclosepath{closepath}% +\def\pgfdecorationinputsegmentlast{last}% % Input segment object moveto. % @@ -1322,7 +1322,7 @@ \edef\pgf@decorate@lastmoveto{#1}% \def\pgfdecoratedinputsegmentlength{0pt}% \let\pgfdecorationcurrentinputsegment\pgfdecorationinputsegmentmoveto% -} +}% % Input segment object lineto. % @@ -1331,8 +1331,8 @@ \def\pgf@decorate@inputsegment@first{#2}% \def\pgf@decorate@inputsegment@last{#3}% % - % Supports should be defined like this, so if treated as a curve, - % equal time steps will correspond to equal distances. + % Supports should be defined like this, so if treated as a curve, + % equal time steps will correspond to equal distances. % \pgfpointdiff{#2}{#3}% \pgf@xa\pgf@x% @@ -1346,11 +1346,11 @@ \pgf@process{#2}% \advance\pgf@x0.666666\pgf@xa% \advance\pgf@y0.666666\pgf@ya% - }% + }% \let\pgf@decorate@movealonginputsegment\pgf@decorate@movealonginputsegment@line% \let\pgf@decorate@transformtoinputsegment\pgf@decorate@transformtoinputsegment@line% \let\pgfdecorationcurrentinputsegment\pgfdecorationinputsegmentlineto% -} +}% % Input segment object curveto. % @@ -1359,12 +1359,12 @@ \def\pgf@decorate@inputsegment@first{#2}% \def\pgf@decorate@inputsegment@supporta{#3}% \def\pgf@decorate@inputsegment@supportb{#4}% - \def\pgf@decorate@inputsegment@last{#5}% + \def\pgf@decorate@inputsegment@last{#5}% % \let\pgf@decorate@movealonginputsegment\pgf@decorate@movealonginputsegment@curve% \let\pgf@decorate@transformtoinputsegment\pgf@decorate@transformtoinputsegment@curve% \let\pgfdecorationcurrentinputsegment\pgfdecorationinputsegmentcurveto% -} +}% % Input segment object closepath. % @@ -1376,7 +1376,7 @@ \def\pgfdecoratedinputsegmentlength{#1}% \def\pgf@decorate@inputsegment@first{#2}% \def\pgf@decorate@inputsegment@last{#3}% - % + % \pgfpointdiff{#2}{#3}% \pgf@xa\pgf@x% \pgf@ya\pgf@y% @@ -1389,19 +1389,19 @@ \pgf@process{#2}% \advance\pgf@x0.666666\pgf@xa% \advance\pgf@y0.666666\pgf@ya% - }% - % + }% + % \let\pgf@decorate@movealonginputsegment\pgf@decorate@movealonginputsegment@line% \let\pgf@decorate@transformtoinputsegment\pgf@decorate@transformtoinputsegment@line% \let\pgfdecorationcurrentinputsegment\pgfdecorationinputsegmentclosepath% -} +}% % Input segment object endofinputsegments. % \def\pgf@decorate@inputsegmentobject@endofinputsegments{% \let\pgfdecorationcurrentinputsegment\pgfdecorationinputsegmentlast% -} +}% @@ -1422,7 +1422,7 @@ \pgf@ya\pgf@y% \pgf@xb\pgf@decorate@inputsegmenttime pt\relax% % - % Reduce the initial time step, depending on the length + % Reduce the initial time step, depending on the length % of the path. To do: Optimise this step (should also depend on #1). % \ifdim\pgf@decorate@currentpathlength<128pt\relax% @@ -1445,7 +1445,7 @@ % % We would like to use \pgfpointcurveattime. However, we must not % overuse \pgf@process or \pgfmath stuff within this loop, - % otherwise we increase the chances of save stack overflow. + % otherwise we increase the chances of save stack overflow. % \edef\pgf@decorate@temp{% \pgf@xa\the\pgf@xa% @@ -1499,13 +1499,13 @@ \pgf@marshal% \let\pgfdecoratedangle\pgfmathresult% \fi% -} +}% % \pgfpoint@decorate@curveattime % % A `quick' version of \pgfpointcurveattime % -% No parsing and no use of \pgf@process. +% No parsing and no use of \pgf@process. % This prevents save stack build up when used inside a loop. % \def\pgfpoint@decorate@curveattime#1#2#3#4#5{% @@ -1541,7 +1541,7 @@ % Third iteration: \pgf@x=\pgf@time@t\pgf@x\advance\pgf@x by\pgf@time@s\pgf@xa% \pgf@y=\pgf@time@t\pgf@y\advance\pgf@y by\pgf@time@s\pgf@ya% -} +}% % Applies the necessary transform for a line sub-path. @@ -1551,7 +1551,7 @@ \pgfpointlineatdistance{\pgfdecoratedinputsegmentcompleteddistance}{\pgf@decorate@inputsegment@first}{\pgf@decorate@inputsegment@last} }% \pgftransformrotate{\pgfdecoratedangle}% -} +}% % Applies the necessary transform for a curve sub-path. % @@ -1561,47 +1561,47 @@ \pgftransformcurveattime{\pgf@decorate@inputsegmenttime}% {\pgf@decorate@inputsegment@first}{\pgf@decorate@inputsegment@supporta}% {\pgf@decorate@inputsegment@supportb}{\pgf@decorate@inputsegment@last}% -} +}% % \pgf@decorate@parsesoftpath -% +% % Parses an instance of a soft path into intermediate line and curve -% sub-path objects which the decoration automaton can use to traverse -% the decorated path. -% -% The soft path should be well formed and only contain `primative' -% soft path tokens, that is: moveto, lineto, curvetosupporta, +% sub-path objects which the decoration automaton can use to traverse +% the decorated path. +% +% The soft path should be well formed and only contain `primative' +% soft path tokens, that is: moveto, lineto, curvetosupporta, % curvetosupportb, curveto, rectcorner, rectsize, and closepath. -% (i.e., all specialround tokens should have removed using +% (i.e., all specialround tokens should have removed using % \pgfprocessround) -% +% % The overall length of the path is also calculated and returned -% in the macro \pgfdecoratedpathlength. -% +% in the macro \pgfdecoratedpathlength. +% % Parameters: -% +% % #1 - a macro containing a well formed soft path. % #2 - a macro to store the intermediate sub-path representations. % % Example: -% +% % \pgfpathmoveto{\pgfpointorigin} % \pgfpathlineto{\pgfpoint{0pt}{12pt}} % \pgfpathlineto{\pgfpoint{12pt}{0pt}} % \pgfgetpath\softpath -% +% % \pgf@decorate@parsesoftpath{\softpath}{\parsedsoftpath} -% +% % results in: -% +% % \parsedsoftpath -> % {\pgf@decorate@inputsegmentobject@lineto{12pt}{\pgf@x 0pt\pgf@y 0pt}{\pgf@x 0pt\pgf@y 12pt}} % {\pgf@decorate@inputsegmentobject@lineto{12pt}{\pgf@x 0pt\pgf@y 12pt}{\pgf@x 12pt\pgf@y 12pt}} -% +% % \pgfdecoratedpathlength -> % 24pt % @@ -1615,7 +1615,7 @@ \let\pgf@decorate@queueinputsegmentobject\pgfutil@empty% \let\pgfpoint@decorated@firstparsed\pgfutil@empty% \expandafter\pgf@decorate@@parsesoftpath#1\pgf@stop% -} +}% \def\pgf@decorate@@parsesoftpath#1{% \ifx#1\pgf@stop% @@ -1648,7 +1648,7 @@ \fi% \fi% \fi% - \pgf@next} + \pgf@next}% \def\pgf@decorate@addtoinputsegmentobjects#1{% @@ -1667,21 +1667,21 @@ \fi% \expandafter\def\expandafter\pgf@decorate@inputsegmentobjects\expandafter% {\pgf@decorate@inputsegmentobjects{#1}}% -} +}% % Convert \pgfsyssoftpath@movetotoken{<X>}{<Y>} into the following % representation: -% +% % \pgf@decorate@inputsegmentobject@moveto{\pgf@x X\pgf@y Y} % % The moveto input segment object is not added immediately, so that % only the last of multiple movetos is inserted. -% +% \def\pgf@decorate@parsemoveto#1#2{% \def\pgf@decorate@queueinputsegmentobject{\pgf@decorate@inputsegmentobject@moveto{\pgf@x#1\pgf@y#2}}% \def\pgfpoint@decorate@lastparsed{\pgf@x#1\pgf@y#2}% \pgf@decorate@@parsesoftpath% -} +}% % Convert \pgfsyssoftpath@linetotoken{<X>}{<Y>} into the following % representation: @@ -1698,8 +1698,8 @@ \let\pgfpoint@decorate@lastnonmovetoparsed\pgfpoint@decorate@lastparsed% \expandafter\pgf@decorate@addtoinputsegmentobjects\expandafter{\pgf@decorate@temp}% \pgf@decorate@@parsesoftpath% -} - +}% + % Convert \pgfsyssoftpath@curvetosupportatoken{<Xa>}{<Ya>}...etc % into the following representation: % @@ -1717,7 +1717,7 @@ \edef\pgfpoint@decorate@lastparsed{\pgf@x#5\pgf@y#6}% \let\pgfpoint@decorate@lastnonmovetoparsed\pgfpoint@decorate@lastparsed% \pgf@decorate@@parsesoftpath% -} +}% \def\pgf@decorate@parseclosepath#1#2{% @@ -1730,7 +1730,7 @@ \edef\pgfpoint@decorate@lastparsed{\pgf@x#1\pgf@y#2}% \let\pgfpoint@decorate@lastnonmovetoparsed\pgfpoint@decorate@lastparsed% \pgf@decorate@@parsesoftpath% -} +}% % Convert \pgfsyssoftpath@rectcornertoken{<X>}{<Y>}\pgfsyssoftpath@rectsizetoken{<Xa>}{<Ya>} % into either (clockwise) @@ -1762,7 +1762,7 @@ \pgf@decorate@parsemoveto{#1}{#2}% \pgf@xa#1\relax% \pgf@ya#2\relax% - \ifpgfdecoraterectangleclockwise% + \ifpgfdecoraterectangleclockwise% \advance\pgf@ya#4% \pgf@yb\pgf@ya% \edef\pgf@temp{{\the\pgf@xa}{\the\pgf@ya}}% @@ -1792,14 +1792,14 @@ \advance\pgf@ya-#4% \edef\pgf@temp{{\the\pgf@xa}{\the\pgf@ya}}% \expandafter\pgf@decorate@parseclosepath\pgf@temp% - \fi% + \fi% % % Restore the parsing. % \let\pgf@decorate@@parsesoftpath\pgf@decorate@orig@@parsesoftpath% \edef\pgf@marshal{\noexpand\pgf@decorate@parsemoveto{\the\pgf@xb}{\the\pgf@yb}}% \pgf@marshal% -} +}% @@ -1811,15 +1811,15 @@ \def\pgf@decorate@linelength#1#2{% \pgf@process{\pgfpointdiff{#1}{#2}}% \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}% -} +}% % \pgf@decorate@curvelength % -% Define \pgfmathresult as the length (without units) of the cubic +% Define \pgfmathresult as the length (without units) of the cubic % bezier described by #1,#2,#3 and #4. % % To approximate the length of the curve P (sort of) use: -% +% % curveLength(P,q) % Q = subdivideLeft(P); % R = subdivideRight(P); @@ -1836,9 +1836,9 @@ % Q = subdivideLeft(P); % R = subdivideRight(P); % return curveLength'(Q,q) + curveLength'(R,q); -% +% % Where q is some small value (`tolerance'). -% +% \newif\ifpgf@decorate@subdivide \def\pgf@decorate@curvelength#1#2#3#4{% % @@ -1851,8 +1851,8 @@ \advance\pgfutil@tempdimb\pgfmathresult pt\relax% \pgfmath@returnone\pgfutil@tempdimb% \endgroup% -} - +}% + \def\pgf@decorate@@curvelength#1#2#3#4{% \begingroup% \pgf@decorate@curvecordlength{#1}{#2}{#3}{#4}% @@ -1866,12 +1866,12 @@ \expandafter\pgfmath@returnone\expandafter\pgfmathresult\expandafter p\expandafter t\expandafter% \fi% \endgroup% -} +}% -\def\pgf@decorate@curvelength@tolerance{1pt} +\def\pgf@decorate@curvelength@tolerance{1pt}% \def\pgf@decorate@curvecordlength#1#2#3#4{% - % + % % Calculate the curve cord vector. % #4\relax% @@ -1892,14 +1892,14 @@ \ifdim\pgf@ya<\pgf@decorate@curvelength@tolerance\relax% \pgfmathveclen@{\pgfmath@tonumber{\pgf@xa}}{\pgfmath@tonumber{\pgf@ya}}% \pgf@decorate@subdividefalse% - \fi% + \fi% \fi% -} +}% \def\pgf@decorate@recursive@subdividecurve@left#1#2#3#4{% {% % - % The left curve (from t=0 to t=.5) + % The left curve (from t=0 to t=.5) % #1\relax% \pgfutil@tempdima\pgf@x% @@ -1924,12 +1924,12 @@ }% }% \pgf@marshal% -} +}% \def\pgf@decorate@recursive@subdividecurve@right#1#2#3#4{% {% % - % The right curve (from t=0.5 to t=1) + % The right curve (from t=0.5 to t=1) % #1\relax% \pgfutil@tempdima.125\pgf@x\pgfutil@tempdimb.125\pgf@y% @@ -1953,7 +1953,7 @@ }% }% \pgf@marshal% -} +}% % Macro to reverse a set of input segment objects. @@ -1964,7 +1964,7 @@ \def\pgf@decorate@inputsegmentobjects@reverse#1#2{% \def\pgf@decorate@path@storein{#2}% \def\pgf@decorate@inputsegments@@temp{}% - \expandafter\pgf@decorate@inputsegments@@reverse@pass@first#1\pgf@stop} + \expandafter\pgf@decorate@inputsegments@@reverse@pass@first#1\pgf@stop}% \def\pgf@decorate@inputsegments@@reverse@pass@first#1#2\pgf@stop{% \def\pgf@decorate@temp{#1}% @@ -1980,7 +1980,7 @@ \def\pgf@decorate@next{\pgf@decorate@inputsegments@@reverse@pass@first#2\pgf@stop}% \fi% \pgf@decorate@next% -} +}% \def\pgf@decorate@inputsegmentobjects@reverse@pass@second#1#2#3\pgf@stop{% \def\pgf@decorate@inputsegments@temp{#3}% \def\pgf@decorate@inputsegments@@temp{}% @@ -2010,7 +2010,7 @@ \ifx#1\pgf@decorate@inputsegmentobject@curveto% \let\pgf@decorate@next=\pgf@decorate@inputsegmentobjects@reverse@curveto% \else% - \ifx#1\pgf@decorate@inputsegmentobject@closepath% + \ifx#1\pgf@decorate@inputsegmentobject@closepath% \let\pgf@decorate@next=\pgf@decorate@inputsegmentobjects@reverse@closepath% \else% \fi% @@ -2018,8 +2018,8 @@ \fi% \fi% \fi% - \pgf@decorate@next% -} + \pgf@decorate@next% +}% \newif\ifpgf@decorate@inputsegmentobjects@reverse@moveto@waiting @@ -2038,7 +2038,7 @@ \fi% \pgf@decorate@inputsegmentobjects@reverse@moveto@waitingtrue% \pgf@decorate@path@@@reverse@pass@second% -} +}% \newif\ifpgf@decorate@inputsegmentobjects@reverse@closepath@waiting @@ -2047,7 +2047,7 @@ \def\pgf@decorate@reverse@closepath@length{#1}% \def\pgf@decorate@current@inputsegmentobject{}% \pgf@decorate@inputsegmentobjects@reverse@lineto{#1}{#2}{#3}% -} +}% \def\pgf@decorate@inputsegmentobjects@reverse@lineto#1#2#3#4{% \ifpgf@decorate@inputsegmentobjects@reverse@moveto@waiting% @@ -2070,7 +2070,7 @@ {\expandafter\pgf@decorate@current@inputsegmentobject\pgf@decorate@append@inputsegmentobject} \def\pgf@decorate@last{#2}% \pgf@decorate@path@@@reverse@pass@second#4% -} +}% \def\pgf@decorate@inputsegmentobjects@reverse@curveto#1#2#3#4#5{% \ifpgf@decorate@inputsegmentobjects@reverse@moveto@waiting% @@ -2084,7 +2084,7 @@ \fi% \def\pgf@decorate@last{#2}% \pgf@decorate@path@@@reverse@pass@second% -} +}% \def\pgf@decorate@path@@@reverse@pass@second{% \ifx\pgf@decorate@current@inputsegmentobject\pgfutil@empty% @@ -2092,7 +2092,7 @@ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter% \pgf@decorate@inputsegments@@temp\expandafter\expandafter\expandafter% {\expandafter\pgf@decorate@inputsegments@@temp\pgf@decorate@current@inputsegmentobject}% - \fi% + \fi% \pgf@decorate@path@@reverse@pass@second% }% @@ -2113,35 +2113,35 @@ % -% Simple decorations. +% Simple decorations. -\pgfdeclaredecoration{lineto}{initial}{ +\pgfdeclaredecoration{lineto}{initial}{% \state{initial}[switch if input segment less than=\pgfdecoratedremainingdistance to input segment, width=\pgfdecoratedremainingdistance] { - } + }% \state{input segment}[width=\pgfdecoratedinputsegmentlength,next state=initial] { \pgfpathlineto{\pgfpointdecoratedinputsegmentlast} - } - - \state{final}{\pgfpathlineto{\pgfpointdecoratedpathlast}} -} + }% -\pgfdeclaredecoration{moveto}{initial}{ - \state{initial}[width=\pgfdecoratedremainingdistance]{} - \state{final}{\pgfpathmoveto{\pgfpointdecoratedpathlast}} -} + \state{final}{\pgfpathlineto{\pgfpointdecoratedpathlast}}% +}% + +\pgfdeclaredecoration{moveto}{initial}{% + \state{initial}[width=\pgfdecoratedremainingdistance]{}% + \state{final}{\pgfpathmoveto{\pgfpointdecoratedpathlast}}% +}% % This decorations curves to the end along the line. -\pgfdeclaredecoration{curveto}{initial}{ +\pgfdeclaredecoration{curveto}{initial}{% \state{initial}[width=\pgfdecoratedinputsegmentlength/100] { \pgfpathlineto{\pgfpointorigin} - } - \state{final}{\pgfpathlineto{\pgfpointdecoratedpathlast}} -} + }% + \state{final}{\pgfpathlineto{\pgfpointdecoratedpathlast}}% +}% @@ -2150,7 +2150,7 @@ \let\pgfsnakeremainingdistance=\pgfdecoratedremainingdistance \let\pgfsnakecompleteddistance=\pgfdecoratedcompleteddistance -\def\pgfsnakeangle{\pgfdecoratedangle} +\def\pgfsnakeangle{\pgfdecoratedangle}% \let\pgfdeclaresnake=\pgfdeclaredecoration \let\pgfsetsnakesegmenttransformation=\pgfsetdecorationsegmenttransformation \def\pgfpathsnakesto#1#2{% @@ -2158,8 +2158,8 @@ \expandafter\pgfdecoration\expandafter{\pgf@temp}% \pgfpathlineto{#2}% \endpgfdecoration% -} -\def\pgfpathsnaketo#1#2{\pgfpathsnakesto{{#1}{\pgfsnakeremainingdistance}}{#2}} +}% +\def\pgfpathsnaketo#1#2{\pgfpathsnakesto{{#1}{\pgfsnakeremainingdistance}}{#2}}% \def\pgfpathsnakealongvector#1#2#3{% \pgf@process{#3}% \pgf@xa=\pgf@x% @@ -2171,20 +2171,20 @@ \advance\pgf@ya by\pgf@path@lasty% \edef\pgf@snake@lib@temp{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}% \pgfpathsnaketo{#1}{\pgf@snake@lib@temp}% -} +}% \let\pgfsnakesegmentamplitude=\pgfdecorationsegmentamplitude \let\pgfsnakesegmentlength=\pgfdecorationsegmentlength -\def\pgfsnakesegmentangle{\pgfdecorationsegmentangle} -\def\pgfsnakesegmentobjectlength{\pgfkeysvalueof{/pgf/decoration/shape start width}} -\def\pgfsnakesegmentaspect{\pgfdecorationsegmentaspect} +\def\pgfsnakesegmentangle{\pgfdecorationsegmentangle}% +\def\pgfsnakesegmentobjectlength{\pgfkeysvalueof{/pgf/decoration/shape start width}}% +\def\pgfsnakesegmentaspect{\pgfdecorationsegmentaspect}% \pgfset{% /pgf/segment amplitude/.style={/pgf/decoration={amplitude=#1,shape height=2*#1}}, /pgf/segment length/.style={/pgf/decoration={segment length=#1}}, /pgf/segment angle/.style={/pgf/decoration={angle=#1}}, /pgf/segment aspect/.style={/pgf/decoration={aspect=#1}}, - /pgf/segment object length/.style={/pgf/decoration={shape width=#1,radius=#1}}} + /pgf/segment object length/.style={/pgf/decoration={shape width=#1,radius=#1}}}% diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex index f3158456ebe..50c0e1e52f7 100644 --- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex @@ -9,7 +9,7 @@ \ProvidesFileRCS{pgfmodulematrix.code.tex} -\usepgfmodule{shapes} +\usepgfmodule{shapes}% \newif\ifpgfmatrix \newif\ifpgf@matrix@correct@call @@ -37,17 +37,17 @@ % % \pgfsetmatrixrowsep{5pt} -\def\pgfsetmatrixrowsep#1{\def\pgfmatrixrowsep{#1}} -\def\pgfsetmatrixcolumnsep#1{\def\pgfmatrixcolumnsep{#1}} +\def\pgfsetmatrixrowsep#1{\def\pgfmatrixrowsep{#1}}% +\def\pgfsetmatrixcolumnsep#1{\def\pgfmatrixcolumnsep{#1}}% -\def\pgfmatrixrowsep{0pt} -\def\pgfmatrixcolumnsep{0pt} +\def\pgfmatrixrowsep{0pt}% +\def\pgfmatrixcolumnsep{0pt}% % The pgfmatrix command creates a node that contains a matrix. Like % the \pgfnode command, it is to be used inside a pgfpicture -% environment. +% environment. % % #1 = shape type % #2 = anchor @@ -59,12 +59,12 @@ % % Description: % -% This command creates a node that contains a matrix. For +% This command creates a node that contains a matrix. For % each cell of the matrix, drawing commands may be given. These % commands will create a cell picture and a bounding box is computed % for each cell picture. The cell picture is then placed inside the % cell. The position inside the cell is computed according to the -% following rules: +% following rules: % % 1. In each column, the origins of the cell pictures are all on a % vertical line. @@ -79,7 +79,7 @@ % inside a node whose name is given as #3, whose shape is #1, and % whose anchor is #2. This means that the resulting node is shifted % such that the given anchor lies at the origin. Then, as for a normal -% node, the #4 path usage command is used for the node. +% node, the #4 path usage command is used for the node. % % The parameter #5 is an additional negative shift for the node. Normally, such % a shift could be given beforehand (that is, the shift could be @@ -90,7 +90,7 @@ % positions in the matrix box. The origin of this coordinate system is % at the left baseline end of the matrix box, which corresponds to the % text anchor. The position #5 is then interpreted inside this -% coordinate system and then used for shifting. +% coordinate system and then used for shifting. % % The idea behind using the parameter #5 is the following: If you % specify "text" as anchor #2 and specify \pgfpointanchor{inner @@ -113,15 +113,15 @@ % % Lines are ended using the command \pgfmatrixendrow. The command \\ % is \let to be the same, but \\ is sometimes overridden by, say, -% minipage, so it's good to have \pgfmatrixendrow as a "fallback". +% minipage, so it's good to have \pgfmatrixendrow as a "fallback". % % Inside the matrix, \\ must be used to end every line ***including % the last***. You can pass an optional parameter to \\ as in \\[2pt] % to give an additional space after this particular line. % -% The usage of \\ at the end of the matrix is imporant since this +% The usage of \\ at the end of the matrix is important since this % command is used to find the end of the matrix. What happens is that -% \\ followed by a closing brace ends the matrix. +% \\ followed by a closing brace ends the matrix. % % Inside the matrix, you must use \pgfmatrixnextcell to separate % columns. The reason is that two columns are used internally for @@ -158,7 +158,7 @@ \ifpgfmatrix% \pgferror{You cannot nest pgfmatrix environments, yet} \fi% - \bgroup% + \bgroup% \everycr{}% #6% \def\pgf@matrix@par@shape{#1}% @@ -180,12 +180,12 @@ \let\pgf@matrix@node@list=\pgfutil@empty% \expandafter\let\csname pgf@matrix@column@finish@1\endcsname=\pgfutil@empty% \let\pgf@matrix@row@finish=\pgfutil@empty% - % + % % Get rid of bgroup % \afterassignment\pgf@matrix@cont\let\pgf@next=% -} -\def\pgf@matrix@cont{% +}% +\def\pgf@matrix@cont{% \setbox\pgf@matrix@box=\hbox\bgroup\vbox\bgroup% \halign\bgroup% \pgf@matrix@init@row% @@ -205,7 +205,7 @@ }&% ##\pgf@matrix@padding% \cr% -} +}% \def\pgf@end@matrix{% \egroup\egroup% @@ -240,7 +240,7 @@ \pgf@matrix@shift@nodes@secondary{\pgf@matrix@offset}% }% \fi% -} +}% @@ -267,7 +267,7 @@ % beginning (macro expansion has stopped here since neither \omit % nor \span was found) \let\pgf@matrix@signal@cell@end=\pgf@matrix@signal@cell@end% - \pgfutil@ifnextchar[{\pgf@matrix@cell@cont}{\pgf@matrix@cell@cont[0pt]}}%} + \pgfutil@ifnextchar[{\pgf@matrix@cell@cont}{\pgf@matrix@cell@cont[0pt]}}%}% \def\pgf@matrix@cell@cont[#1]{% \xdef\pgf@matrix@last@nextcell@options{#1}% @@ -275,10 +275,10 @@ }% -\def\pgf@matrix@fixed@text{between origins} -\def\pgf@matrix@natural@text{between borders} +\def\pgf@matrix@fixed@text{between origins}% +\def\pgf@matrix@natural@text{between borders}% -\def\pgf@matrix@addtolength#1#2{\edef\pgf@temp{#2}\expandafter\pgf@matrix@addtolength@\expandafter#1#2,\pgf@stop} +\def\pgf@matrix@addtolength#1#2{\edef\pgf@temp{#2}\expandafter\pgf@matrix@addtolength@\expandafter#1#2,\pgf@stop}% \def\pgf@matrix@addtolength@#1#2,#3\pgf@stop{% \def\pgf@temp{#2}% \ifx\pgf@temp\pgfutil@empty% @@ -298,7 +298,7 @@ \else% \pgf@matrix@addtolength@#1#3\pgf@stop% \fi% -} +}% @@ -310,7 +310,7 @@ \global\pgfmatrixcurrentcolumn=0\relax% \expandafter\gdef\csname pgf@matrix@maxy\the\pgfmatrixcurrentrow\endcsname{0pt}% \expandafter\gdef\csname pgf@matrix@miny\the\pgfmatrixcurrentrow\endcsname{0pt}% -} +}% @@ -319,7 +319,7 @@ \def\pgf@matrix@step@column{% \relax% \global\advance\pgfmatrixcurrentcolumn by1\relax% -} +}% @@ -342,9 +342,9 @@ % Step 4: Collect everything in a cell box % \setbox\pgf@matrix@cell=\hbox\bgroup\bgroup% - % make sure that cell pictures are not affected if matrizes have - % 'overlay' option on: - \pgf@relevantforpicturesizetrue + % make sure that cell pictures are not affected if matrices have + % 'overlay' option on: + \pgf@relevantforpicturesizetrue \pgfsys@beginpicture% \normalbaselines% % Find out whether the cell is empty: @@ -356,9 +356,9 @@ \pgf@matrix@empty@cell@false% \pgfmatrixbegincode% }% -} +}% -\def\pgf@matrix@empty@check{\futurelet\pgf@matrix@check@token\pgf@matrix@empty@check@cont} +\def\pgf@matrix@empty@check{\futurelet\pgf@matrix@check@token\pgf@matrix@empty@check@cont}% \def\pgf@matrix@empty@check@cont{% \ifx\pgf@matrix@check@token\pgf@matrix@signal@cell@end% \pgf@matrix@empty@cell@true% @@ -373,7 +373,7 @@ \expandafter \let% reinserted \fi% -} +}% \newif\ifpgf@matrix@empty@cell@ @@ -407,7 +407,7 @@ \expandafter\global\expandafter\let\csname pgf@matrix@column@finish@\the\pgfmatrixcurrentcolumn\endcsname=\pgfutil@empty% \fi% }% - \fi\fi% + \fi\fi% % Special case of the empty picture \ifdim\pgf@picmaxx=-16000pt\relax% \global\pgf@picmaxx=0pt\relax% @@ -425,20 +425,20 @@ \pgf@y=\csname pgf@matrix@column@sep@\the\pgfmatrixcurrentcolumn\endcsname\relax% \advance\pgf@picminx by-\pgf@y% \fi% - % + % % Step 6: Protocol and adjust height and depth % % Step 6.1: Protocol... % \ifdim\pgf@picmaxy>\csname pgf@matrix@maxy\the\pgfmatrixcurrentrow\endcsname% \expandafter\xdef\csname pgf@matrix@maxy\the\pgfmatrixcurrentrow\endcsname{\the\pgf@picmaxy}% - \fi% + \fi% \ifdim\pgf@picminy<\csname pgf@matrix@miny\the\pgfmatrixcurrentrow\endcsname% \expandafter\xdef\csname pgf@matrix@miny\the\pgfmatrixcurrentrow\endcsname{\the\pgf@picminy}% - \fi% + \fi% % % Step 6.2: and setup. - % + % \ht\pgf@matrix@cell=\pgf@picmaxy% \dp\pgf@matrix@cell=-\pgf@picminy% % @@ -453,16 +453,16 @@ \else% \ifdim\pgf@picmaxx>\csname pgf@matrix@maxx\the\pgfmatrixcurrentcolumn\endcsname% \expandafter\xdef\csname pgf@matrix@maxx\the\pgfmatrixcurrentcolumn\endcsname{\the\pgf@picmaxx}% - \fi% + \fi% \ifdim\pgf@picminx<\csname pgf@matrix@minx\the\pgfmatrixcurrentcolumn\endcsname% \expandafter\xdef\csname pgf@matrix@minx\the\pgfmatrixcurrentcolumn\endcsname{\the\pgf@picminx}% - \fi% + \fi% \fi% % % Step 7.2: and setup. - % + % \xdef\pgf@matrix@paddingskip{\the\pgf@picmaxx}% - % + % % Step 8: Put in the box now % \hfil\hskip-\pgf@picminx% @@ -471,7 +471,7 @@ % % Step 9: End bounding box \endpgfinterruptboundingbox% -} +}% % Default code for the start and end code \let\pgfmatrixbegincode=\relax @@ -489,7 +489,7 @@ \xdef\pgf@matrix@node@list{\pgf@matrix@node@list,{#1}}% \expandafter\xdef\csname pgf@matrix@node@location@#1\endcsname{{\the\pgfmatrixcurrentrow}{\the\pgfmatrixcurrentcolumn}}% \fi% -} +}% @@ -501,7 +501,7 @@ \pgferror{Single ampersand used with wrong catcode}% \fi% \hskip\pgf@matrix@paddingskip\hfil% -} +}% % Compute the real positions of the origins @@ -509,7 +509,7 @@ % We must now compute the real positions of the origins of all the % small pictures. To this end, we need to compute prefix sums. After % the procedure is done, the minx and the maxy will contain the origin -% positions. +% positions. \def\pgf@matrix@compute@origin{% % @@ -550,7 +550,7 @@ \expandafter\xdef\csname pgf@matrix@minx\the\c@pgf@counta\endcsname{\the\pgf@x}% \repeat% }% -} +}% % Shift the nodes to their origins @@ -577,7 +577,7 @@ \fi% }% }% -} +}% % The second shifting, done in the following procedure, shifts all @@ -593,7 +593,7 @@ \fi% \fi% }% -} +}% % End of line @@ -603,21 +603,22 @@ % nor \span was found) \let\pgf@matrix@signal@cell@end=\pgf@matrix@signal@cell@end \pgf@matrix@last@cell@in@rowtrue% + \xdef\pgf@matrix@rowsep{\pgfmatrixrowsep}% &\pgf@matrix@correct@calltrue% \global\pgf@matrix@fixedfalse% \pgf@y=0pt% - \pgf@matrix@addtolength\pgf@y{\pgfmatrixrowsep}% + \pgf@matrix@addtolength\pgf@y{\pgf@matrix@rowsep}% \pgfutil@ifnextchar[{\pgfmatrixendrow@skip}{\pgf@matrix@finish@line}% -} +}% \newif\ifpgf@matrix@last@cell@in@row -\def\pgf@matrix@signal@cell@end{\pgf@matrix@signal@cell@end} +\def\pgf@matrix@signal@cell@end{\pgf@matrix@signal@cell@end}% % exact definition does not matter, only needs to be unique. \def\pgfmatrixendrow@skip[#1]{% \pgf@matrix@addtolength\pgf@y{#1}% \pgf@matrix@finish@line% -} +}% \def\pgf@matrix@finish@line{% \global\pgf@y=\pgf@y% @@ -625,12 +626,12 @@ \global\advance\pgf@ya by\csname pgf@matrix@miny\the\pgfmatrixcurrentrow\endcsname% \expandafter\xdef\csname pgf@matrix@miny\the\pgfmatrixcurrentrow\endcsname{\the\pgf@ya}% \pgfutil@ifnextchar\egroup{\cr\pgf@end@matrix}{\pgf@matrix@no@eom@found}% -} +}% \def\pgf@matrix@eom@found{% \cr% \pgf@end@matrix% -} +}% \def\pgf@matrix@no@eom@found{% \cr% @@ -645,7 +646,7 @@ \global\let\pgf@matrix@row@finish=\pgfutil@empty% \fi% }% -} +}% \endinput diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulenonlineartransformations.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulenonlineartransformations.code.tex index 7ce4784110f..8e607b207d4 100644 --- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulenonlineartransformations.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulenonlineartransformations.code.tex @@ -25,7 +25,7 @@ % something nonlinear", it just provides a way of computing a % coordinate. In contrast, installing a polar transformation will % transform everything being drawn using the \pgfpath... commands an -% will even turn a straight line into a circle. +% will even turn a straight line into a circle. % % Since computing non-linear transformations is expensive, they are % only applied "if really necessary". @@ -48,7 +48,7 @@ \pgf@pos@transform@glob% \pgf@nlt@list% } -} +}% @@ -57,13 +57,13 @@ % % Description: % -% Does a "local syncronization" of the nonlinear transformation with +% Does a "local synchronization" of the nonlinear transformation with % the linear transformation regarding the translation part of the -% current nonlinear transformatoin. The *linear* transformation will be +% current nonlinear transformation. The *linear* transformation will be % updated so that it translates things to the point to which the % nonlinear transformation transforms the origin. The nonlinear % transformation will be reset. -% +% % The net effect is that you can now draw things near the origin as % before, but with just a linear transformation in force. Note that % the coordinate system will not be rotated, only a shift is done (use @@ -81,7 +81,7 @@ \let\pgf@nlt@curveto\pgf@lt@curveto% \let\pgf@nlt@closepath\pgf@lt@closepath% \fi% -} +}% @@ -89,14 +89,14 @@ % % Description: % -% Does a "complete local syncronization" of the nonlinear +% Does a "complete local synchronization" of the nonlinear % transformation with the linear transformation. The *linear* % transformation will be updated so that it transforms things to the % point to which the nonlinear transformation transforms the % origin. The nonlinear transformation will be reset. -% +% % The net effect is that you can now draw things near the origin as -% before, but with just a linear transformation in force. +% before, but with just a linear transformation in force. \def\pgfapproximatenonlineartransformation{% \ifx\pgf@nlt@list\pgfutil@empty% @@ -119,35 +119,35 @@ \let\pgf@nlt@curveto\pgf@lt@curveto% \let\pgf@nlt@closepath\pgf@lt@closepath% \fi% -} +}% % Adds a non-linear transformation to the current list of -% transformations. +% transformations. % % #1 = code % % Description: % -% When the code #1 is called, \pgf@x and \pgf@y will be set to some +% When the code #1 is called, \pgf@x and \pgf@y will be set to some % values, let us call this the point p. The nonlinear transformation % will now map this point to a new point f(p). The coordinates of this -% point shoudl be returned in \pgf@x and \pgf@y. Furthermore, consider +% point should be returned in \pgf@x and \pgf@y. Furthermore, consider % the two "unit tangents" (going in $x$-direction and in -% $y$-direction) at point p. The nonlinear transformaiton will map +% $y$-direction) at point p. The nonlinear transformation will map % these to new tangents, t_x and t_y. The (not necessarily normalized) % vectors t_x and t_y should be returned in pgf@xa and -ya and pgf@xb % and pgf@yb. The macro should not do any global assignments except to % \pgf@x and \pgf@y, but may do arbitrary local assignments. -% +% % The effect of installing a new transformation is the following: As % long as there is at least one nonlinear transformation installed, % whenever the path construction commands add a curve or line to the % softpath, the line or curve will be "bend" by applying all of the % nonlinear transformation installed. In particular, straight lines % will be replaced by curves. -% +% % Note that the normal linear transformation are always applied before % any nonlinear transformations are applied. @@ -157,7 +157,7 @@ \let\pgf@nlt@lineto\pgf@nlt@lineto@nlt \let\pgf@nlt@curveto\pgf@nlt@curveto@nlt \let\pgf@nlt@closepath\pgf@nlt@closepath@nlt -} +}% \def\pgf@nlt@moveto@nlt#1#2{% {% @@ -177,7 +177,7 @@ \global\let\pgf@nlt@last@coord@xaxis\pgf@nlt@last@moveto@xaxis% \global\let\pgf@nlt@last@coord@yaxis\pgf@nlt@last@moveto@yaxis% }% -} +}% \def\pgf@nlt@lineto@nlt#1#2{% @@ -213,11 +213,11 @@ \pgf@nlt@inner@curve% \fi% }% -} +}% \def\pgf@nlt@set@temps#1#2{% \pgfutil@tempdima#1\pgfutil@tempdimb#2% -} +}% \def\pgf@nlt@curveto@nlt#1#2#3#4#5#6{% {% @@ -225,11 +225,11 @@ \pgf@temp% \pgf@nlt@inner@curve% }% -} +}% \newdimen\pgftransformnonlinearflatness \pgftransformnonlinearflatness=5pt -\def\pgfsettransformnonlinearflatness#1{\pgfmathsetlength\pgftransformnonlinearflatness{#1}} +\def\pgfsettransformnonlinearflatness#1{\pgfmathsetlength\pgftransformnonlinearflatness{#1}}% @@ -246,9 +246,9 @@ \advance\pgf@ya by-\pgf@y% \advance\pgf@xb by-\pgf@xc% \advance\pgf@yb by-\pgf@yc% - % + % % Now, test whether the flatness is satisfied: - % + % \pgfutil@tempswafalse \ifdim\pgfutil@tempdima>\pgftransformnonlinearflatness\pgfutil@tempswatrue\fi% \ifdim\pgfutil@tempdima<-\pgftransformnonlinearflatness\pgfutil@tempswatrue\fi% @@ -263,7 +263,7 @@ \ifdim\pgf@yb>\pgftransformnonlinearflatness\pgfutil@tempswatrue\fi% \ifdim\pgf@yb<-\pgftransformnonlinearflatness\pgfutil@tempswatrue\fi% \ifpgfutil@tempswa% - \endgroup% Undo the adjustmenst... + \endgroup% Undo the adjustments... {% \edef\pgf@orig@xya{\pgf@xa\the\pgf@xa\pgf@ya\the\pgf@ya} \edef\pgf@orig@xyb{\pgf@xb\the\pgf@xb\pgf@yb\the\pgf@yb} @@ -305,7 +305,7 @@ \endgroup% Snap back... \pgf@nlt@do@inner@curve% \fi% -} +}% \def\pgf@nlt@do@inner@curve{% \pgf@process{\pgf@x\pgf@xa\pgf@y\pgf@ya\pgf@nlt@list}% @@ -320,7 +320,7 @@ \pgf@protocolsizes{\pgf@xb}{\pgf@yb}% \pgf@protocolsizes{\pgf@xc}{\pgf@yc}% \pgfsyssoftpath@curveto{\the\pgf@xa}{\the\pgf@ya}{\the\pgf@xb}{\the\pgf@yb}{\the\pgf@xc}{\the\pgf@yc}% -} +}% \def\pgf@nlt@closepath@nlt{% @@ -336,7 +336,7 @@ \fi% \pgfsyssoftpath@closepath% }% -} +}% \endinput diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleoo.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleoo.code.tex index 1cd938af521..38ceef34cdc 100644 --- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleoo.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleoo.code.tex @@ -8,7 +8,7 @@ % % See the file doc/generic/pgf/licenses/LICENSE for more details. % -% Based on pgfmoduleoo.code.tex v1.8 by Till Tantau. This version adds inheritance. +% Based on pgfmoduleoo.code.tex v1.8 by Till Tantau. This version adds inheritance. @@ -66,7 +66,7 @@ }{% \pgfooclass@() }% -} +}% \long\def\pgfooclass@(#1)#2#3{% \def\pgfoo@classname{#2}% \expandafter\ifx\csname pgfooY\pgfoo@classname.@pgfooinit\endcsname\relax\else @@ -95,9 +95,9 @@ % Cleanup \let\method=\pgfoo@origmethod% \let\attribute=\pgfoo@origattribute% -} +}% -\def\pgfoo@emptyinit(){} +\def\pgfoo@emptyinit(){}% \def\pgfoo@escapeif#1#2\fi{\fi#1}% a little helper @@ -122,13 +122,13 @@ \fi }% % The final sequence is a sequence of base classes, in the order as - % they were given. + % they were given. \ifx\relax#2\relax\else \edef\pgfoo@seq{\pgfoo@seq[#2,].}% \fi \edef\pgfoo@temp{()(\pgfoo@seq)}% \expandafter\pgfoo@ciii@merge\pgfoo@temp -} +}% % #1 = MRO so far % #2 = remaining sequences @@ -140,19 +140,19 @@ \else\pgfoo@escapeif{% split #2 \pgfoo@ciii@merge@A(#1)(#2)% }\fi% -} +}% % a splitter: to be only called from \pgfoo@ciii@merge \def\pgfoo@ciii@merge@A(#1)(#2.#3){% \ifx\relax#3\relax % if #3 is empty, we can take the shortcut \pgfoo@ciii@mergeA@done(#1)(#2)% - \else\pgfoo@escapeif{% + \else\pgfoo@escapeif{% \pgfoo@ciii@merge@checkHead(#1)()(#2)()(#3)% }\fi -} +}% \def\pgfoo@ciii@mergeA@done(#1)([#2]){% \pgfoo@ciii@done(#1#2)% -} +}% % #1 = MRO so far % #2 = sequences with bad heads (dot after each sequence) @@ -165,21 +165,21 @@ \def\pgfoo@ciii@merge@checkHead(#1)(#2)([#3,#4])(#5)(#6){% \pgfutil@in@{[#3,}{#2}% \ifpgfutil@in@\pgfoo@escapeif{% #3 is already blacklisted - \pgfoo@ciii@clean\pgfoo@ciii@merge@checkHead@P{(#1)(#2[#3,#4].)(#5#6)}% + \pgfoo@ciii@clean\pgfoo@ciii@merge@checkHead@P{(#1)(#2[#3,#4].)(#5#6)}% }\else\pgfoo@escapeif{% - \ifx\relax#6\relax\pgfoo@escapeif{% no more sequences to test the head against! + \ifx\relax#6\relax\pgfoo@escapeif{% no more sequences to test the head against! % so, #3 is a good head, and we can recurse \pgfoo@ciii@goodHeadFound(#1)(#3)(#2[#4].#5)% }\else\pgfoo@escapeif{% split #6 and get to work \pgfoo@ciii@merge@checkHead@A(#1)(#2)([#3,#4])(#5)(#6)% }\fi }\fi -} +}% % splitter: to be only called from \pgfoo@ciii@merge@checkHead % we will check if #3 occurs in the tail of #6 \def\pgfoo@ciii@merge@checkHead@A(#1)(#2)([#3,#4])(#5)(#6.#7){% \pgfoo@ciii@merge@checkHead@B(#1)(#2)([#3,#4])(#5)(#6)(#7)% -} +}% % splitter: to be only called from \pgfoo@ciii@merge@checkHead@A % &worker: we will check if #3 occurs in #7. If it does, #3 is a bad head. \def\pgfoo@ciii@merge@checkHead@B(#1)(#2)([#3,#4])(#5)([#6,#7])(#8){% @@ -201,7 +201,7 @@ }\fi }\fi % }\fi -} +}% % #1 = MRO % #2 = good head @@ -223,7 +223,7 @@ \pgfoo@ciii@clean\pgfoo@ciii@merge{(#1#2,)(#3)}% }\fi }\fi -} +}% % mediates between the bad head exit of \pgfoo@ciii@merge@checkHead@B % and \pgfoo@ciii@merge@checkHead; we need the mediator because #3 @@ -235,12 +235,12 @@ \else\pgfoo@escapeif{% \pgfoo@ciii@merge@checkHead@Q(#1)(#2)(#3)% }\fi -} +}% % splitter for \pgfoo@ciii@merge@checkHead@P % #3 = the sequence containing the newest good head candidate \def\pgfoo@ciii@merge@checkHead@Q(#1)(#2)(#3.#4){% \pgfoo@ciii@merge@checkHead(#1)(#2)(#3)()(#4)% -} +}% % cyclically removes all occurrences of "[]," and "[]." (i.e., empty % sequences) in #2. When done, calls #1 with whatever remains. @@ -251,14 +251,14 @@ }\else\pgfoo@escapeif{% #1#2% }\fi -} +}% \def\pgfoo@ciii@clean@dot#1#2[].#3\pgfoo@ciii@clean@END{% \pgfoo@ciii@clean#1{#2#3}% -} +}% \def\pgfoo@ciii@done(#1,){% \def\pgfoo@mro{#1}% -} +}% % end of C3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -305,12 +305,12 @@ \fi \expandafter\long\expandafter\def\csname pgfooY\pgfoo@classname.\pgfoo@method\endcsname(#2){#3}% \edef\pgfoo@methods{\pgfoo@methods,\pgfoo@method}% -} +}% \def\pgfoo@inherit@methods{% % for non-derived classes: \expandafter\ifx\expandafter\relax\pgfoo@temp@baseclasses\relax - % if init is not defined, define an empty one + % if init is not defined, define an empty one \expandafter\ifx\csname pgfooY\pgfoo@classname.init\endcsname\relax \expandafter\let\csname pgfooY\pgfoo@classname.init\endcsname\pgfoo@emptyinit% \edef\pgfoo@methods{,init\pgfoo@methods}% @@ -323,7 +323,7 @@ % remember the list of collected methods \expandafter\let\csname pgfooY\pgfoo@classname @pgfoo@methods\endcsname\pgfoo@methods % get MRO - \expandafter\let\expandafter\pgfoo@mro\csname pgfooY\pgfoo@classname @pgfoo@mro\endcsname + \expandafter\let\expandafter\pgfoo@mro\csname pgfooY\pgfoo@classname @pgfoo@mro\endcsname % loop throough base classes in MRO \pgfutil@for\pgfoo@baseclass:=\pgfoo@mro\do{% \ifx\pgfoo@baseclass\pgfoo@classname % skip self @@ -332,7 +332,7 @@ \expandafter\let\expandafter\pgfoo@methods\csname pgfooY\pgfoo@baseclass @pgfoo@methods\endcsname \pgfutil@for\pgfoo@method:=\pgfoo@methods\do{% for each method % check if it is already defined in our class - \expandafter\ifx\csname pgfooY\pgfoo@classname.\pgfoo@method\endcsname\relax + \expandafter\ifx\csname pgfooY\pgfoo@classname.\pgfoo@method\endcsname\relax % if not, link the method name from our class to base class \edef\pgfoo@temp{\noexpand\let \expandafter\noexpand\csname pgfooY\pgfoo@classname.\pgfoo@method\endcsname @@ -342,7 +342,7 @@ }% }\fi }% -} +}% \def\pgfoosuper(#1,#2).#3({% #2.get id(\pgfoo@temp@id)% @@ -352,14 +352,14 @@ }% \expandafter\let\expandafter\pgfoo@mro\csname pgfooY\pgfoo@classname @pgfoo@mro\endcsname \expandafter\pgfoo@super@A\expandafter,\pgfoo@mro,.#3(% -} +}% \def\pgfoo@super@B#1,#2.#3({% \expandafter\ifx\csname pgfooY#1.#3\endcsname\relax \pgfoo@escapeif{\pgfoo@super@B#2.#3(}% \else \pgfoo@escapeif{\expandafter\pgfoo@caller\pgfoo@temp@id.#1.#3(}% \fi -} +}% @@ -384,18 +384,18 @@ \pgfoo@declareunpack#1;% \else% \pgfoo@declareattribute@\let{#1}\pgfutil@empty - \fi% - \fi% -} -\def\pgfoo@declareunpack#1=#2;{\pgfoo@declareattribute@\def{#1}{{#2}}} -\def\pgfoo@declareunpackspace#1 =#2;{\pgfoo@declareattribute@\def{#1}{{#2}}} + \fi% + \fi% +}% +\def\pgfoo@declareunpack#1=#2;{\pgfoo@declareattribute@\def{#1}{{#2}}}% +\def\pgfoo@declareunpackspace#1 =#2;{\pgfoo@declareattribute@\def{#1}{{#2}}}% % put the initial value in the class's namespace % put the attr name in a list \def\pgfoo@declareattribute@#1#2#3{% \expandafter#1\csname pgfooY\pgfoo@classname @#2\endcsname#3% \expandafter\def\expandafter\pgfoo@attributes\expandafter{\pgfoo@attributes,#2}% -} +}% % for each base class: % for each attribute declared in that class: @@ -411,14 +411,14 @@ \fi \expandafter\let\csname pgfooY\pgfoo@classname.@pgfoo@attributes\endcsname\pgfoo@attributes% % get MRO - \expandafter\let\expandafter\pgfoo@mro\csname pgfooY\pgfoo@classname @pgfoo@mro\endcsname + \expandafter\let\expandafter\pgfoo@mro\csname pgfooY\pgfoo@classname @pgfoo@mro\endcsname \def\pgfoo@allattributes{}% here we will store the attrs declared in base classes \pgfutil@for\pgfoo@baseclass:=\pgfoo@mro\do{% for each base class in MRO order % the attributes declared in this base class \expandafter\let\expandafter\pgfoo@attributes\csname pgfooY\pgfoo@baseclass.@pgfoo@attributes\endcsname \pgfutil@for\pgfoo@attribute:=\pgfoo@attributes\do{% for each attribute % check if we have already found it in some previous base class - \edef\pgfoo@temp{{,\pgfoo@attribute=}{\pgfoo@allattributes,}} + \edef\pgfoo@temp{{,\pgfoo@attribute=}{\pgfoo@allattributes,}}% \expandafter\pgfutil@in@\pgfoo@temp \ifpgfutil@in@\else % don't overwrite % append to the list @@ -430,14 +430,14 @@ \edef\pgfoo@allattributes{\expandafter\pgfutil@gobble\pgfoo@allattributes}% gobble comma \fi % this macro will hold a list of attributes from all base classes - % we run this macro at init and gc - \def\pgfoo@process@attributes{} + % we run this macro at init and gc + \def\pgfoo@process@attributes{}% \pgfutil@for\pgfoo@attributeclass:=\pgfoo@allattributes\do{% for each (attribute, class) pair % append to the attribute processor \expandafter\pgfoo@inherit@attributes@appendattribute\pgfoo@attributeclass.% }% \expandafter\let\csname pgfooY\pgfoo@classname .@pgfoo@process@attributes\endcsname\pgfoo@process@attributes -} +}% % #1=attr, #2=class which the attr comes from @@ -449,10 +449,10 @@ % \def\pgfoo@process@attributes{\pgfoo@process@attributes\pgfoo@attribute@op{#1}% % \csname pgfooY#2@#1\endcsname} % with \pgfoo@process@attributes and \csname expanded exactly once: -} +}% -% \pgfoo@attribute@op for garbace collection -\def\pgfoo@gc@attribute#1#2{\pgfoolet{#1}\relax} +% \pgfoo@attribute@op for garbage collection +\def\pgfoo@gc@attribute#1#2{\pgfoolet{#1}\relax}% \newcount\pgfoo@objectcount @@ -467,7 +467,7 @@ \def\pgfoovalueof#1{% \csname pgfooX\the\pgfoothis@count @#1\endcsname% -} +}% % The attribute get method @@ -480,7 +480,7 @@ \def\pgfooget#1#2{% \expandafter\let\expandafter#2\csname pgfooX\the\pgfoothis@count @#1\endcsname% -} +}% % The attribute set method @@ -493,7 +493,7 @@ \long\def\pgfooset#1#2{% \expandafter\gdef\csname pgfooX\the\pgfoothis@count @#1\endcsname{#2}% -} +}% % The attribute set method (expanded version) @@ -506,7 +506,7 @@ \long\def\pgfooeset#1#2{% \expandafter\xdef\csname pgfooX\the\pgfoothis@count @#1\endcsname{#2}% -} +}% % The attribute let method @@ -519,7 +519,7 @@ \def\pgfoolet#1#2{% \expandafter\global\expandafter\let\csname pgfooX\the\pgfoothis@count @#1\endcsname#2% -} +}% % Add something to an attribute at the end @@ -533,7 +533,7 @@ \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\pgf@oo@temp\expandafter\expandafter\expandafter{\csname pgfooX\the\pgfoothis@count @#1\endcsname#2}% \expandafter\global\expandafter\let\csname pgfooX\the\pgfoothis@count @#1\endcsname\pgf@oo@temp% -} +}% % Add something to an attribute at the beginning @@ -550,7 +550,7 @@ \expandafter\expandafter\expandafter\pgf@oo@temp% \expandafter\expandafter\expandafter{\expandafter\pgf@oo@@temp\pgf@oo@temp}% \pgfoolet{#1}\pgf@oo@temp% -} +}% @@ -559,14 +559,14 @@ \def\pgfoo@collect@args{% \pgfutil@ifnextchar\bgroup\pgfoo@collect@args@group\pgfoo@collect@args@nogroup% -} +}% \def\pgfoo@collect@args@nogroup#1){% \pgfoo@toks{#1}% \pgfoo@continue% -} +}% \def\pgfoo@collect@args@group#1{% \pgfutil@ifnextchar){\pgfoo@toks{{#1}}\expandafter\pgfoo@continue\pgfutil@gobble}{\pgfoo@collect@args@nogroup{#1}}% -} +}% % Instantiate an object @@ -594,11 +594,11 @@ \pgfoo@new% }% }% -} +}% \def\pgfoo@new#1={% \def\pgfutil@reserved@a{#1}% \let\pgfutil@next\pgfoo@@new - \futurelet\pgfutil@let@token\pgfutil@ignorespaces} + \futurelet\pgfutil@let@token\pgfutil@ignorespaces}% \def\pgfoo@@new new #1({% \expandafter\ifx\csname pgfooY#1.get id\endcsname\relax% \pgferror{Unknown class '#1'}% @@ -612,17 +612,17 @@ \let\pgfoo@continue=\pgf@oo@new@cont% \expandafter\pgfoo@collect@args% \fi% -} +}% \def\pgf@oo@new@cont{% \expandafter\pgfoolastobj\expandafter.\expandafter i\expandafter n\expandafter i\expandafter t\expandafter(\the\pgfoo@toks)% \aftergroup\pgfoogc% cleanup after group -} +}% \def\pgfoo@new@attribute#1={% \def\pgfutil@reserved@a{#1}% \let\pgfutil@next\pgfoo@@new@attribute - \futurelet\pgfutil@let@token\pgfutil@ignorespaces} + \futurelet\pgfutil@let@token\pgfutil@ignorespaces}% \def\pgfoo@@new@attribute new #1({% \expandafter\ifx\csname pgfooY#1.get id\endcsname\relax% \pgferror{Unknown class '#1'}% @@ -637,14 +637,14 @@ \let\pgfoo@continue=\pgf@oo@new@cont% \expandafter\pgfoo@collect@args% \fi% -} +}% \def\pgfoo@new@create#1#2{% \advance\pgfoo@objectcount by 1\relax% \edef\pgfoolastobj{\noexpand\pgfoo@caller{\the\pgfoo@objectcount}}% \expandafter\gdef\csname pgfooX\the\pgfoo@objectcount @class\endcsname{#2}% \let#1\pgfoolastobj% -} +}% \def\pgfoo@caller#1.#2({% \expandafter\let\expandafter\pgfoo@caller@temp\csname pgfooY\csname pgfooX#1@class\endcsname.#2\endcsname% @@ -654,20 +654,20 @@ \ifx\pgfoo@caller@temp\relax% \pgferror{Object #1 has no method '#2'}% \fi% - \fi% + \fi% \def\pgf@marshal{% \pgfoothis@count=#1\relax% }% \let\pgfoo@continue\pgfoo@caller@cont% \pgfoo@collect@args% -} +}% \def\pgfoo@caller@cont{% \edef\pgf@marshal{% \pgf@marshal% \noexpand\pgfoo@caller@temp(\the\pgfoo@toks)% }% \expandafter\pgf@marshal\expandafter\pgfoothis@count\the\pgfoothis@count\relax% -} +}% \let\pgfoo@orig@caller=\pgfoo@caller % The special "this" object @@ -680,10 +680,10 @@ \fi% \let\pgfoo@continue\pgfoothis@cont% \pgfoo@collect@args% -} +}% \def\pgfoothis@cont{% \expandafter\pgfoo@caller@temp\expandafter(\the\pgfoo@toks)% -} +}% @@ -699,7 +699,7 @@ \def\pgfoo@id(#1){% \edef#1{\the\pgfoothis@count}% -} +}% % Yields the object with the given id % @@ -712,7 +712,7 @@ \def\pgfooobj#1{% \pgfoo@caller{#1}% -} +}% % Get the object @@ -729,7 +729,7 @@ \def\pgfoo@obj(#1){% \edef#1{\noexpand\pgfoo@caller{\the\pgfoothis@count}}% -} +}% @@ -737,10 +737,10 @@ % % Description: % -% This method frees space ocupied by unused objects. Garbage are +% This method frees space occupied by unused objects. Garbage are % objects that have been destroyed because of the end of the scope in % which they were created. In this case, however, the memory used by -% this object is not immediately reused because the attributes of the +% this object is not immediately reused because the attributes of the % object are actually stored in global variables. When the garbage % collector is called, it will set all these global variables to % \relax, thereby ensuring that no memory is needed for them. @@ -752,7 +752,7 @@ \let\pgfoo@next=\pgfoo@dogc% \pgfoo@next% }% -} +}% \def\pgfoo@dogc{% \advance\pgfoothis@count by 1\relax% \expandafter\ifx\csname pgfooX\the\pgfoothis@count @class\endcsname\relax% @@ -765,8 +765,8 @@ \expandafter\global\expandafter\let\csname pgfooX\the\pgfoothis@count @class\endcsname\relax% \fi% \pgfoo@next% -} - +}% + % @@ -786,10 +786,10 @@ \expandafter\let\csname pgfooX\the\pgfoo@objectcount @##1\endcsname\pgfoo@attrvalue }% \let\pgfoo@attribute@op\pgfoo@copy@attributes - \csname pgfooY\pgfoo@temp@classname .@pgfoo@process@attributes\endcsname + \csname pgfooY\pgfoo@temp@classname .@pgfoo@process@attributes\endcsname \aftergroup\pgfoogc% cleanup after group - } -} + }% +}% % @@ -799,7 +799,7 @@ % \pgfooclass{signal} -{ +{% % % This class implements signals. % @@ -808,35 +808,35 @@ % called, all connected methods get called. % Attribute - \attribute emitter; + \attribute emitter;% % Collects the objects that should be called. - + % Constructor - \method signal() {} + \method signal() {}% % Connect a slot (method) #2 of object #1 \method connect(#1,#2) {% {% #1.get id(\pgf@tempid)% - % Save in emmiter + % Save in emitter \pgfooget{emitter}\pgf@temp% \let\pgfoo@signal@call=\relax% avoid expansion \edef\pgf@temp{\pgf@temp\pgfoo@signal@call{\pgf@tempid}{#2}}% \pgfoolet{emitter}\pgf@temp% }% - } + }% \def\pgfoo@signal@call#1#2{% \def\pgf@temp{\pgfooobj{#1}.#2}% \expandafter\pgf@temp\expandafter(\pgfoo@signal@args)% - } - + }% + % Emit a signal \method emit(#1) {% \def\pgfoo@signal@args{#1}% \pgfoovalueof{emitter} - } -} + }% +}% diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleparser.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleparser.code.tex index 5c248ad9f56..39f20dc74d3 100644 --- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleparser.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleparser.code.tex @@ -31,10 +31,10 @@ \def\pgf@parser{#1}% \def\pgf@parser@state{initial}% \pgf@parser@parse% -} +}% \def\pgf@parser@parse{% \futurelet\pgf@parser@symbol\pgf@parser@cont% -} +}% \def\pgf@parser@cont{% % Ok, defined? \expandafter\let\expandafter\pgf@parser@action% @@ -52,9 +52,9 @@ \ifx\pgf@parser@symbol\pgfutil@sptoken% \expandafter\pgf@parser@rid@space% \else% - \expandafter\pgf@parser@rid@other% + \expandafter\pgf@parser@rid@other% \fi% -} +}% \def\pgf@parser@ridded{% \ifx\pgf@parser@state\pgf@parser@final@text% @@ -62,50 +62,50 @@ \else% \expandafter\pgf@parser@parse% \fi% -} +}% -\def\pgf@parser@final@text{final} +\def\pgf@parser@final@text{final}% {% - \def\:{\pgf@parser@rid@space} \expandafter\gdef\: {\futurelet\pgf@parser@ignore\pgf@parser@ridded} - \gdef\pgf@parser@rid@other{\afterassignment\pgf@parser@ridded\let\pgf@parser@ignore=} -} + \def\:{\pgf@parser@rid@space} \expandafter\gdef\: {\futurelet\pgf@parser@ignore\pgf@parser@ridded}% + \gdef\pgf@parser@rid@other{\afterassignment\pgf@parser@ridded\let\pgf@parser@ignore=}% +}% % Switches the state -% +% % #1 = new state -% +% % Description: -% +% % This command can be used inside a state action to switch to a % different state. -\def\pgfparserswitch#1{\def\pgf@parser@state{#1}} +\def\pgfparserswitch#1{\def\pgf@parser@state{#1}}% % Defines an action to be taken in a state for some symbol -% +% % #1 = parser % #2 = state % #3 = symbol text (result of saying \meaning on the symbol) % #4 = action -% +% % Description: -% +% % When the parser encounters #3 while being in state #2, then code #4 % is executed. -% +% % When #2 is set to the special text "all", then the symbol is handled % in all states by #4, except when a state defines something special % for this symbol \def\pgfparserdef#1#2#3#4{% \expandafter\def\csname pgf@parser@a@#1@#2@#3\endcsname{#4} -} +}% \endinput diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex index 6c548160b26..1a553f925c1 100644 --- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex @@ -39,12 +39,12 @@ % default. Rather, to ``use'' such a stream, you must first install a % stream handler. For example, the ``lineto'' handler will simply % basically every \pgfplotstreampoint into a \pgfpathlineto. -% +% % One special things is the handling of "jumps" in a stream. For % instance, when a lineto handler encounters an "outlier" or a new % data set, the current line should end and a new subpath should start % (unless configured otherwise). For this, the special jump handler is -% important. +% important. % % Example: % @@ -62,17 +62,17 @@ % The stream commands actually call their ``internal'' versions, which % are set by the handlers: -\def\pgfplotstreamstart{\pgf@plotstreamstart} -\def\pgfplotstreampoint#1{\gdef\pgfplotlastpoint{#1}\pgf@plotstreampoint{#1}} -\def\pgfplotstreampointoutlier#1{\pgfplot@outliers{}{\pgf@plotstreamjump}{\pgfplotstreampoint{#1}}}% -\def\pgfplotstreampointundefined{\pgfplot@outliers{}{\pgf@plotstreamjump}{}}% -\def\pgfplotstreamnewdataset{\pgfplot@outliers{}{\pgf@plotstreamjump}{}}% -\def\pgfplotstreamspecial{\pgf@plotstreamspecial} -\def\pgfplotstreamend{\pgf@plotstreamend} - -\def\pgfplot@ignorer#1#2#3{#1} -\def\pgfplot@jumper#1#2#3{#2} -\def\pgfplot@plotter#1#2#3{#3} +\def\pgfplotstreamstart{\pgf@plotstreamstart}% +\def\pgfplotstreampoint#1{\gdef\pgfplotlastpoint{#1}\pgf@plotstreampoint{#1}}% +\def\pgfplotstreampointoutlier#1{\pgfplot@outliers{}{\pgf@plotstreamjump}{\pgfplotstreampoint{#1}}}% +\def\pgfplotstreampointundefined{\pgfplot@outliers{}{\pgf@plotstreamjump}{}}% +\def\pgfplotstreamnewdataset{\pgfplot@outliers{}{\pgf@plotstreamjump}{}}% +\def\pgfplotstreamspecial{\pgf@plotstreamspecial}% +\def\pgfplotstreamend{\pgf@plotstreamend}% + +\def\pgfplot@ignorer#1#2#3{#1}% +\def\pgfplot@jumper#1#2#3{#2}% +\def\pgfplot@plotter#1#2#3{#3}% \let\pgfplot@outliers\pgfplot@jumper \let\pgfplot@undefined\pgfplot@jumper @@ -89,7 +89,7 @@ handle new data sets in plots/.is choice, handle new data sets in plots/ignore/.code=\let\pgfplot@newdata\pgfplot@ignorer, handle new data sets in plots/jump/.code=\let\pgfplot@newdata\pgfplot@jumper, -} +}% % Declares a new plot handler @@ -99,11 +99,11 @@ % #3 = keys as described below % % Description: -% +% % When you declare a new plot handler, you provide, through keys, % different "actions" that should be taken when the different stream % commands are used: -% +% % start = some code to be executed when \pgfplotstreamstart is called % for this plothandler % end = same for the end of the stream @@ -118,7 +118,7 @@ % special macro = see above % % Example: -% +% % \pgfdeclareplothandler{\ultrasimplehandler}{}{ % point=\pgfpathlineto{##1} % } @@ -135,7 +135,7 @@ #3% }% }% -} +}% \pgfkeys{% /pgf/plots/@handler options/.cd, @@ -165,7 +165,7 @@ jump macro/.code=\global\let\pgf@plotstreamjump@init#1, special/.code=\gdef\pgf@plotstreamspecial@init##1{#1}, special macro/.code=\global\let\pgf@plotstreamspecial@init#1, -} +}% \newif\ifpgf@plot@started @@ -178,13 +178,13 @@ % % For certain handlers it makes sense either the start a plot by % moving to the first point of the plot or to do a lineto to that -% first point. Using this command this action can be set to a lineto. +% first point. Using this command this action can be set to a lineto. % % Example: % % \pgfsetlinetofirstplotpoint -\def\pgfsetlinetofirstplotpoint{\let\pgf@plot@first@action=\pgfpathlineto} +\def\pgfsetlinetofirstplotpoint{\let\pgf@plot@first@action=\pgfpathlineto}% % Sets the action taken for the first point of a plot to a moveto. @@ -193,7 +193,7 @@ % % \pgfsetmovetofirstplotpoint -\def\pgfsetmovetofirstplotpoint{\let\pgf@plot@first@action=\pgfpathmoveto} +\def\pgfsetmovetofirstplotpoint{\let\pgf@plot@first@action=\pgfpathmoveto}% \let\pgf@plot@first@action=\pgfpathmoveto @@ -208,7 +208,7 @@ % This handler converts each plot stream command into a lineto % command, except for the first, which is converted to the action that % has previously been specified using \pgfsetlinetofirstplotpoint or -% \pgfsetmovetofirstplotpoint. +% \pgfsetmovetofirstplotpoint. % % Example: % @@ -218,17 +218,17 @@ \pgfdeclareplothandler{\pgfplothandlerlineto}{}{ point macro=\pgf@plot@line@handler, jump=\global\let\pgf@plotstreampoint\pgf@plot@line@handler@move% -} +}% \def\pgf@plot@line@handler#1{% \pgf@plot@first@action{#1}% \global\let\pgf@plotstreampoint=\pgfpathlineto% -} +}% \def\pgf@plot@line@handler@move#1{% \pgfpathmoveto{#1}% \global\let\pgf@plotstreampoint=\pgfpathlineto% -} +}% @@ -252,21 +252,21 @@ \pgfpathmoveto{#1}% \global\pgf@plot@startedtrue% \global\let\pgf@plotstreampoint=\pgfpathlineto% -} +}% \def\pgf@plot@polygon@stop{% \ifpgf@plot@started% \pgfpathclose% \fi% \global\pgf@plot@startedfalse% -} +}% \def\pgf@plot@next@close@and@moveto{% \ifpgf@plot@started% \pgfpathclose% \fi% \global\let\pgf@plotstreampoint\pgf@plot@line@handler@close% -} +}% % More handlers are defined in pgflibraryplothandlers @@ -282,13 +282,13 @@ % \pgfplothandlerdiscard % \pgfplotxyfile{mytable} -\pgfdeclareplothandler{\pgfplothandlerdiscard}{}{} +\pgfdeclareplothandler{\pgfplothandlerdiscard}{}{}% % This handler records each plot stream command to a macro. This is % useful if plot commands are difficult to generate and need to be -% ``recylced'' later on. +% ``recycled'' later on. % % Example: % @@ -305,7 +305,7 @@ jump=\expandafter\gdef\expandafter#1\expandafter{#1\pgf@plotstreamjump}, special=\expandafter\gdef\expandafter#1\expandafter{#1\pgfplotstreamspecial{##1}}, end=\expandafter\gdef\expandafter#1\expandafter{#1\pgfplotstreamend}, -} +}% @@ -338,12 +338,12 @@ \catcode`\^^M=5 \pgf@readxyfile% \fi - \pgfplotstreamend% + \pgfplotstreamend% \endgroup% -} +}% -\let\pgf@savedpar=\par% -\def\pgf@partext{\par} +\let\pgf@savedpar=\par +\def\pgf@partext{\par}% \def\pgf@readxyfile{% \pgfutil@read\r@pgf@reada to \pgf@temp% \let\par=\pgf@savedpar% @@ -362,7 +362,7 @@ \expandafter\pgf@parsexyline\pgf@temp\pgf@stop% \fi\fi% \ifeof\r@pgf@reada\else\expandafter\pgf@readxyfile\fi% -} +}% \def\pgf@parsexyline#1 #2 #3\pgf@stop{% \def\b@pgfplotsxyfile@scanning@for@first{0}% @@ -374,7 +374,7 @@ \else% \pgfplotstreampoint{\pgfpointxy{#1}{#2}}% \fi\fi% -} +}% \edef\pgf@xyline@flag@out{o\space}% \edef\pgf@xyline@flag@undef{u\space}% @@ -389,7 +389,7 @@ % File format: % % Like xy, except that each line contains three numbers, which are -% converted to xyz coordiantes. +% converted to xyz coordinates. % % Example: % @@ -406,9 +406,9 @@ \catcode`\^^M=5 \pgf@readxyzfile% \fi - \pgfplotstreamend% + \pgfplotstreamend% \endgroup% -} +}% \def\pgf@readxyzfile{% \pgfutil@read\r@pgf@reada to \pgf@temp% @@ -426,7 +426,7 @@ \expandafter\pgf@parsexyzline\pgf@temp\pgf@stop% \fi\fi% \ifeof\r@pgf@reada\else\expandafter\pgf@readxyzfile\fi% -} +}% \def\pgf@parsexyzline#1 #2 #3 #4\pgf@stop{% \def\b@pgfplotsxyfile@scanning@for@first{0}% @@ -438,7 +438,7 @@ \else% \pgfplotstreampoint{\pgfpointxyz{#1}{#2}{#3}}% \fi\fi% -} +}% @@ -461,19 +461,19 @@ % \pgfplothandlerlineto % \pgfplotgnuplot[\jobname]{plot [x=0:5] x*sin(x)} -{ +{% \catcode`\%=12 \catcode`\"=12 \xdef\pgf@gnuplot@head{set table \noexpand\pgf@plottablefile@quoted; set format "%.5f"} -} +}% \let\pgf@plotwrite=\w@pgf@writea \newif\ifpgf@resample@plot \pgfkeys{% - /pgf/plot/gnuplot call/.initial={gnuplot}} + /pgf/plot/gnuplot call/.initial={gnuplot}}% -\def\pgfplotgnuplot{\pgfutil@ifnextchar[{\pgf@plotgnuplot}{\pgf@plotgnuplot[\jobname]}}%} +\def\pgfplotgnuplot{\pgfutil@ifnextchar[{\pgf@plotgnuplot}{\pgf@plotgnuplot[\jobname]}}%}% \def\pgf@plotgnuplot[#1]#2{% \pgf@resample@plottrue% \pgfutilpreparefilename{#1.gnuplot}% @@ -487,18 +487,18 @@ \else% \pgfutil@read\pgfutil@inputcheck to\pgf@temp% ignored \pgfutil@read\pgfutil@inputcheck to\pgf@plot@line% - \closein\pgfutil@inputcheck + \closein\pgfutil@inputcheck \edef\pgf@plot@code{#2\space}% \ifx\pgf@plot@code\pgf@plot@line% \openin\pgfutil@inputcheck=\pgfretval\relax \ifeof\pgfutil@inputcheck% \else% - \closein\pgfutil@inputcheck + \closein\pgfutil@inputcheck \pgf@resample@plotfalse% \fi% \fi% \fi - \ifpgf@resample@plot% + \ifpgf@resample@plot% \immediate\openout\pgf@plotwrite=\pgf@plotgnuplotfile\relax \immediate\pgfutil@write\pgf@plotwrite{\pgf@gnuplot@head}% \immediate\pgfutil@write\pgf@plotwrite{#2}% @@ -510,7 +510,7 @@ % \let\pgf@parsexyline=\pgf@parsegnuplotxyline% \pgfplotxyfile{\pgf@plottablefile}% % \let\pgf@parsexyline=\pgf@savedparsexyline% -} +}% % \def\pgf@parsegnuplotxyline#1 #2 #3\pgf@stop{% % \edef\pgf@xyline@flag@val{#3}% @@ -523,7 +523,7 @@ % \else% % \pgfplotstreampoint{\pgfpointxy{#1}{#2}}% % \fi\fi% -% } +% }% % This producer handler plots a function using pgf's mathematical engine. % @@ -553,7 +553,7 @@ \pgf@marshal% } \pgfplotstreamend% -} +}% diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex index 71a3876da32..5dcea56c02e 100644 --- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex @@ -57,7 +57,7 @@ \pgf@y=-\pgf@y% }% \expandafter\pgfsavepgf@process\csname pgf@sh@sa@#3\endcsname{% - \pgf@sh@reanchor{#1}{#2}% FIXME : this is double work! + \pgf@sh@reanchor{#1}{#2}% FIXME : this is double work! }% % Save the saved points and the transformation matrix \edef\pgf@node@name{#3}% @@ -114,7 +114,7 @@ \fi% }% }% -} +}% \let\pgf@outer@adjust@hook\relax \def\pgf@shapes@late@pos@begin{% @@ -127,8 +127,8 @@ \setbox\pgfpositionnodelaterbox=\hbox% \bgroup% \pgfsys@beginscope% -} - +}% + \def\pgf@shapes@late@pos@end{% \pgfsys@endscope% \egroup% Close box @@ -146,8 +146,8 @@ \let\pgfpositionnodelatername=\pgf@node@name% \pgf@positionnodelater@macro% \endpgfinterruptboundingbox% -} - +}% + \def\pgf@shift@node#1#2{% % This internal command shifts the recorded coordinates for node #1 % by the vector #2. It is used to @@ -161,7 +161,7 @@ \pgfgettransform{\pgf@temp}% \expandafter\xdef\csname pgf@sh@nt@#1\endcsname{\pgf@temp}% }% -} +}% @@ -195,7 +195,7 @@ }% \pgfmultipartnode{#1}{#2}{#4}{#5}% } -} +}% @@ -219,13 +219,13 @@ % is not relevant for the picture's bounding box, but a bounding box % for the node is computed and stored in the macros % \pgfpositionnodelaterboundboxminx to -% \pgfpositionnodelaterboundboxmaxy. Finally, the +% \pgfpositionnodelaterboundboxmaxy. Finally, the % macro #1 is called with the following macros setup: -% +% % \pgfpositionnodelaterbox % A box register (box 0 by default) that stores the node's paths and % texts. You should move the contents of this box to a box of your -% choice. +% choice. % % \pgfpositionnodelatername % The name of the just-created-node. This name will be the @@ -238,14 +238,14 @@ % \pgfpositionnodelatermaxy % These four macros store the bounding box as dimensions that are % guarenteed to end with "pt". -% +% % By setting #1 to \relax (which is the default), you can switch off % the whole mechanism -% +% % Once a late node has been created, you can add arbitrary code in the % same picture. Then, at some later point, you call % \pgfpositionnodenow to finally position the node at a given position. -% +% % When \pgfpositionnodenow is called, the macros mentioned above % should have the exact same values they had when #1 is called. @@ -256,10 +256,10 @@ \else% \pgflatenodepositioningtrue% \fi% -} +}% \newif\ifpgflatenodepositioning -\pgfpositionnodelater{\relax} -\def\pgfpositionnodelaterbox{0} +\pgfpositionnodelater{\relax}% +\def\pgfpositionnodelaterbox{0}% @@ -267,7 +267,7 @@ % Position a node that has been scheduled for later insertion % % #1 = position in the picture, where the original anchor should go, -% now +% now % % Description: % @@ -300,25 +300,25 @@ }% % Late setup% {% - \csname pgf@lns@\pgfpositionnodelatername\endcsname% - \expandafter\global\expandafter\let\csname pgf@lns@\pgfpositionnodelatername\endcsname\relax% + \csname pgf@lns@\pgfpositionnodelatername\endcsname% + \expandafter\global\expandafter\let\csname pgf@lns@\pgfpositionnodelatername\endcsname\relax% }% \endpgfinterruptpath% -} +}% \def\pgfpositionnodenow@rename not yet positionedPGFINTERNAL#1\relax{% \pgfnoderename{#1}{not yet positionedPGFINTERNAL#1} \pgf@nodecallback{#1}% -} +}% -% "Fake" a node -% +% "Fake" a node +% % #1 = node name -% +% % Description: -% +% % This command will setup things so that it "looks like" a node named % #1 has been created, but, in reality, no node is created. The idea % is that a node created in this way can be referenced by systems @@ -332,7 +332,7 @@ \expandafter\gdef\csname pgf@sh@nt@\pgf@temp\endcsname{{1}{0}{0}{1}{0pt}{0pt}}% \expandafter\global\expandafter\let\csname pgf@sh@ma@\pgf@temp\endcsname\pgfutil@empty% \expandafter\xdef\csname pgf@sh@pi@\pgf@temp\endcsname{\pgfpictureid}% -} +}% @@ -356,7 +356,7 @@ \expandafter\pgfutil@g@addto@macro\csname pgf@lns@not yet positionedPGFINTERNAL#1\endcsname{#2}% \fi% \fi% -} +}% @@ -382,19 +382,19 @@ \pgf@node@gnamelet{pgf@sh@pi@#1}{pgf@sh@pi@#2}% \pgf@node@gnamelet{pgf@sh@ma@#1}{pgf@sh@ma@#2}% \pgf@nodecallback{#1}% -} +}% \def\pgf@node@gnamelet#1#2{% \expandafter\let\expandafter\pgf@temp\csname #2\endcsname% \expandafter\global\expandafter\let\csname #1\endcsname=\pgf@temp% -} +}% % Rename a node -% +% % #1 = new name % #2 = old name -% +% % Description: -% +% % Renames a node. This is like an alias, only the memory used for the % old name is freed. @@ -405,7 +405,7 @@ \expandafter\global\expandafter\let\csname pgf@sh@nt@#2\endcsname\relax \expandafter\global\expandafter\let\csname pgf@sh@pi@#2\endcsname\relax \expandafter\global\expandafter\let\csname pgf@sh@ma@#2\endcsname\relax -} +}% @@ -440,7 +440,7 @@ \expandafter\xdef\csname pgf@sh@pi@#1\endcsname{\pgfpictureid}% \fi% \fi% -} +}% \def\pgf@sh@redeferredanchor#1#2{% CJ \expandafter\gdef\csname pgf@anchor@\pgf@sm@shape@name @#1\endcsname{#2}}% CJ @@ -457,7 +457,7 @@ \noexpand\def\noexpand#1{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% }}% \pgf@sh@marshal% -} +}% \def\pgf@sh@resaveddimen#1#2{% @@ -467,36 +467,36 @@ \noexpand\def\noexpand#1{\the\pgf@x}% }}% \pgf@sh@marshal% -} +}% \def\pgf@sh@resavedmacro#1#2{% - \let#1\pgfutil@empty% - \def\addtosavedmacro##1{% - \expandafter\def\expandafter\pgf@sh@addtomacro@temp\expandafter{#1\noexpand\def\noexpand##1{##1}}% - {\expandafter\pgfutil@toks@\expandafter{\pgf@sh@addtomacro@temp}\expandafter}% - \expandafter\def\expandafter#1\expandafter{\the\pgfutil@toks@}% - }% + \let#1\pgfutil@empty% + \def\addtosavedmacro##1{% + \expandafter\def\expandafter\pgf@sh@addtomacro@temp\expandafter{#1\noexpand\def\noexpand##1{##1}}% + {\expandafter\pgfutil@toks@\expandafter{\pgf@sh@addtomacro@temp}\expandafter}% + \expandafter\def\expandafter#1\expandafter{\the\pgfutil@toks@}% + }% #2\relax% \edef\pgf@sh@marshal{% \noexpand\pgfutil@g@addto@macro\noexpand\pgf@sh@savedmacros{% \noexpand\def\noexpand#1{#1}% }}% \pgf@sh@marshal% -} +}% % Invoke an anchor \def\pgf@sh@reanchor#1#2{% \pgfutil@ifundefined{pgf@anchor@#1@#2}% {% \pgfutil@ifundefined{pgf@anchor@generic@#2}{% - \pgfmathsetcounter{pgf@counta}{#2}% - \csname pgf@anchor@#1@border\endcsname{\pgfqpointpolar{\the\c@pgf@counta}{1pt}}% + \pgfmathsetcounter{pgf@counta}{#2}% + \csname pgf@anchor@#1@border\endcsname{\pgfqpointpolar{\the\c@pgf@counta}{1pt}}% }{% \csname pgf@anchor@generic@#2\endcsname{#1}% }% }% {\csname pgf@anchor@#1@#2\endcsname}% -} +}% % Defines a generic anchor, i.e. one which gets the associated shape % as first argument. @@ -556,7 +556,7 @@ \pgf@pos@transform@glob% }% }% -} +}% \def\pgf@shape@interpictureshift#1{% \expandafter\ifx\csname pgf@sh@pi@#1\endcsname\pgfpictureid% @@ -574,7 +574,7 @@ \pgf@x=\pgf@xa% \pgf@y=\pgf@ya% \fi% -} +}% @@ -631,7 +631,7 @@ \pgf@pos@transform@glob% }% }% -} +}% % Retrieve the list of node parts of a shape @@ -651,7 +651,7 @@ \def\pgfgetnodeparts#1#2{% \expandafter\let\expandafter#1\csname pgf@sh@boxes@#2\endcsname% -} +}% % Declares a shape type @@ -713,16 +713,16 @@ % will be placed at the anchor XYZ. % By default, \nodeparts is just {text}. Thus, there will be one % node part box named \pgfnodeparttextbox and this node will be -% placed at the anchor text. -% +% placed at the anchor text. +% % % Example: % % See the definition of rectangle, below. \long\def\pgfdeclareshape#1#2{% - { - \def\pgf@sm@shape@name{#1} + {% + \def\pgf@sm@shape@name{#1}% \let\savedanchor=\pgf@sh@savedanchor \let\saveddimen=\pgf@sh@saveddimen \let\savedmacro=\pgf@sh@savedmacro% MW @@ -750,96 +750,96 @@ \anchor{text}{\pgfpointorigin}% \nodeparts{text}% \expandafter\global\expandafter\let\csname pgf@sh@s@\pgf@sm@shape@name\endcsname=\pgfutil@empty% - #2 - } -} + #2% + }% +}% \def\pgf@sh@savedanchor#1#2{% - \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@\pgf@sm@shape@name\endcsname{\pgf@sh@resavedanchor{#1}{#2}}} + \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@\pgf@sm@shape@name\endcsname{\pgf@sh@resavedanchor{#1}{#2}}}% \def\pgf@sh@saveddimen#1#2{% - \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@\pgf@sm@shape@name\endcsname{\pgf@sh@resaveddimen{#1}{#2}}} + \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@\pgf@sm@shape@name\endcsname{\pgf@sh@resaveddimen{#1}{#2}}}% \def\pgf@sh@savedmacro#1#2{% MW \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@\pgf@sm@shape@name\endcsname{\pgf@sh@resavedmacro{#1}{#2}}}% MW -\def\pgf@sh@anchor#1#2{\expandafter\gdef\csname pgf@anchor@\pgf@sm@shape@name @#1\endcsname{#2}} +\def\pgf@sh@anchor#1#2{\expandafter\gdef\csname pgf@anchor@\pgf@sm@shape@name @#1\endcsname{#2}}% \def\pgf@sh@deferredanchor#1#2{% CJ \expandafter\pgfutil@g@addto@macro \csname pgf@sh@s@\pgf@sm@shape@name\endcsname{\pgf@sh@redeferredanchor{#1}{#2}}}% CJ -\def\pgf@sh@anchorborder#1{\expandafter\gdef\csname pgf@anchor@\pgf@sm@shape@name @border\endcsname##1{\pgf@process{##1}#1}} -\long\def\pgf@sh@behindbgpath#1{\expandafter\gdef\csname pgf@sh@bbg@\pgf@sm@shape@name\endcsname{#1}} -\long\def\pgf@sh@bgpath#1{\expandafter\gdef\csname pgf@sh@bg@\pgf@sm@shape@name\endcsname{#1}} -\long\def\pgf@sh@beforebgpath#1{\expandafter\gdef\csname pgf@sh@fbg@\pgf@sm@shape@name\endcsname{#1}} -\long\def\pgf@sh@behindfgpath#1{\expandafter\gdef\csname pgf@sh@bfg@\pgf@sm@shape@name\endcsname{#1}} -\long\def\pgf@sh@fgpath#1{\expandafter\gdef\csname pgf@sh@fg@\pgf@sm@shape@name\endcsname{#1}} -\long\def\pgf@sh@beforefgpath#1{\expandafter\gdef\csname pgf@sh@ffg@\pgf@sm@shape@name\endcsname{#1}} -\def\pgf@sh@boxes#1{\expandafter\gdef\csname pgf@sh@boxes@\pgf@sm@shape@name\endcsname{#1}} +\def\pgf@sh@anchorborder#1{\expandafter\gdef\csname pgf@anchor@\pgf@sm@shape@name @border\endcsname##1{\pgf@process{##1}#1}}% +\long\def\pgf@sh@behindbgpath#1{\expandafter\gdef\csname pgf@sh@bbg@\pgf@sm@shape@name\endcsname{#1}}% +\long\def\pgf@sh@bgpath#1{\expandafter\gdef\csname pgf@sh@bg@\pgf@sm@shape@name\endcsname{#1}}% +\long\def\pgf@sh@beforebgpath#1{\expandafter\gdef\csname pgf@sh@fbg@\pgf@sm@shape@name\endcsname{#1}}% +\long\def\pgf@sh@behindfgpath#1{\expandafter\gdef\csname pgf@sh@bfg@\pgf@sm@shape@name\endcsname{#1}}% +\long\def\pgf@sh@fgpath#1{\expandafter\gdef\csname pgf@sh@fg@\pgf@sm@shape@name\endcsname{#1}}% +\long\def\pgf@sh@beforefgpath#1{\expandafter\gdef\csname pgf@sh@ffg@\pgf@sm@shape@name\endcsname{#1}}% +\def\pgf@sh@boxes#1{\expandafter\gdef\csname pgf@sh@boxes@\pgf@sm@shape@name\endcsname{#1}}% \def\pgf@sh@inheritsavedanchors[from=#1]{% - \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@\pgf@sm@shape@name\endcsname{\csname pgf@sh@s@#1\endcsname}} - - \def\pgf@sh@inheritanchor[from=#1]#2{% + \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@\pgf@sm@shape@name\endcsname{\csname pgf@sh@s@#1\endcsname}}% + +\def\pgf@sh@inheritanchor[from=#1]#2{% \edef\pgf@marshal{\global\let\expandafter\noexpand\csname pgf@anchor@\pgf@sm@shape@name @#2\endcsname=\expandafter\noexpand\csname pgf@anchor@#1@#2\endcsname}% \pgf@marshal% -} +}% \def\pgf@sh@inheritanchorborder[from=#1]{% \edef\pgf@marshal{\global\let\expandafter\noexpand\csname pgf@anchor@\pgf@sm@shape@name @border\endcsname=\expandafter\noexpand\csname pgf@anchor@#1@border\endcsname}% \pgf@marshal% -} +}% \def\pgf@sh@inheritor#1#2{% \edef\pgf@marshal{\global\let\expandafter\noexpand\csname pgf@sh@#1@\pgf@sm@shape@name\endcsname=\expandafter\noexpand\csname pgf@sh@#1@#2\endcsname}% \pgf@marshal% -} -\def\pgf@sh@inheritbehindbgpath[from=#1]{\pgf@sh@inheritor{bbg}{#1}} -\def\pgf@sh@inheritbgpath[from=#1]{\pgf@sh@inheritor{bg}{#1}} -\def\pgf@sh@inheritbeforebgpath[from=#1]{\pgf@sh@inheritor{fbg}{#1}} -\def\pgf@sh@inheritbehindfgpath[from=#1]{\pgf@sh@inheritor{bfg}{#1}} -\def\pgf@sh@inheritfgpath[from=#1]{\pgf@sh@inheritor{fg}{#1}} -\def\pgf@sh@inheritbeforefgpath[from=#1]{\pgf@sh@inheritor{ffg}{#1}} -\def\pgf@sh@inheritboxes[from=#1]{\pgf@sh@inheritor{boxes}{#1}} +}% +\def\pgf@sh@inheritbehindbgpath[from=#1]{\pgf@sh@inheritor{bbg}{#1}}% +\def\pgf@sh@inheritbgpath[from=#1]{\pgf@sh@inheritor{bg}{#1}}% +\def\pgf@sh@inheritbeforebgpath[from=#1]{\pgf@sh@inheritor{fbg}{#1}}% +\def\pgf@sh@inheritbehindfgpath[from=#1]{\pgf@sh@inheritor{bfg}{#1}}% +\def\pgf@sh@inheritfgpath[from=#1]{\pgf@sh@inheritor{fg}{#1}}% +\def\pgf@sh@inheritbeforefgpath[from=#1]{\pgf@sh@inheritor{ffg}{#1}}% +\def\pgf@sh@inheritboxes[from=#1]{\pgf@sh@inheritor{boxes}{#1}}% -% +% % Coordinate. This shape is special: It is only used to reference a % point for later usage. Nothing is drawn, all anchors are identical -% to the center. +% to the center. % \pgfdeclareshape{coordinate} -{ +{% \savedanchor\centerpoint{% % x \pgf@x=.5\wd\pgfnodeparttextbox% % y \pgf@y=.5\ht\pgfnodeparttextbox% \advance\pgf@y by -.5\dp\pgfnodeparttextbox% - } - - \anchor{center}{\centerpoint} - \anchor{north}{\centerpoint} - \anchor{north west}{\centerpoint} - \anchor{north east}{\centerpoint} - \anchor{center}{\centerpoint} - \anchor{west}{\centerpoint} - \anchor{east}{\centerpoint} - \anchor{mid}{\centerpoint} - \anchor{mid west}{\centerpoint} - \anchor{mid east}{\centerpoint} - \anchor{base}{\centerpoint} - \anchor{base west}{\centerpoint} - \anchor{base east}{\centerpoint} - \anchor{south}{\centerpoint} - \anchor{south west}{\centerpoint} - \anchor{south east}{\centerpoint} - \anchorborder{\centerpoint} + }% + + \anchor{center}{\centerpoint}% + \anchor{north}{\centerpoint}% + \anchor{north west}{\centerpoint}% + \anchor{north east}{\centerpoint}% + \anchor{center}{\centerpoint}% + \anchor{west}{\centerpoint}% + \anchor{east}{\centerpoint}% + \anchor{mid}{\centerpoint}% + \anchor{mid west}{\centerpoint}% + \anchor{mid east}{\centerpoint}% + \anchor{base}{\centerpoint}% + \anchor{base west}{\centerpoint}% + \anchor{base east}{\centerpoint}% + \anchor{south}{\centerpoint}% + \anchor{south west}{\centerpoint}% + \anchor{south east}{\centerpoint}% + \anchorborder{\centerpoint}% \nodeparts{}% no text -} +}% % Value keys for shapes: @@ -861,7 +861,7 @@ minimum width/.initial =1pt, minimum height/.initial =1pt, minimum size/.style ={/pgf/minimum width=#1,/pgf/minimum height=#1}, -} +}% @@ -878,8 +878,8 @@ \pgfkeyssetvalue{/pgf/outer xsep}{#1}% \pgfkeyssetvalue{/pgf/outer ysep}{#1}% \fi% -} -\def\pgf@auto@text{auto} +}% +\def\pgf@auto@text{auto}% \let\pgf@outer@auto@adjust@hook\relax @@ -887,21 +887,21 @@ % Keys for rotating the shape border. % (may not be supported by all shapes) % -% /pgf/shape border uses incircle : Calculate the shape border using the incircle +% /pgf/shape border uses incircle : Calculate the shape border using the incircle % around the node contents (+inner sep). -% +% % /pgf/shape border rotate : Angle of independent border rotation. \newif\ifpgfshapeborderusesincircle -\pgfkeys{/pgf/shape border uses incircle/.is if=pgfshapeborderusesincircle} -\pgfkeys{/pgf/shape border rotate/.initial=0} +\pgfkeys{/pgf/shape border uses incircle/.is if=pgfshapeborderusesincircle}% +\pgfkeys{/pgf/shape border rotate/.initial=0}% -% +% % Rectangle % \pgfdeclareshape{rectangle} -{ +{% \savedanchor\northeast{% % Calculate x % @@ -937,8 +937,8 @@ \advance\pgf@y by.5\ht\pgfnodeparttextbox% \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}% \advance\pgf@y by\pgf@ya% - } - + }% + \savedanchor\southwest{% % Calculate x % @@ -974,11 +974,11 @@ \advance\pgf@y by.5\ht\pgfnodeparttextbox% \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}% \advance\pgf@y by-\pgf@ya% - } + }% % % Anchors - % + % \anchor{center}{ \pgf@process{\northeast}% \pgf@xa=.5\pgf@x% @@ -988,54 +988,54 @@ \pgf@y=.5\pgf@y% \advance\pgf@x by \pgf@xa% \advance\pgf@y by \pgf@ya% - } - \anchor{mid}{\pgf@anchor@rectangle@center\pgfmathsetlength\pgf@y{.5ex}} - \anchor{base}{\pgf@anchor@rectangle@center\pgf@y=0pt} + }% + \anchor{mid}{\pgf@anchor@rectangle@center\pgfmathsetlength\pgf@y{.5ex}}% + \anchor{base}{\pgf@anchor@rectangle@center\pgf@y=0pt}% \anchor{north}{ \pgf@process{\southwest}% \pgf@xa=.5\pgf@x% \pgf@process{\northeast}% \pgf@x=.5\pgf@x% \advance\pgf@x by \pgf@xa% - } + }% \anchor{south}{ \pgf@process{\northeast}% \pgf@xa=.5\pgf@x% \pgf@process{\southwest}% \pgf@x=.5\pgf@x% \advance\pgf@x by \pgf@xa% - } + }% \anchor{west}{ \pgf@process{\northeast}% \pgf@ya=.5\pgf@y% \pgf@process{\southwest}% \pgf@y=.5\pgf@y% \advance\pgf@y by \pgf@ya% - } - \anchor{mid west}{\southwest\pgfmathsetlength\pgf@y{.5ex}} - \anchor{base west}{\southwest\pgf@y=0pt} + }% + \anchor{mid west}{\southwest\pgfmathsetlength\pgf@y{.5ex}}% + \anchor{base west}{\southwest\pgf@y=0pt}% \anchor{north west}{ \southwest \pgf@xa=\pgf@x \northeast - \pgf@x=\pgf@xa} - \anchor{south west}{\southwest} + \pgf@x=\pgf@xa}% + \anchor{south west}{\southwest}% \anchor{east}{% \pgf@process{\southwest}% \pgf@ya=.5\pgf@y% \pgf@process{\northeast}% \pgf@y=.5\pgf@y% \advance\pgf@y by \pgf@ya% - } - \anchor{mid east}{\northeast\pgfmathsetlength\pgf@y{.5ex}} - \anchor{base east}{\northeast\pgf@y=0pt} - \anchor{north east}{\northeast} + }% + \anchor{mid east}{\northeast\pgfmathsetlength\pgf@y{.5ex}}% + \anchor{base east}{\northeast\pgf@y=0pt}% + \anchor{north east}{\northeast}% \anchor{south east}{ \northeast \pgf@xa=\pgf@x \southwest \pgf@x=\pgf@xa - } + }% \anchorborder{% \pgf@xb=\pgf@x% xb/yb is target \pgf@yb=\pgf@y% @@ -1057,7 +1057,7 @@ \pgf@process{\pgf@marshal}% \advance\pgf@x by\pgf@xa% \advance\pgf@y by\pgf@ya% - } + }% % % Background path @@ -1066,48 +1066,48 @@ \pgfpathrectanglecorners {\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}} {\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}} - } -} + }% +}% % Special current path start coordinate: -\expandafter\def\csname pgf@sh@ns@current subpath start\endcsname{coordinate} +\expandafter\def\csname pgf@sh@ns@current subpath start\endcsname{coordinate}% \expandafter\def\csname pgf@sh@np@current subpath start\endcsname{% \def\centerpoint{\expandafter\pgfqpoint\pgfsyssoftpath@lastmoveto}% -} -\expandafter\def\csname pgf@sh@nt@current subpath start\endcsname{{1}{0}{0}{1}{0pt}{0pt}} -\expandafter\def\csname pgf@sh@pi@current subpath start\endcsname{\pgfpictureid} +}% +\expandafter\def\csname pgf@sh@nt@current subpath start\endcsname{{1}{0}{0}{1}{0pt}{0pt}}% +\expandafter\def\csname pgf@sh@pi@current subpath start\endcsname{\pgfpictureid}% % Special current bounding box rectangle: -\expandafter\def\csname pgf@sh@ns@current bounding box\endcsname{rectangle} +\expandafter\def\csname pgf@sh@ns@current bounding box\endcsname{rectangle}% \expandafter\def\csname pgf@sh@np@current bounding box\endcsname{% \def\southwest{\pgfqpoint{\pgf@picminx}{\pgf@picminy}}% \def\northeast{\pgfqpoint{\pgf@picmaxx}{\pgf@picmaxy}}% -} -\expandafter\def\csname pgf@sh@nt@current bounding box\endcsname{{1}{0}{0}{1}{0pt}{0pt}} -\expandafter\def\csname pgf@sh@pi@current bounding box\endcsname{\pgfpictureid} +}% +\expandafter\def\csname pgf@sh@nt@current bounding box\endcsname{{1}{0}{0}{1}{0pt}{0pt}}% +\expandafter\def\csname pgf@sh@pi@current bounding box\endcsname{\pgfpictureid}% % Special current path bounding box rectangle: -\expandafter\def\csname pgf@sh@ns@current path bounding box\endcsname{rectangle} +\expandafter\def\csname pgf@sh@ns@current path bounding box\endcsname{rectangle}% \expandafter\def\csname pgf@sh@np@current path bounding box\endcsname{% \def\southwest{\pgfqpoint{\pgf@pathminx}{\pgf@pathminy}}% \def\northeast{\pgfqpoint{\pgf@pathmaxx}{\pgf@pathmaxy}}% -} -\expandafter\def\csname pgf@sh@nt@current path bounding box\endcsname{{1}{0}{0}{1}{0pt}{0pt}} -\expandafter\def\csname pgf@sh@pi@current path bounding box\endcsname{\pgfpictureid} +}% +\expandafter\def\csname pgf@sh@nt@current path bounding box\endcsname{{1}{0}{0}{1}{0pt}{0pt}}% +\expandafter\def\csname pgf@sh@pi@current path bounding box\endcsname{\pgfpictureid}% % Special current page bounding box rectangle: -\expandafter\def\csname pgf@sh@ns@current page\endcsname{rectangle} +\expandafter\def\csname pgf@sh@ns@current page\endcsname{rectangle}% \expandafter\def\csname pgf@sh@np@current page\endcsname{% \def\southwest{\pgfpointorigin}% \def\northeast{\pgfpoint{\pgfsys@thepagewidth}{\pgfsys@thepageheight}}% -} -\expandafter\def\csname pgf@sh@nt@current page\endcsname{{1}{0}{0}{1}{0pt}{0pt}} -\expandafter\def\csname pgf@sh@pi@current page\endcsname{pgfpageorigin} +}% +\expandafter\def\csname pgf@sh@nt@current page\endcsname{{1}{0}{0}{1}{0pt}{0pt}}% +\expandafter\def\csname pgf@sh@pi@current page\endcsname{pgfpageorigin}% % Special scope bounding box rectangle: @@ -1137,15 +1137,15 @@ \noexpand\def\noexpand\southwest{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}% \noexpand\def\noexpand\northeast{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% }% - }% - } -} + }% + }, +}% \def\pgf@lbb@do#1{% \ifdim\pgf@size@hook@x<\csname pgf@lbb@minx@#1\endcsname\expandafter\xdef\csname pgf@lbb@minx@#1\endcsname{\the\pgf@size@hook@x}\fi% \ifdim\pgf@size@hook@x>\csname pgf@lbb@maxx@#1\endcsname\expandafter\xdef\csname pgf@lbb@maxx@#1\endcsname{\the\pgf@size@hook@x}\fi% \ifdim\pgf@size@hook@y<\csname pgf@lbb@miny@#1\endcsname\expandafter\xdef\csname pgf@lbb@miny@#1\endcsname{\the\pgf@size@hook@y}\fi% \ifdim\pgf@size@hook@y>\csname pgf@lbb@maxy@#1\endcsname\expandafter\xdef\csname pgf@lbb@maxy@#1\endcsname{\the\pgf@size@hook@y}\fi% -} +}% % % Circle @@ -1155,30 +1155,30 @@ % % Draws a circle around the text % -{ +{% \savedanchor\centerpoint{% \pgf@x=.5\wd\pgfnodeparttextbox% \pgf@y=.5\ht\pgfnodeparttextbox% \advance\pgf@y by-.5\dp\pgfnodeparttextbox% - } - + }% + \saveddimen\radius{% - % - % Caculate ``height radius'' - % + % + % Calculate ``height radius'' + % \pgf@ya=.5\ht\pgfnodeparttextbox% \advance\pgf@ya by.5\dp\pgfnodeparttextbox% \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/inner ysep}}% \advance\pgf@ya by\pgf@yb% - % - % Caculate ``width radius'' - % + % + % Calculate ``width radius'' + % \pgf@xa=.5\wd\pgfnodeparttextbox% \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/inner xsep}}% \advance\pgf@xa by\pgf@xb% - % + % % Calculate length of radius vector: - % + % \pgf@process{\pgfpointnormalised{\pgfqpoint{\pgf@xa}{\pgf@ya}}}% \ifdim\pgf@x>\pgf@y% \c@pgf@counta=\pgf@x% @@ -1200,68 +1200,68 @@ \fi% \fi% \pgf@x=\pgf@xa% - % + % % If necessary, adjust radius so that the size requirements are - % met: - % - \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/minimum width}}% - \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/minimum height}}% + % met: + % + \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/minimum width}}% + \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/minimum height}}% \ifdim\pgf@x<.5\pgf@xb% \pgf@x=.5\pgf@xb% \fi% \ifdim\pgf@x<.5\pgf@yb% \pgf@x=.5\pgf@yb% \fi% - % - % Now, add larger of outer sepearations. - % - \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}% - \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}% + % + % Now, add larger of outer separations. + % + \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}% + \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}% \ifdim\pgf@xb<\pgf@yb% \advance\pgf@x by\pgf@yb% \else% \advance\pgf@x by\pgf@xb% \fi% - } + }% % % Anchors - % - \anchor{center}{\centerpoint} - \anchor{mid}{\centerpoint\pgfmathsetlength\pgf@y{.5ex}} - \anchor{base}{\centerpoint\pgf@y=0pt} - \anchor{north}{\centerpoint\advance\pgf@y by\radius} - \anchor{south}{\centerpoint\advance\pgf@y by-\radius} - \anchor{west}{\centerpoint\advance\pgf@x by-\radius} - \anchor{east}{\centerpoint\advance\pgf@x by\radius} - \anchor{mid west}{\centerpoint\advance\pgf@x by-\radius\pgfmathsetlength\pgf@y{.5ex}} - \anchor{mid east}{\centerpoint\advance\pgf@x by\radius\pgfmathsetlength\pgf@y{.5ex}} - \anchor{base west}{\centerpoint\advance\pgf@x by-\radius\pgf@y=0pt} - \anchor{base east}{\centerpoint\advance\pgf@x by\radius\pgf@y=0pt} + % + \anchor{center}{\centerpoint}% + \anchor{mid}{\centerpoint\pgfmathsetlength\pgf@y{.5ex}}% + \anchor{base}{\centerpoint\pgf@y=0pt}% + \anchor{north}{\centerpoint\advance\pgf@y by\radius}% + \anchor{south}{\centerpoint\advance\pgf@y by-\radius}% + \anchor{west}{\centerpoint\advance\pgf@x by-\radius}% + \anchor{east}{\centerpoint\advance\pgf@x by\radius}% + \anchor{mid west}{\centerpoint\advance\pgf@x by-\radius\pgfmathsetlength\pgf@y{.5ex}}% + \anchor{mid east}{\centerpoint\advance\pgf@x by\radius\pgfmathsetlength\pgf@y{.5ex}}% + \anchor{base west}{\centerpoint\advance\pgf@x by-\radius\pgf@y=0pt}% + \anchor{base east}{\centerpoint\advance\pgf@x by\radius\pgf@y=0pt}% \anchor{north west}{ \centerpoint \pgf@xa=\radius \advance\pgf@x by-0.707107\pgf@xa \advance\pgf@y by0.707107\pgf@xa - } + }% \anchor{south west}{ \centerpoint \pgf@xa=\radius \advance\pgf@x by-0.707107\pgf@xa \advance\pgf@y by-0.707107\pgf@xa - } + }% \anchor{north east}{ \centerpoint \pgf@xa=\radius \advance\pgf@x by0.707107\pgf@xa \advance\pgf@y by0.707107\pgf@xa - } + }% \anchor{south east}{ \centerpoint \pgf@xa=\radius \advance\pgf@x by0.707107\pgf@xa \advance\pgf@y by-0.707107\pgf@xa - } + }% \anchorborder{ \pgf@xa=\pgf@x% \pgf@ya=\pgf@y% @@ -1276,23 +1276,23 @@ \centerpoint% \advance\pgf@x by\pgf@xa% \advance\pgf@y by\pgf@ya% - } + }% % % Background path % \backgroundpath{% \pgfutil@tempdima=\radius% - \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}% - \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}% + \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}% + \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}% \ifdim\pgf@xb<\pgf@yb% \advance\pgfutil@tempdima by-\pgf@yb% \else% \advance\pgfutil@tempdima by-\pgf@xb% \fi% \pgfpathcircle{\centerpoint}{\pgfutil@tempdima}% - } -} + }% +}% diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesnakes.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesnakes.code.tex index f87a884b417..9df6d309801 100644 --- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesnakes.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesnakes.code.tex @@ -11,7 +11,7 @@ \pgfwarning{Snakes have been superseded by decorations. Use the module decorations instead of snakes} -\usepgfmodule{decorations} +\usepgfmodule{decorations}% \endinput @@ -58,7 +58,7 @@ \let\state=\pgf@snake@state #3 \let\state=\pgf@orig@state% -} +}% % Sets the additional transformation applied to every segment of a snake @@ -69,8 +69,8 @@ % % \pgfsetsnakesegmenttransformation{\pgftransformyshift{5pt}} -\def\pgfsetsnakesegmenttransformation#1{\def\pgf@snakeadditionaltransform{#1}} -\pgfsetsnakesegmenttransformation{} +\def\pgfsetsnakesegmenttransformation#1{\def\pgf@snakeadditionaltransform{#1}}% +\pgfsetsnakesegmenttransformation{}% % Declares a new state @@ -96,11 +96,11 @@ % \pgfpathlineto{\pgfpoint{10pt}{0pt}} % } -\def\pgf@snake@state#1{\pgfutil@ifnextchar[{\pgf@@snake@start#1}{\pgf@@snake@start#1[]}}%} +\def\pgf@snake@state#1{\pgfutil@ifnextchar[{\pgf@@snake@start#1}{\pgf@@snake@start#1[]}}%}% \def\pgf@@snake@start#1[#2]#3{% \pgfutil@namedef{pgf@snake@@\pgf@snake@name @#1@options}{#2}% \pgfutil@namedef{pgf@snake@@\pgf@snake@name @#1@code}{#3}% -} +}% @@ -131,8 +131,8 @@ % MW: Calculate the angle of the snake. % \edef\pgf@marshal{% - \noexpand\pgfmathanglebetweenpoints{\noexpand\pgfpointorigin}{% - \noexpand\pgf@x\the\pgf@x\noexpand\pgf@y\the\pgf@y}% + \noexpand\pgfmathanglebetweenpoints{\noexpand\pgfpointorigin}{% + \noexpand\pgf@x\the\pgf@x\noexpand\pgf@y\the\pgf@y}% }% \pgf@marshal% \let\pgfsnakeangle\pgfmathresult% @@ -194,7 +194,7 @@ \fi% }% \endgroup% -} +}% \def\pgf@snake@invoke#1#2{% \pgfmathsetlength\pgf@xa{#2}% @@ -204,7 +204,7 @@ }% \advance\pgfsnakecompleteddistance by\pgf@xa% \advance\pgfsnakeremainingdistance by-\pgf@xa% -} +}% % Use a snake % @@ -212,13 +212,13 @@ % #2 = point to which the snake leads % % This operation mainly computes \pgfpathsnakealongvector for a vector -% appropriately choosen. See \pgfpathsnakealongvector for details. +% appropriately chosen. See \pgfpathsnakealongvector for details. % % Example: % % \pgfpathsnaketo{zig zag}{\pgfpoint{2cm}{3cm}} -\def\pgfpathsnaketo#1#2{\pgfpathsnakesto{{#1}{\pgfsnakeremainingdistance}}{#2}} +\def\pgfpathsnaketo#1#2{\pgfpathsnakesto{{#1}{\pgfsnakeremainingdistance}}{#2}}% @@ -240,7 +240,7 @@ % translated by the width of the path element as specified in the % width option of the path element. The dimensions % \pgfsnakeremainingdistance and \pgfsnakecompleteddistance are -% updated. +% updated. % % The process ends when the state `final' is entered. The code of the % final state is executed and the process stops. @@ -251,7 +251,7 @@ \def\pgfpathsnakealongvector#1#2#3{% \pgfutil@ifundefined{pgf@snake@@#1@initial}{\pgferror{Undefined snake ``#1''}} - { + { \begingroup% keep things local \pgftransformreset% \pgf@pt@x=\pgf@path@lastx% evil trickery to transform to the last point @@ -267,8 +267,8 @@ {\pgfpointorigin}% % Now, setup the automaton \expandafter\let\expandafter\pgf@snake@current@state\expandafter=\csname pgf@snake@@#1@initial\endcsname% - \def\pgf@snake@name{#1}% - \pgfsnakecompleteddistance=0pt% + \def\pgf@snake@name{#1}% + \pgfsnakecompleteddistance=0pt% \pgfmathsetlength\pgfsnakeremainingdistance{#2}% \pgf@snake@run% % Last step: @@ -279,17 +279,17 @@ }% \endgroup% }% -} +}% -\def\pgf@final@text{final} +\def\pgf@final@text{final}% \def\pgf@snake@run{% \let\pgf@snake@next=\pgf@snake@do@state% \ifx\pgf@snake@current@state\pgf@final@text% \let\pgf@snake@next=\relax% \fi% - \pgf@snake@next% -} + \pgf@snake@next% +}% \def\pgf@snake@do@state{% \let\pgf@snake@next=\relax% @@ -301,10 +301,10 @@ \let\pgf@snake@next=\pgf@snake@do@code% \fi% \pgf@snake@next% -} +}% \def\pgf@snakes@setter{% \pgfqkeys{/pgf/snakes}% -} +}% \def\pgf@snake@do@code{% % Ok, execute code: @@ -320,13 +320,13 @@ % Next iteration: \let\pgf@snake@current@state=\pgf@snake@next@state% \pgf@snake@run% -} +}% \pgfkeys{ /pgf/snakes/width/.code=\def\pgf@snake@width{#1}\pgf@snake@switch@if#1 to final\pgf@stop,% /pgf/snakes/switch if less than/.code=\pgf@snake@switch@if#1\pgf@stop,% /pgf/snakes/next state/.store in=\pgf@snake@next@state% -} +}% \def\pgf@snake@switch@if#1to #2\pgf@stop{% \ifx\pgf@snake@next\relax% @@ -336,7 +336,7 @@ \let\pgf@snake@next=\pgf@snake@run% \fi% \fi% -} +}% @@ -346,10 +346,10 @@ % in conjunction with other snakes. \pgfdeclaresnake{lineto}{final} -{ +{% \state{final} { \pgfpathlineto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}} } -} +}% @@ -359,10 +359,10 @@ % useful in conjunction with other snakes. \pgfdeclaresnake{moveto}{final} -{ +{% \state{final} { \pgfpathmoveto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}} } -} +}% diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesorting.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesorting.code.tex index 497ea8591e8..e22bdb09910 100644 --- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesorting.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesorting.code.tex @@ -39,18 +39,18 @@ \expandafter\global\expandafter\let\csname pgf@sort@\the\c@pgf@counta\endcsname\pgfutil@empty% \advance\c@pgf@counta by1\relax% \pgfutil@repeat -} +}% % Insert code into some bucket -% +% % #1 = the bucket % #2 = the code -% -\def\pgfsortinginsert#1#1{ +% +\def\pgfsortinginsert#1#2{ \expandafter\let\expandafter\pgf@temp\csname pgf@lib@sort@#1\endcsname% \expandafter\def\expandafter\pgf@temp\expandafter{\pgf@temp#2}% \expandafter\global\expandafter\let\csname pgf@lib@sort@\the\c@pgf@counta\endcsname\pgf@temp% -} +}% % After all code has been inserted into the buckets, you can call @@ -63,7 +63,7 @@ \csname pgf@lib@sort@\the\c@pgf@counta\endcsname% \advance\c@pgf@counta by1\relax% \pgfutil@repeat -} +}% \endinput |