summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/libraries/decorations
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/libraries/decorations')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.footprints.code.tex52
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.fractals.code.tex28
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.markings.code.tex52
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathmorphing.code.tex103
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathreplacing.code.tex163
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.shapes.code.tex186
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.text.code.tex522
7 files changed, 562 insertions, 544 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.footprints.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.footprints.code.tex
index 5cf633d0c59..369a0ecbd09 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.footprints.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.footprints.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgfmodule{decorations}
+\usepgfmodule{decorations}%
% Parameters
@@ -22,12 +22,12 @@
/pgf/decoration/foot angle/.initial=10,
% What animal?
/pgf/decoration/foot of/.initial=human,
-}
+}%
\pgfdeclaredecoration{footprints}{left}
-{
+{%
\state{left}[width=\pgfkeysvalueof{/pgf/decoration/stride length}/2,next state=right]
{
\pgftransformyshift{\pgfkeysvalueof{/pgf/decoration/foot sep}/2}
@@ -35,7 +35,7 @@
\pgftransformscale{\pgfmathresult}
\pgftransformrotate{\pgfkeysvalueof{/pgf/decoration/foot angle}}
\csname pgf@lib@foot@of@\pgfkeysvalueof{/pgf/decoration/foot of}\endcsname
- }
+ }%
\state{right}[width=\pgfkeysvalueof{/pgf/decoration/stride length}/2,next state=left]
{
\pgftransformyscale{-1}
@@ -44,23 +44,23 @@
\pgftransformscale{\pgfmathresult}
\pgftransformrotate{\pgfkeysvalueof{/pgf/decoration/foot angle}}
\csname pgf@lib@foot@of@\pgfkeysvalueof{/pgf/decoration/foot of}\endcsname
- }
-}
+ }%
+}%
-% Actual footprints.
+% Actual footprints.
%
% A footprint must be name \pgf@lib@foot@of@XXX, be a left foot and
% should fill a rectangle of (0,0) rectangle (1pt,1pt) (more or less)
-% and point right.
+% and point right.
%
\def\pgf@lib@foot@of@gnome{
% Coordinates from a Gnome logo on wikimedia commons. LGPL
% license... Unknown author.
- %
+ %
% Flip and rotate
\pgftransformcm{0}{-1}{-1}{0}{\pgfqpoint{1pt}{0.8pt}}
\pgftransformscale{0.83333}
@@ -68,23 +68,23 @@
\pgfpathcurveto{\pgfqpoint{.61466pt}{0pt}}{\pgfqpoint{.56851pt}{.35041pt}}{\pgfqpoint{.70691pt}{.35041pt}}
\pgfpathcurveto{\pgfqpoint{.84529pt}{.35041pt}}{\pgfqpoint{1.10671pt}{0pt}}{\pgfqpoint{.86068pt}{0pt}}
\pgfpathclose
- %
+ %
\pgfpathmoveto{\pgfqpoint{.45217pt}{.30699pt}}
\pgfpathcurveto{\pgfqpoint{.52586pt}{.31149pt}}{\pgfqpoint{.60671pt}{.02577pt}}{\pgfqpoint{.46821pt}{.04374pt}}
\pgfpathcurveto{\pgfqpoint{.32976pt}{.06171pt}}{\pgfqpoint{.37845pt}{.30249pt}}{\pgfqpoint{.45217pt}{.30699pt}}
\pgfpathclose
- %
+ %
\pgfpathmoveto{\pgfqpoint{.11445pt}{.48453pt}}
\pgfpathcurveto{\pgfqpoint{.16686pt}{.46146pt}}{\pgfqpoint{.1212pt}{.23581pt}}{\pgfqpoint{.03208pt}{.29735pt}}
\pgfpathcurveto{\pgfqpoint{-.057pt}{.3589pt}}{\pgfqpoint{.06204pt}{.50759pt}}{\pgfqpoint{.11445pt}{.48453pt}}
\pgfpathclose
- %
+ %
\pgfpathmoveto{\pgfqpoint{.26212pt}{.36642pt}}
\pgfpathcurveto{\pgfqpoint{.32451pt}{.3537pt}}{\pgfqpoint{.32793pt}{.09778pt}}{\pgfqpoint{.21667pt}{.14369pt}}
\pgfpathcurveto{\pgfqpoint{.10539pt}{.18961pt}}{\pgfqpoint{.19978pt}{.37916pt}}{\pgfqpoint{.26212pt}{.36642pt}}
\pgfpathlineto{\pgfqpoint{.26212pt}{.36642pt}}
\pgfpathclose
- %
+ %
\pgfpathmoveto{\pgfqpoint{.58791pt}{.93913pt}}
\pgfpathcurveto{\pgfqpoint{.59898pt}{1.02367pt}}{\pgfqpoint{.52589pt}{1.06542pt}}{\pgfqpoint{.45431pt}{1.01092pt}}
\pgfpathcurveto{\pgfqpoint{.22644pt}{.83743pt}}{\pgfqpoint{.8316pt}{.75088pt}}{\pgfqpoint{.79171pt}{.51386pt}}
@@ -94,7 +94,7 @@
\pgfpathcurveto{\pgfqpoint{.8358pt}{.82589pt}}{\pgfqpoint{.57867pt}{.8686pt}}{\pgfqpoint{.58791pt}{.93913pt}}
\pgfpathlineto{\pgfqpoint{.58791pt}{.93913pt}}
\pgfpathclose
-}
+}%
@@ -118,14 +118,14 @@
\pgfpathcurveto{\pgfqpoint{-3.4844pt}{2.9162pt}}{\pgfqpoint{-2.6164pt}{1.654pt}}{\pgfqpoint{-1.454pt}{1.3886pt}}
\pgfpathcurveto{\pgfqpoint{-1.0876pt}{1.305pt}}{\pgfqpoint{-1.0296pt}{1.3066pt}}{\pgfqpoint{-.886pt}{1.652pt}}
\pgfpathclose
-}
+}%
\expandafter\def\csname pgf@lib@foot@of@felis silvestris\endcsname{
% Coordinates derived from vector image created by Mark Wibrow, based
% on the forefoot of `felis silvestris' shown in
% Pearson, B. and Burton, J. A. (1980), `Wild Animals', Collins, 155.
- %
+ %
\pgftransformcm{0}{.1}{.1}{0}{\pgfqpoint{.48pt}{.5pt}}
\pgfpathmoveto{\pgfqpoint{2.7312pt}{-1.992pt}}
\pgfpathcurveto{\pgfqpoint{1.8716pt}{-1.4226pt}}{\pgfqpoint{2.1404pt}{.0436pt}}{\pgfqpoint{.9202pt}{.0436pt}}
@@ -151,30 +151,30 @@
\pgfpathcurveto{\pgfqpoint{2.8534pt}{.7868pt}}{\pgfqpoint{3.4658pt}{1.2838pt}}{\pgfqpoint{3.6872pt}{2.0152pt}}
\pgfpathcurveto{\pgfqpoint{3.9084pt}{2.7466pt}}{\pgfqpoint{3.655pt}{3.4358pt}}{\pgfqpoint{3.1212pt}{3.5542pt}}
\pgfpathclose
- %
+ %
\pgfpathmoveto{\pgfqpoint{-.6182pt}{5.0456pt}}
\pgfpathcurveto{\pgfqpoint{-1.2132pt}{5.0456pt}}{\pgfqpoint{-1.6956pt}{4.3104pt}}{\pgfqpoint{-1.6956pt}{3.4038pt}}
\pgfpathcurveto{\pgfqpoint{-1.6956pt}{2.4972pt}}{\pgfqpoint{-1.2132pt}{1.7618pt}}{\pgfqpoint{-.6182pt}{1.7618pt}}
\pgfpathcurveto{\pgfqpoint{-.0232pt}{1.7618pt}}{\pgfqpoint{.4592pt}{2.4972pt}}{\pgfqpoint{.4592pt}{3.4038pt}}
\pgfpathcurveto{\pgfqpoint{.4592pt}{4.3104pt}}{\pgfqpoint{-.0232pt}{5.0456pt}}{\pgfqpoint{-.6182pt}{5.0456pt}}
\pgfpathclose
- %
+ %
\pgfpathmoveto{\pgfqpoint{-4.1176pt}{1.8248pt}}
\pgfpathcurveto{\pgfqpoint{-4.6334pt}{1.7534pt}}{\pgfqpoint{-4.9806pt}{1.0312pt}}{\pgfqpoint{-4.8928pt}{.212pt}}
\pgfpathcurveto{\pgfqpoint{-4.8052pt}{-.6072pt}}{\pgfqpoint{-4.3158pt}{-1.2136pt}}{\pgfqpoint{-3.8pt}{-1.1422pt}}
\pgfpathcurveto{\pgfqpoint{-3.2842pt}{-1.0708pt}}{\pgfqpoint{-2.9372pt}{-.3486pt}}{\pgfqpoint{-3.0248pt}{.4706pt}}
\pgfpathcurveto{\pgfqpoint{-3.1126pt}{1.2898pt}}{\pgfqpoint{-3.6018pt}{1.8962pt}}{\pgfqpoint{-4.1176pt}{1.8248pt}}
\pgfpathclose
-}
+}%
\def\pgf@lib@foot@of@human{%
% Coordinates derived from vector image created by Mark Wibrow.
\pgftransformcm{0}{.5}{.5}{0}{\pgfqpoint{.48pt}{.2pt}}
- %
+ %
% Draw main part of foot.
- %
+ %
\pgfpathmoveto{\pgfqpoint{.20175pt}{-.72633pt}}
\pgfpathcurveto{\pgfqpoint{.16314pt}{-.88194pt}}{\pgfqpoint{.07386pt}{-1.0167pt}}{\pgfqpoint{-.08385pt}{-1.0167pt}}
\pgfpathcurveto{\pgfqpoint{-.24153pt}{-1.0167pt}}{\pgfqpoint{-.36942pt}{-.84897pt}}{\pgfqpoint{-.36942pt}{-.72633pt}}
@@ -189,7 +189,7 @@
\pgfpathclose
%
% Draw toe.s
- %
+ %
\pgfpathmoveto{\pgfqpoint{-.27138pt}{1.01451pt}}
\pgfpathcurveto{\pgfqpoint{-.21198pt}{1.01451pt}}{\pgfqpoint{-.1638pt}{.94509pt}}{\pgfqpoint{-.1638pt}{.8595pt}}
\pgfpathcurveto{\pgfqpoint{-.1638pt}{.77388pt}}{\pgfqpoint{-.21198pt}{.70446pt}}{\pgfqpoint{-.27138pt}{.70446pt}}
@@ -210,21 +210,21 @@
\pgfpathcurveto{\pgfqpoint{.0453pt}{.66699pt}}{\pgfqpoint{.02019pt}{.70602pt}}{\pgfqpoint{.0264pt}{.74874pt}}
\pgfpathcurveto{\pgfqpoint{.03261pt}{.79149pt}}{\pgfqpoint{.0678pt}{.82176pt}}{\pgfqpoint{.10497pt}{.81636pt}}
\pgfpathclose
- %
+ %
\pgfpathmoveto{\pgfqpoint{.24054pt}{.70842pt}}
\pgfpathcurveto{\pgfqpoint{.27513pt}{.70842pt}}{\pgfqpoint{.30318pt}{.67686pt}}{\pgfqpoint{.30318pt}{.63795pt}}
\pgfpathcurveto{\pgfqpoint{.30318pt}{.59904pt}}{\pgfqpoint{.27513pt}{.56751pt}}{\pgfqpoint{.24054pt}{.56751pt}}
\pgfpathcurveto{\pgfqpoint{.20598pt}{.56751pt}}{\pgfqpoint{.17793pt}{.59904pt}}{\pgfqpoint{.17793pt}{.63795pt}}
\pgfpathcurveto{\pgfqpoint{.17793pt}{.67686pt}}{\pgfqpoint{.20598pt}{.70842pt}}{\pgfqpoint{.24054pt}{.70842pt}}
\pgfpathclose
- %
+ %
\pgfpathmoveto{\pgfqpoint{.35973pt}{.57501pt}}
\pgfpathcurveto{\pgfqpoint{.3918pt}{.57501pt}}{\pgfqpoint{.41781pt}{.54852pt}}{\pgfqpoint{.41781pt}{.51585pt}}
\pgfpathcurveto{\pgfqpoint{.41781pt}{.48318pt}}{\pgfqpoint{.3918pt}{.45669pt}}{\pgfqpoint{.35973pt}{.45669pt}}
\pgfpathcurveto{\pgfqpoint{.32769pt}{.45669pt}}{\pgfqpoint{.30168pt}{.48318pt}}{\pgfqpoint{.30168pt}{.51585pt}}
\pgfpathcurveto{\pgfqpoint{.30168pt}{.54852pt}}{\pgfqpoint{.32769pt}{.57501pt}}{\pgfqpoint{.35973pt}{.57501pt}}
\pgfpathclose
-}
+}%
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.fractals.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.fractals.code.tex
index 22c9d8d1b27..2327c770295 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.fractals.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.fractals.code.tex
@@ -7,12 +7,12 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgfmodule{decorations}
+\usepgfmodule{decorations}%
\pgfdeclaredecoration{Koch curve type 1}{init}
-{
+{%
\state{init}[width=\pgfdecoratedinputsegmentremainingdistance]
{
\pgfpathlineto{\pgfpoint{.33333\pgfdecoratedinputsegmentremainingdistance}{0pt}}
@@ -20,11 +20,11 @@
\pgfpathlineto{\pgfpoint{.66666\pgfdecoratedinputsegmentremainingdistance}{.33333\pgfdecoratedinputsegmentremainingdistance}}
\pgfpathlineto{\pgfpoint{.66666\pgfdecoratedinputsegmentremainingdistance}{0pt}}
\pgfpathlineto{\pgfpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
- }
-}
+ }%
+}%
\pgfdeclaredecoration{Koch curve type 2}{init}
-{
+{%
\state{init}[width=\pgfdecoratedinputsegmentremainingdistance]
{
\pgfpathlineto{\pgfpoint{.25\pgfdecoratedinputsegmentremainingdistance}{0pt}}
@@ -35,31 +35,31 @@
\pgfpathlineto{\pgfpoint{.75\pgfdecoratedinputsegmentremainingdistance}{-.25\pgfdecoratedinputsegmentremainingdistance}}
\pgfpathlineto{\pgfpoint{.75\pgfdecoratedinputsegmentremainingdistance}{0pt}}
\pgfpathlineto{\pgfpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
- }
-}
+ }%
+}%
\pgfdeclaredecoration{Koch snowflake}{init}
-{
+{%
\state{init}[width=\pgfdecoratedinputsegmentremainingdistance]
{
\pgfpathlineto{\pgfpoint{.3333\pgfdecoratedinputsegmentremainingdistance}{0pt}}
\pgfpathlineto{\pgfpoint{.5\pgfdecoratedinputsegmentremainingdistance}{0.2886751347\pgfdecoratedinputsegmentremainingdistance}}
\pgfpathlineto{\pgfpoint{.6666\pgfdecoratedinputsegmentremainingdistance}{0pt}}
\pgfpathlineto{\pgfpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
- }
-}
+ }%
+}%
\pgfdeclaredecoration{Cantor set}{init}
-{
+{%
\state{init}[width=\pgfdecoratedinputsegmentremainingdistance]
{
\pgfpathlineto{\pgfpoint{.3333\pgfdecoratedinputsegmentremainingdistance}{0pt}}
\pgfpathmoveto{\pgfpoint{.6666\pgfdecoratedinputsegmentremainingdistance}{0pt}}
\pgfpathlineto{\pgfpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
- }
-}
+ }%
+}%
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.markings.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.markings.code.tex
index 546301c4d07..6a17dbe3c0a 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.markings.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.markings.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgfmodule{decorations}
+\usepgfmodule{decorations}%
% A marking decoration is used to add markings (which are just pgf
@@ -16,37 +16,37 @@
\pgfkeys{
/pgf/decoration/reset marks/.code=\let\pgf@lib@dec@mark@marks\pgfutil@empty,
/pgf/decoration/mark/.code=\pgf@lib@dec@parsemark#1\pgf@lib@dec@stop,
-}
+}%
\let\pgf@lib@dec@mark@marks=\pgfutil@empty
-\def\pgf@lib@dec@parsemark{\pgfutil@ifnextchar b{\pgf@lib@dec@parsebetween}{\pgf@lib@dec@parseat}}
+\def\pgf@lib@dec@parsemark{\pgfutil@ifnextchar b{\pgf@lib@dec@parsebetween}{\pgf@lib@dec@parseat}}%
\def\pgf@lib@dec@parseat at position#1with#2\pgf@lib@dec@stop{%
\expandafter\def\expandafter\pgf@lib@dec@mark@marks\expandafter{\pgf@lib@dec@mark@marks%
\pgf@lib@dec@domark{#1}{#2}%
}%
-}
+}%
\def\pgf@lib@dec@parsebetween between positions#1and#2step#3with#4\pgf@lib@dec@stop{%
\expandafter\def\expandafter\pgf@lib@dec@mark@marks\expandafter{\pgf@lib@dec@mark@marks%
\pgf@lib@dec@dobetweenmark{#1}{#2}{#3}{#4}%
}%
-}
+}%
\def\pgf@lib@dec@arrowhead#1#2{%
\pgftransformxscale{#1}
\pgfarrowdraw{#2}%
-}
+}%
\def\pgf@lib@dec@doarrowhead#1{%
\pgf@lib@dec@arrowhead{1}{#1}%
-}
+}%
\def\pgf@lib@dec@doarrowheadrev#1{%
\pgf@lib@dec@arrowhead{-1}{#1}%
-}
+}%
\pgfdeclaredecoration{markings}{init}
-{
+{%
\state{init}
[
width=0pt,
@@ -56,8 +56,8 @@
},
next state=pre
]
- {}
-
+ {}%
+
\state{pre}
[
width=0pt,
@@ -69,11 +69,11 @@
},
next state=skipper
]
- {}
+ {}%
\state{skipper}[width=\pgf@lib@dec@computed@width-\pgfdecoratedcompleteddistance-1sp,
- next state=\pgf@lib@dec@next@state]{}
-
+ next state=\pgf@lib@dec@next@state]{}%
+
\state{main}
[
width=1sp,
@@ -104,15 +104,15 @@
\else%
\pgfpathlineto{\pgfpointdecoratedpathlast}
\fi%
- }
-}
+ }%
+}%
\def\pgf@lib@dec@domark#1#2#3\pgf@lib@dec@mark@last{%
\def\pgf@lib@dec@mark@marks{#3}%
\pgf@lib@dec@parsenum{#1}%
\def\pgf@lib@dec@computed@action{#2}%
\def\pgf@lib@dec@next@state{main}%
-}
+}%
\def\pgf@lib@dec@dobetweenmark#1#2#3#4#5\pgf@lib@dec@mark@last{%
@@ -124,7 +124,7 @@
% Skip!
#5\pgf@lib@dec@mark@last%
\else%
- %
+ %
\pgf@lib@dec@parsenum{#3}%
\pgfmathparse{\pgf@lib@dec@mark@start+\pgf@lib@dec@computed@width}%
% Update entry in mark list
@@ -134,7 +134,7 @@
\def\pgf@lib@dec@computed@action{#4}%
\def\pgf@lib@dec@next@state{main}%
\fi%
-}
+}%
\def\pgf@lib@dec@parsenum#1{%
@@ -145,28 +145,28 @@
\else%
\pgfmathparse{\pgfmathresult pt}%
\fi%
- \else%
+ \else%
\ifdim\pgfmathresult pt<0pt\relax%
\pgfmathparse{\pgfdecoratedpathlength\pgfmathresult*\pgfdecoratedpathlength}%
\else%
\pgfmathparse{\pgfmathresult*\pgfdecoratedpathlength}%
\fi%
\fi%
- \edef\pgf@lib@dec@computed@width{\pgfmathresult pt}%
-}
+ \edef\pgf@lib@dec@computed@width{\pgfmathresult pt}%
+}%
\def\pgf@lib@dec@mark@last{%
\def\pgf@lib@dec@next@state{final}%
-}
+}%
%
% If you set the mark connection node inside a mark picture, the
-% output path will contain a line to this node
+% output path will contain a line to this node
%
\pgfkeys{/pgf/decoration/mark connection node/.store in=\pgf@lib@mark@node,
- /pgf/decoration/mark connection node=}
+ /pgf/decoration/mark connection node=}%
\def\pgf@lib@mark@connect@node{%
% Line to "left" end of the node
\pgfpathlineto{\pgfpointshapeborder{\pgf@lib@mark@node}{\pgfqpoint{-1pt}{0pt}}}
@@ -175,4 +175,4 @@
}%
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathmorphing.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathmorphing.code.tex
index a6052489796..3f628da582d 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathmorphing.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathmorphing.code.tex
@@ -7,12 +7,12 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgfmodule{decorations}
+\usepgfmodule{decorations}%
%
% These decorations "morph" paths. That means that the
-% orginal characteristic of the path is kept and the number of
+% original characteristic of the path is kept and the number of
% subpaths remains the same -- only, the lines are slightly offset or
% changed by the decoration. For instance a line might be turned into
% a squiggly line or a snaking line or a bumping line.
@@ -28,31 +28,31 @@
% zigzag decoration.
%
-\pgfdeclaredecoration{zigzag}{up from center}{
+\pgfdeclaredecoration{zigzag}{up from center}{%
\state{up from center}[width=+.5\pgfdecorationsegmentlength, next state=big down]
{
\pgfpathlineto{\pgfqpoint{.25\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
- }
+ }%
\state{big down}[switch if less than=+.5\pgfdecorationsegmentlength to center finish,
width=+.5\pgfdecorationsegmentlength,
next state=big up]
{
\pgfpathlineto{\pgfqpoint{.25\pgfdecorationsegmentlength}{-\pgfdecorationsegmentamplitude}}
- }
+ }%
\state{big up}[switch if less than=+.5\pgfdecorationsegmentlength to center finish,
width=+.5\pgfdecorationsegmentlength,
next state=big down]
{
\pgfpathlineto{\pgfqpoint{.25\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
- }
+ }%
\state{center finish}[width=0pt, next state=final]{
\pgfpathlineto{\pgfpointorigin}
- }
+ }%
\state{final}
{
\pgfpathlineto{\pgfpointdecoratedpathlast}
- }
-}
+ }%
+}%
@@ -62,17 +62,17 @@
% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentlength
\pgfdeclaredecoration{saw}{initial}
-{
+{%
\state{initial}[auto end on length=+\pgfdecorationsegmentlength,
auto corner on length=+\pgfdecorationsegmentlength,
width=+\pgfdecorationsegmentlength]
{
\pgfpathlineto{\pgfqpoint{\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
\pgfpathlineto{\pgfqpoint{\pgfdecorationsegmentlength}{0pt}}
- }
+ }%
\state{final}
- {}
-}
+ {}%
+}%
@@ -84,10 +84,10 @@
% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentlength
\pgfdeclaredecoration{random steps}{start}
-{
- \state{start}[width=+0pt,next state=step,persistent precomputation=\pgfdecoratepathhascornerstrue]{}
+{%
+ \state{start}[width=+0pt,next state=step,persistent precomputation=\pgfdecoratepathhascornerstrue]{}%
\state{step}[auto end on length=1.5\pgfdecorationsegmentlength,
- auto corner on length=1.5\pgfdecorationsegmentlength,
+ auto corner on length=1.5\pgfdecorationsegmentlength,
width=+\pgfdecorationsegmentlength]
{
\pgfpathlineto{
@@ -95,29 +95,29 @@
{\pgfpoint{\pgfdecorationsegmentlength}{0pt}}
{\pgfpoint{rand*\pgfdecorationsegmentamplitude}{rand*\pgfdecorationsegmentamplitude}}
}
- }
+ }%
\state{final}
- {}
-}
+ {}%
+}%
% Meta-decoration line zigzag
-\pgfdeclaremetadecoration{straight zigzag}{line to}{
+\pgfdeclaremetadecoration{straight zigzag}{line to}{%
\state{line to}[width=\pgfmetadecorationsegmentlength, next state=zigzag]
{
\decoration{curveto}
- }
+ }%
\state{zigzag}[width=\pgfmetadecorationsegmentlength, next state=line to]
{
\decoration{zigzag}
- }
+ }%
\state{final}
{
\decoration{curveto}
- }
-}
+ }%
+}%
@@ -138,7 +138,7 @@
% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentaspect
\pgfdeclaredecoration{bent}{bent}
-{
+{%
\state{bent}[width=+\pgfdecoratedinputsegmentremainingdistance]
{
\pgfpathcurveto
@@ -146,44 +146,44 @@
{\pgfpointadd{\pgfqpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
{\pgfqpoint{-\pgfdecorationsegmentaspect\pgfdecoratedinputsegmentremainingdistance}{\pgfdecorationsegmentamplitude}}}
{\pgfqpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
- }
+ }%
\state{final}
- {}
-}
+ {}%
+}%
% decoration snake
%
-% This decoration produces a hopefully optically pleasing squiggly snake.
+% This decoration produces a hopefully optically pleasing squiggly snake.
%
% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentlength
\pgfdeclaredecoration{snake}{initial}
-{
+{%
\state{initial}[switch if less than=+.625\pgfdecorationsegmentlength to final,
width=+.3125\pgfdecorationsegmentlength,
next state=down]
- {
+ {
\pgfpathcurveto
{\pgfqpoint{.125\pgfdecorationsegmentlength}{0pt}}
{\pgfqpoint{.1875\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
{\pgfqpoint{.3125\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
- }
+ }%
\state{down}[switch if less than=+.8125\pgfdecorationsegmentlength to end down,
width=+.5\pgfdecorationsegmentlength,
next state=up]
{
\pgfpathcosine{\pgfqpoint{.25\pgfdecorationsegmentlength}{-1\pgfdecorationsegmentamplitude}}
\pgfpathsine{\pgfqpoint{.25\pgfdecorationsegmentlength}{-1\pgfdecorationsegmentamplitude}}
- }
+ }%
\state{up}[switch if less than=+.8125\pgfdecorationsegmentlength to end up,
width=+.5\pgfdecorationsegmentlength,
next state=down]
{
\pgfpathcosine{\pgfqpoint{.25\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
\pgfpathsine{\pgfqpoint{.25\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
- }
+ }%
\state{end down}[width=+.3125\pgfdecorationsegmentlength,
next state=final]
{
@@ -191,7 +191,7 @@
{\pgfqpoint{.125\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
{\pgfqpoint{.1875\pgfdecorationsegmentlength}{0pt}}
{\pgfqpoint{.3125\pgfdecorationsegmentlength}{0pt}}
- }
+ }%
\state{end up}[width=+.3125\pgfdecorationsegmentlength,
next state=final]
{
@@ -199,12 +199,12 @@
{\pgfqpoint{.125\pgfdecorationsegmentlength}{-\pgfdecorationsegmentamplitude}}
{\pgfqpoint{.1875\pgfdecorationsegmentlength}{0pt}}
{\pgfqpoint{.3125\pgfdecorationsegmentlength}{0pt}}
- }
+ }%
\state{final}
{
\pgfpathlineto{\pgfpointdecoratedpathlast}
- }
-}
+ }%
+}%
% coil decoration
@@ -212,7 +212,7 @@
% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentlength,
\pgfdeclaredecoration{coil}{coil}
-{
+{%
\state{coil}[switch if less than=%
1.5\pgfdecorationsegmentlength+%
\pgfdecorationsegmentaspect\pgfdecorationsegmentamplitude+%
@@ -235,7 +235,7 @@
{\pgfpoint@oncoil{0.445}{-1 }{10}}
{\pgfpoint@oncoil{0 }{-0.555}{11}}
{\pgfpoint@oncoil{0 }{ 0 }{12}}
- }
+ }%
\state{last}[width=.5\pgfdecorationsegmentlength+%
\pgfdecorationsegmentaspect\pgfdecorationsegmentamplitude+%
\pgfdecorationsegmentaspect\pgfdecorationsegmentamplitude,next state=final]
@@ -248,12 +248,12 @@
{\pgfpoint@oncoil{1.555}{ 1 }{4}}
{\pgfpoint@oncoil{2 }{ 0.555}{5}}
{\pgfpoint@oncoil{2 }{ 0 }{6}}
- }
+ }%
\state{final}
{
\pgfpathlineto{\pgfpointdecoratedpathlast}
- }
-}
+ }%
+}%
\def\pgfpoint@oncoil#1#2#3{%
\pgf@x=#1\pgfdecorationsegmentamplitude%
@@ -261,7 +261,7 @@
\pgf@y=#2\pgfdecorationsegmentamplitude%
\pgf@xa=0.083333333333\pgfdecorationsegmentlength%
\advance\pgf@x by#3\pgf@xa%
-}
+}%
% bumps decoration
@@ -269,7 +269,7 @@
% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentlength
\pgfdeclaredecoration{bumps}{initial}
-{
+{%
\state{initial}[auto end on length=+.51\pgfdecorationsegmentlength,
auto corner on length=+.51\pgfdecorationsegmentlength,
width=+.5\pgfdecorationsegmentlength]
@@ -282,18 +282,13 @@
{\pgfqpoint{.38875\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
{\pgfqpoint{.5\pgfdecorationsegmentlength}{.5\pgfdecorationsegmentamplitude}}
{\pgfqpoint{.5\pgfdecorationsegmentlength}{0\pgfdecorationsegmentamplitude}}
- }
+ }%
\state{final}
{
\pgfpathlineto{\pgfpointdecoratedpathlast}
- }
-}
-
-
-
-
-
+ }%
+}%
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathreplacing.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathreplacing.code.tex
index e618ac996cf..10f8371c470 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathreplacing.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathreplacing.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgfmodule{decorations}
+\usepgfmodule{decorations}%
%
@@ -34,19 +34,19 @@
% Parameters: \pgfdecorationsegmentlength, \pgfdecorationsegmentamplitude
\pgfdeclaredecoration{ticks}{ticks}
-{
+{%
\state{ticks}[width=+\pgfdecorationsegmentlength]
{
\pgfpathmoveto{\pgfqpoint{0pt}{\pgfdecorationsegmentamplitude}}
\pgfpathlineto{\pgfqpoint{0pt}{-\pgfdecorationsegmentamplitude}}
- }
+ }%
\state{final}
{
\pgfpathmoveto{\pgfqpoint{0pt}{\pgfdecorationsegmentamplitude}}
\pgfpathlineto{\pgfqpoint{0pt}{-\pgfdecorationsegmentamplitude}}
\pgfpathmoveto{\pgfpointdecoratedpathlast}
- }
-}
+ }%
+}%
@@ -55,9 +55,9 @@
% Parameters: \pgfdecorationsegmentangle, \pgfdecorationsegmentlength
\pgfdeclaredecoration{expanding waves}{initial}
-{
+{%
\state{initial}[width=+\pgfdecorationsegmentlength,next state=wave]
- {}
+ {}%
\state{wave}[switch if less than=+\pgfdecorationsegmentlength to last,
width=+\pgfdecorationsegmentlength]
@@ -67,7 +67,7 @@
{\pgfqpoint{-\pgfdecoratedcompleteddistance}{0pt}}%
{\pgfpointpolar{\pgfdecorationsegmentangle}{+\pgfdecoratedcompleteddistance}}}%
\pgfpatharc{\pgfdecorationsegmentangle}{-\pgfdecorationsegmentangle}{+\pgfdecoratedcompleteddistance}%
- }
+ }%
\state{last}[width=+0pt,next state=final]
{
\pgfpathmoveto{
@@ -75,19 +75,19 @@
{\pgfqpoint{-\pgfdecoratedcompleteddistance}{0pt}}%
{\pgfpointpolar{\pgfdecorationsegmentangle}{+\pgfdecoratedcompleteddistance}}}%
\pgfpatharc{\pgfdecorationsegmentangle}{-\pgfdecorationsegmentangle}{+\pgfdecoratedcompleteddistance}%
- }
+ }%
\state{final}
{
\pgfpathmoveto{\pgfpointdecoratedpathlast}
- }
-}
+ }%
+}%
% waves decoration
\pgfdeclaredecoration{waves}{wave}
-{
+{%
\state{wave}[width=\pgfdecorationsegmentlength]
{
\pgftransformxshift{+\pgfdecorationsegmentlength}
@@ -96,12 +96,12 @@
{\pgfqpoint{-\pgfkeysvalueof{/pgf/decoration/start radius}}{0pt}}%
{\pgfpointpolar{\pgfdecorationsegmentangle}{\pgfkeysvalueof{/pgf/decoration/start radius}}}}%
\pgfpatharc{\pgfdecorationsegmentangle}{-\pgfdecorationsegmentangle}{\pgfkeysvalueof{/pgf/decoration/start radius}}%
- }
+ }%
\state{final}
{
\pgfpathmoveto{\pgfpointdecoratedpathlast}
- }
-}
+ }%
+}%
@@ -110,23 +110,23 @@
% Parameters: \pgfdecorationsegmentlength, \pgfdecorationsegmentamplitude, \pgfdecorationsegmentangle
\pgfdeclaredecoration{border}{tick}
-{
+{%
\state{tick}[switch if less than=+\pgfdecorationsegmentlength to last,
width=+\pgfdecorationsegmentlength]
{
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfpointpolar{\pgfdecorationsegmentangle}{+\pgfdecorationsegmentamplitude}}
- }
+ }%
\state{last}[width=+\pgfdecorationsegmentamplitude,next state=final]
{
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfpointpolar{\pgfdecorationsegmentangle}{+\pgfdecorationsegmentamplitude}}
- }
+ }%
\state{final}
{
\pgfpathmoveto{\pgfpointdecoratedpathlast}
- }
-}
+ }%
+}%
@@ -138,78 +138,91 @@
% Parameters: \pgfdecorationsegmentamplitude
\pgfdeclaredecoration{brace}{brace}
-{
+{%
\state{brace}[width=+\pgfdecoratedremainingdistance,next state=final]
{
+ \pgf@yc=\pgfdecorationsegmentaspect\pgfdecoratedremainingdistance
+ \ifdim2\pgfdecorationsegmentamplitude>\pgf@yc
+ \pgf@yc=0.5\pgf@yc
+ \else
+ \pgf@yc=\pgfdecorationsegmentamplitude
+ \fi
+ \pgf@xc=\pgfdecorationsegmentaspect\pgfdecoratedremainingdistance
+ \advance\pgf@xc-\pgfdecoratedremainingdistance
+ \ifdim-2\pgfdecorationsegmentamplitude<\pgf@xc
+ \pgf@xc=-0.5\pgf@xc
+ \else
+ \pgf@xc=\pgfdecorationsegmentamplitude
+ \fi
\pgfpathmoveto{\pgfpointorigin}
\pgfpathcurveto
- {\pgfqpoint{.15\pgfdecorationsegmentamplitude}{.3\pgfdecorationsegmentamplitude}}
- {\pgfqpoint{.5\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
- {\pgfqpoint{\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{.15\pgf@yc}{.3\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{.5\pgf@yc}{.5\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{\pgf@yc}{.5\pgfdecorationsegmentamplitude}}
{
\pgftransformxshift{+\pgfdecorationsegmentaspect\pgfdecoratedremainingdistance}
- \pgfpathlineto{\pgfqpoint{-\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
+ \pgfpathlineto{\pgfqpoint{-\pgf@yc}{.5\pgfdecorationsegmentamplitude}}
\pgfpathcurveto
- {\pgfqpoint{-.5\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
- {\pgfqpoint{-.15\pgfdecorationsegmentamplitude}{.7\pgfdecorationsegmentamplitude}}
- {\pgfqpoint{0\pgfdecorationsegmentamplitude}{1\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{-.5\pgf@yc}{.5\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{-.15\pgf@yc}{.7\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{0\pgf@yc}{1\pgfdecorationsegmentamplitude}}
\pgfpathcurveto
- {\pgfqpoint{.15\pgfdecorationsegmentamplitude}{.7\pgfdecorationsegmentamplitude}}
- {\pgfqpoint{.5\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
- {\pgfqpoint{\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{.15\pgf@xc}{.7\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{.5\pgf@xc}{.5\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{\pgf@xc}{.5\pgfdecorationsegmentamplitude}}
}
{
\pgftransformxshift{+\pgfdecoratedremainingdistance}
- \pgfpathlineto{\pgfqpoint{-\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
+ \pgfpathlineto{\pgfqpoint{-\pgf@xc}{.5\pgfdecorationsegmentamplitude}}
\pgfpathcurveto
- {\pgfqpoint{-.5\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
- {\pgfqpoint{-.15\pgfdecorationsegmentamplitude}{.3\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{-.5\pgf@xc}{.5\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{-.15\pgf@xc}{.3\pgfdecorationsegmentamplitude}}
{\pgfqpoint{0pt}{0pt}}
}
- }
+ }%
\state{final}
- {}
-}
+ {}%
+}%
% show path construction decoration
%
-\pgfdeclaredecoration{show path construction}{check for moveto}{
- \state{check for moveto}[width=0pt, next state=segment,
- persistent precomputation={%
- \begingroup%
- \pgf@lib@decoraions@installinputsegmentpoints%
- \ifx\pgfdecorationpreviousinputsegment\pgfdecorationinputsegmentmoveto%
- \pgfdecoratedinputsegmentmovetocode%
- \fi%
- \endgroup%
- }]{}
- \state{segment}[width=\pgfdecoratedinputsegmentremainingdistance, next state=check for moveto,
- persistent precomputation={%
- \begingroup%
- \pgf@lib@decoraions@installinputsegmentpoints%
- \csname pgfdecoratedinputsegment\pgfdecorationcurrentinputsegment code\endcsname%
- \endgroup%
- }]{}
- \state{final}{%
- \egroup%
- \begingroup%
- \pgf@lib@decoraions@installinputsegmentpoints%
- \csname pgfdecoratedinputsegment\pgfdecorationcurrentinputsegment code\endcsname%
- \endgroup%
- \bgroup%
- }
-}
+\pgfdeclaredecoration{show path construction}{check for moveto}{%
+ \state{check for moveto}[width=0pt, next state=segment,
+ persistent precomputation={%
+ \begingroup%
+ \pgf@lib@decoraions@installinputsegmentpoints%
+ \ifx\pgfdecorationpreviousinputsegment\pgfdecorationinputsegmentmoveto%
+ \pgfdecoratedinputsegmentmovetocode%
+ \fi%
+ \endgroup%
+ }]{}%
+ \state{segment}[width=\pgfdecoratedinputsegmentremainingdistance, next state=check for moveto,
+ persistent precomputation={%
+ \begingroup%
+ \pgf@lib@decoraions@installinputsegmentpoints%
+ \csname pgfdecoratedinputsegment\pgfdecorationcurrentinputsegment code\endcsname%
+ \endgroup%
+ }]{}%
+ \state{final}{%
+ \egroup%
+ \begingroup%
+ \pgf@lib@decoraions@installinputsegmentpoints%
+ \csname pgfdecoratedinputsegment\pgfdecorationcurrentinputsegment code\endcsname%
+ \endgroup%
+ \bgroup%
+ }%
+}%
\pgfkeys{
- /pgf/decoration/.cd,
- moveto code/.code=\def\pgfdecoratedinputsegmentmovetocode{#1},
- lineto code/.code=\def\pgfdecoratedinputsegmentlinetocode{#1},
- curveto code/.code=\def\pgfdecoratedinputsegmentcurvetocode{#1},
- closepath code/.code=\def\pgfdecoratedinputsegmentclosepathcode{#1}
-}
+ /pgf/decoration/.cd,
+ moveto code/.code=\def\pgfdecoratedinputsegmentmovetocode{#1},
+ lineto code/.code=\def\pgfdecoratedinputsegmentlinetocode{#1},
+ curveto code/.code=\def\pgfdecoratedinputsegmentcurvetocode{#1},
+ closepath code/.code=\def\pgfdecoratedinputsegmentclosepathcode{#1}
+}%
\let\pgfdecoratedinputsegmentmovetocode\pgfutil@empty%
\let\pgfdecoratedinputsegmentlinetocode\pgfutil@empty%
@@ -217,11 +230,11 @@
\let\pgfdecoratedinputsegmentclosepathcode\pgfutil@empty%
\def\pgf@lib@decoraions@installinputsegmentpoints{%
- \let\pgfpointdecoratedinputsegmentfirst\pgf@decorate@inputsegment@first%
- \let\pgfpointdecoratedinputsegmentlast\pgf@decorate@inputsegment@last%
- \let\pgfpointdecoratedinputsegmentsupporta\pgf@decorate@inputsegment@supporta%
- \let\pgfpointdecoratedinputsegmentsupportb\pgf@decorate@inputsegment@supportb%
-}
+ \let\pgfpointdecoratedinputsegmentfirst\pgf@decorate@inputsegment@first%
+ \let\pgfpointdecoratedinputsegmentlast\pgf@decorate@inputsegment@last%
+ \let\pgfpointdecoratedinputsegmentsupporta\pgf@decorate@inputsegment@supporta%
+ \let\pgfpointdecoratedinputsegmentsupportb\pgf@decorate@inputsegment@supportb%
+}%
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.shapes.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.shapes.code.tex
index 8cf75a739bd..6b1571518b6 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.shapes.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.shapes.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgfmodule{decorations}
+\usepgfmodule{decorations}%
% Options for shape decorations
@@ -44,9 +44,9 @@
shape start height=#1,
shape end height=#1
}
-}
+}%
-\def\pgf@lib@shapedecoration@sep{.25cm, between centers}
+\def\pgf@lib@shapedecoration@sep{.25cm, between centers}%
\newif\ifpgfshapedecorationsloped
\pgfshapedecorationslopedtrue
\newif\ifpgfshapedecorationscaled
@@ -57,13 +57,13 @@
% triangle decoration
\pgfdeclaredecoration{triangles}{init}
-{
+{%
\state{init}[width=+0pt,next state=triangle,persistent precomputation={
\pgfmathparse{\pgfkeysvalueof{/pgf/decoration/shape start width}}
\edef\pgf@lib@dec@ssw{\pgfmathresult pt}
\pgfmathparse{\pgfkeysvalueof{/pgf/decoration/shape start height}/2}
\edef\pgf@lib@dec@ssh{\pgfmathresult pt}
- }]{}
+ }]{}%
\state{triangle}[switch if less than=+\pgfdecorationsegmentlength to last,
width=+\pgfdecorationsegmentlength]
{
@@ -71,7 +71,7 @@
\pgfpathlineto{\pgfqpoint{\pgf@lib@dec@ssw}{0pt}}
\pgfpathlineto{\pgfqpoint{0pt}{-\pgf@lib@dec@ssh}}
\pgfpathclose
- }
+ }%
\state{last}[switch if less than=\pgf@lib@dec@ssw to skip,
width=\pgfdecoratedremainingdistance,next state=final]
{
@@ -79,14 +79,14 @@
\pgfpathlineto{\pgfqpoint{\pgf@lib@dec@ssw}{0pt}}
\pgfpathlineto{\pgfqpoint{0pt}{-\pgf@lib@dec@ssh}}
\pgfpathclose
- }
+ }%
\state{skip}[width=\pgfdecoratedremainingdistance]
- {}
+ {}%
\state{final}
{
\pgfpathmoveto{\pgfpointdecoratedpathlast}
- }
-}
+ }%
+}%
@@ -94,13 +94,13 @@
% crosses decoration
\pgfdeclaredecoration{crosses}{init}
-{
+{%
\state{init}[width=+0pt,next state=crosses,persistent precomputation={
\pgfmathparse{\pgfkeysvalueof{/pgf/decoration/shape start width}/2}
\edef\pgf@lib@dec@ssw{\pgfmathresult pt}
\pgfmathparse{\pgfkeysvalueof{/pgf/decoration/shape start height}/2}
\edef\pgf@lib@dec@ssh{\pgfmathresult pt}
- }]{}
+ }]{}%
\state{crosses}[switch if less than=+\pgfdecorationsegmentlength to last,
width=+\pgfdecorationsegmentlength]
{
@@ -108,18 +108,18 @@
\pgfpathlineto{\pgfqpoint{\pgf@lib@dec@ssw}{-\pgf@lib@dec@ssh}}
\pgfpathmoveto{\pgfqpoint{-\pgf@lib@dec@ssw}{-\pgf@lib@dec@ssh}}
\pgfpathlineto{\pgfqpoint{\pgf@lib@dec@ssw}{\pgf@lib@dec@ssh}}
- }
+ }%
\state{last}[width=+\pgfdecoratedremainingdistance]
{
\pgfpathmoveto{\pgfqpoint{-\pgf@lib@dec@ssw}{\pgf@lib@dec@ssh}}
\pgfpathlineto{\pgfqpoint{\pgf@lib@dec@ssw}{-\pgf@lib@dec@ssh}}
\pgfpathmoveto{\pgfqpoint{-\pgf@lib@dec@ssw}{-\pgf@lib@dec@ssh}}
\pgfpathlineto{\pgfqpoint{\pgf@lib@dec@ssw}{\pgf@lib@dec@ssh}}
- }
+ }%
\state{final}{
\pgfpathmoveto{\pgfpointdecoratedpathlast}
- }
-}
+ }%
+}%
@@ -128,14 +128,14 @@
% The shape background decoration
%
-% The shape background decoration adds repeated instances of
+% The shape background decoration adds repeated instances of
% the background path of a specified shape along the path. The shape
% must have been declared by \pgfdeclareshape. If a shape has
% specialized keys (e.g. the number of points on a star, or the apex
-% angle the isosceles triangle), these can be specified in the usual manner.
+% angle the isosceles triangle), these can be specified in the usual manner.
%
-% The sepatation between shapes in the path can be specified and can
-% be between the center of the shape or the border of the shape.
+% The separation between shapes in the path can be specified and can
+% be between the center of the shape or the border of the shape.
%
% The height and width of the shape can be independently or
% simultaneously scaled (linearly) along the path. It is also
@@ -148,52 +148,52 @@
\edef\pgf@lib@shapedecoration@initialise{0pt}%
\pgfdeclaredecoration{shape backgrounds}{initialise}
-{
+{%
\state{initialise}
[
width=+\pgf@lib@shapedecoration@initialise,
next state=shape,
persistent precomputation=
{
- %
+ %
% \egroup ends the group started by the automaton before executing
- % a decoration state. This prevents the need for (most) \global variables.
- %
- %
+ % a decoration state. This prevents the need for (most) \global variables.
+ %
+ %
% Check the shape exists.
- %
+ %
\pgfutil@ifundefined{pgf@sh@bg@\pgfkeysvalueof{/pgf/decoration/shape}}{%
\pgferror{I do not know the shape `\pgfkeysvalueof{/pgf/decoration/shape}',
- so I cannot use it in a decoration. Check if its library been loaded or if you
+ so I cannot use it in a decoration. Check if its library been loaded or if you
simply mistyped the name}}{}%
- %
+ %
% Calculate a `default' path size.
- %
+ %
\pgfinterruptpath%
\pgfinterruptboundingbox%
\pgftransformreset%
\pgf@relevantforpicturesizetrue%
- %
+ %
% This size of this shape is unimportant, but it should
% be just large/small enough to avoid huge errors when
- % calculting the scaling factors later on.
- %
+ % calculating the scaling factors later on.
+ %
\pgfkeys{/pgf/inner sep=50pt, /pgf/minimum size=1pt}% Arbitrary lengths.
\setbox\pgfnodeparttextbox\hbox{}% Assume shape does nothing special if box is empty.
- \let\pgf@sh@savedmacros\pgfutil@empty%
+ \let\pgf@sh@savedmacros\pgfutil@empty%
\let\pgf@sh@savedpoints\pgfutil@empty%
\csname pgf@sh@s@\pgfkeysvalueof{/pgf/decoration/shape}\endcsname%
\pgf@sh@savedpoints%
\pgf@sh@savedmacros%
- %
- % Save the macros and pionts.
- %
+ %
+ % Save the macros and points.
+ %
\expandafter\gdef\expandafter\pgf@lib@shapedecoration@points\expandafter{\pgf@sh@savedpoints}%
\expandafter\gdef\expandafter\pgf@lib@shapedecoration@macros\expandafter{\pgf@sh@savedmacros}%
- \csname pgf@sh@bg@\pgfkeysvalueof{/pgf/decoration/shape}\endcsname%
- %
+ \csname pgf@sh@bg@\pgfkeysvalueof{/pgf/decoration/shape}\endcsname%
+ %
% Save the dimensions of the shape path.
- %
+ %
\pgf@x\pgf@picmaxx%
\pgf@y\pgf@picmaxy%
\advance\pgf@x-\pgf@picminx%
@@ -204,52 +204,52 @@
}%
\endpgfinterruptboundingbox%
\endpgfinterruptpath%
- %
+ %
\edef\pgf@lib@shapedecoration@beforeshape{0pt}%
\edef\pgf@lib@shapedecoration@aftershape{0pt}%
- %
+ %
\pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/decoration/shape start width}}%
\edef\pgf@lib@shapedecoration@startwidth{\the\pgf@x}%
\edef\pgf@lib@shapedecoration@width{\the\pgf@x}%
\pgf@x-\pgf@x%
\pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/decoration/shape end width}}%
\edef\pgf@lib@shapedecoration@widthchange{\the\pgf@x}%
- %
+ %
\pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/decoration/shape start height}}%
\edef\pgf@lib@shapedecoration@initialheight{\the\pgf@y}%
\edef\pgf@lib@shapedecoration@height{\the\pgf@y}%
\pgf@y-\pgf@y%
\pgfmathaddtolength\pgf@y{\pgfkeysvalueof{/pgf/decoration/shape end height}}%
\edef\pgf@lib@shapedecoration@heightchange{\the\pgf@y}%
- %
+ %
% Calculate the sep.
- %
+ %
\ifx\pgf@lib@shapedecoration@spread\pgfutil@empty%
- %
+ %
% Not spreading, so easy:
- %
+ %
\def\pgf@lib@shapedecoration@borderstext{between borders}%
\afterassignment\pgf@lib@shapedecoration@setkeyword%
\expandafter\pgf@x\pgf@lib@shapedecoration@sep,\pgf@stop%
\edef\pgf@lib@shapedecoration@sep{\the\pgf@x}%
\else%
- %
+ %
% Spreading (a bit of a nuiscence actually).
- %
+ %
\def\pgf@lib@shapedecoration@borderstext{by borders}%
\afterassignment\pgf@lib@shapedecoration@setkeyword%
\expandafter\c@pgf@counta\pgf@lib@shapedecoration@spread,\pgf@stop%
\ifpgf@lib@shapedecoration@betweenborders%
- %
+ %
% Ok. The required sep between borders is:
- %
+ %
% (r -(n-1)((a+b)/2))/(n-1)
- %
+ %
% r = decoration length (here, the remaining distance)
% a = initial width
% b = end width
% n = the number of shapes
- %
+ %
\ifnum\c@pgf@counta>1\relax%
\advance\c@pgf@counta-1\relax%
\pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/decoration/shape start width}}%
@@ -263,11 +263,11 @@
\advance\pgf@x\pgfdecoratedremainingdistance%
\divide\pgf@x\c@pgf@counta%
\pgf@x.9999\pgf@x% Hackery to control some native TeX inaccuracies.
- %
+ %
% Unfortunately if the shape is scaled, and evenly spread by borders,
- % it is necessary to do something a bit different to control for
+ % it is necessary to do something a bit different to control for
% (most) inaccuracies.
- %
+ %
\ifpgfshapedecorationscaled%
\pgf@xa\pgf@lib@shapedecoration@widthchange\relax%
\divide\pgf@xa\c@pgf@counta%
@@ -285,9 +285,9 @@
\fi%
\fi%
\else%
- %
+ %
% Between centers.
- %
+ %
\pgf@x\pgfdecoratedremainingdistance%
\ifnum\c@pgf@counta>1\relax%
\advance\c@pgf@counta-1\relax%
@@ -305,7 +305,7 @@
\edef\pgf@lib@shapedecoration@sep{\the\pgf@x}%
\fi%
}]
- {}
+ {}%
\state{before shape}
[
width=\pgf@lib@shapedecoration@beforeshape-1sp,
@@ -315,50 +315,50 @@
\ifpgfshapedecorationscaled%
\ifpgf@lib@shapedecoration@betweenborders%
\ifx\pgf@lib@shapedecoration@spread\pgfutil@empty%
- %
+ %
% Not so straightforward. The required ratio is given by
- %
+ %
% R = (c+W/2)/(c+r-.5*w)
- %
+ %
% c = completed distance
% r = remaining distance
% W = initial width
% w = the change in width (i.e., end - start)
- %
+ %
\pgf@x\pgfdecoratedcompleteddistance%
\advance\pgf@x\pgfdecoratedremainingdistance%
\pgf@xa\pgf@lib@shapedecoration@startwidth\relax%
\pgf@xa.5\pgf@xa%
\advance\pgf@xa\pgfdecoratedcompleteddistance% c+W/2
- %
+ %
\pgf@xb\pgf@lib@shapedecoration@widthchange\relax%
\pgf@xb-.5\pgf@xb%
\advance\pgf@xb\pgf@x% c+r-.5*w
- %
+ %
\pgfmathdivide@{\pgfmath@tonumber{\pgf@xa}}{\pgfmath@tonumber{\pgf@xb}}%
\fi%
\else%
- %
- % Easy peasy. The required ratio is
- %
+ %
+ % Easy peasy. The required ratio is
+ %
% R = c / (c+r)
- %
+ %
\pgf@y\pgfdecoratedcompleteddistance%
\advance\pgf@y\pgfdecoratedremainingdistance%
\pgfmathdivide@{\pgfmath@tonumber{\pgfdecoratedcompleteddistance}}{\pgfmath@tonumber{\pgf@y}}%
\fi%
- %
+ %
% Get the new width.
- %
+ %
\ifx\pgf@lib@shapedecoration@spread\pgfutil@empty%
\pgf@x\pgf@lib@shapedecoration@widthchange\relax%
\pgf@x\pgfmathresult\pgf@x%
\advance\pgf@x\pgf@lib@shapedecoration@startwidth\relax%
\else%
\ifpgf@lib@shapedecoration@betweenborders%
- %
- % Specical case when decoration is scaled, and evenly spread by borders.
- %
+ %
+ % Special case when decoration is scaled, and evenly spread by borders.
+ %
\pgf@x\pgf@lib@shapedecoration@width\relax%
\advance\pgf@x\pgf@lib@shapedecoration@specialwidth\relax%
\pgf@xa\pgf@x%
@@ -372,15 +372,15 @@
\fi%
\fi%
\edef\pgf@lib@shapedecoration@width{\the\pgf@x}%
- %
+ %
% New height = R*h + H
- %
+ %
\pgf@y\pgf@lib@shapedecoration@heightchange\relax%
\pgf@y\pgfmathresult\pgf@y%
\advance\pgf@y\pgf@lib@shapedecoration@initialheight\relax%
\edef\pgf@lib@shapedecoration@height{\the\pgf@y}%
\fi%
- %
+ %
\ifpgf@lib@shapedecoration@betweenborders%
\pgf@x\pgf@lib@shapedecoration@width\relax%
\pgf@x.5\pgf@x%
@@ -389,16 +389,16 @@
\def\pgf@lib@shapedecoration@beforeshape{0pt}%
\fi%
}]
- {}
+ {}%
\state{shape}[width=+0sp,next state=after shape]
{
\ifpgfshapedecorationsloped%
\else%
\pgftransformrotate{-\pgfdecoratedangle}%
\fi%
- %
+ %
% Scale the path when it is actually drawn.
- %
+ %
\pgf@lib@shapedecoration@shapepathsize%
\pgfutil@tempdima\pgf@x%
\pgfutil@tempdimb\pgf@y%
@@ -406,14 +406,14 @@
\pgf@xb\pgfutil@tempdima%
\pgfmathdivide@{\pgfmath@tonumber{\pgf@xa}}{\pgfmath@tonumber{\pgf@xb}}%
\expandafter\pgftransformxscale\expandafter{\pgfmathresult}%
- %
+ %
\pgf@ya\pgf@lib@shapedecoration@height\relax%
\pgf@yb\pgfutil@tempdimb%
\pgfmathdivide@{\pgfmath@tonumber{\pgf@ya}}{\pgfmath@tonumber{\pgf@yb}}%
\expandafter\pgftransformyscale\expandafter{\pgfmathresult}%
- %
+ %
% Move to the center anchor.
- %
+ %
\pgf@lib@shapedecoration@points%
\pgf@lib@shapedecoration@macros%
\pgftransformshift{%
@@ -421,11 +421,11 @@
\pgf@x-\pgf@x%
\pgf@y-\pgf@y%
}%
- %
+ %
% And draw the shape path.
- %
+ %
\csname pgf@sh@bg@\pgfkeysvalueof{/pgf/decoration/shape}\endcsname%
- }
+ }%
\state{after shape}
[
width=\pgf@lib@shapedecoration@aftershape-1sp,
@@ -441,28 +441,28 @@
\fi%
}
]
- {}
+ {}%
\state{sep}[width=\pgf@lib@shapedecoration@sep,next state=before shape,
persistent precomputation=\def\pgf@lib@shapedecoration@beforeshape{0pt}]
- {}
+ {}%
\state{final}
{
\pgfpathmoveto{\pgfpointdecoratedpathlast}%
- }
-}
+ }%
+}%
\def\pgf@lib@shapedecoration@setkeyword,{%
\pgfutil@ifnextchar\pgf@stop{\def\pgf@temp{}\pgf@lib@@@shapedecoration@setkeyword}{\pgf@lib@@shapedecoration@setkeyword}%
-}
-\def\pgf@lib@@shapedecoration@setkeyword#1,{\def\pgf@temp{#1}\pgf@lib@@@shapedecoration@setkeyword}
+}%
+\def\pgf@lib@@shapedecoration@setkeyword#1,{\def\pgf@temp{#1}\pgf@lib@@@shapedecoration@setkeyword}%
\def\pgf@lib@@@shapedecoration@setkeyword\pgf@stop{%
\ifx\pgf@temp\pgf@lib@shapedecoration@borderstext%
\pgf@lib@shapedecoration@betweenborderstrue%
\else%
\pgf@lib@shapedecoration@betweenbordersfalse%
\fi%
-}
+}%
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.text.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.text.code.tex
index b13f3ce0199..4d31c46fcfc 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.text.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.text.code.tex
@@ -7,138 +7,141 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgfmodule{decorations}
+\usepgfmodule{decorations}%
% Options for text decorations
\pgfkeys{
- /pgf/decoration/.cd,
- text/.store in=\pgfdecorationtext,%
- text color/.store in=\pgf@lib@decorationtextcolor,%
- text format delimiters/.code={\expandafter\pgfsetdecoratetextformatdelimiters#1},
- text align/.code={\pgfkeys{/pgf/decoration/text align/.cd,#1}},
- text align/.cd,
- align/.initial=left,
- left/.style={/pgf/decoration/text align/align=left},
- right/.style={/pgf/decoration/text align/align=right},
- center/.style={/pgf/decoration/text align/align=center},
- left indent/.initial=0pt,
- right indent/.initial=0pt,
- fit to path/.is if=pgf@lib@dec@text@fit,
- fit to path stretching spaces/.default=true,
- fit to path stretching spaces/.code={%
- \csname pgf@lib@dec@text@fit#1\endcsname%
- \csname pgf@lib@dec@text@stretch@spaces#1\endcsname%
- }%
-}
+ /pgf/decoration/.cd,
+ text/.store in=\pgfdecorationtext,%
+ text color/.store in=\pgf@lib@decorationtextcolor,%
+ text format delimiters/.code={\expandafter\pgfsetdecoratetextformatdelimiters#1},
+ text align/.code={\pgfkeys{/pgf/decoration/text align/.cd,#1}},
+ text align/.cd,
+ align/.initial=left,
+ left/.style={/pgf/decoration/text align/align=left},
+ right/.style={/pgf/decoration/text align/align=right},
+ center/.style={/pgf/decoration/text align/align=center},
+ left indent/.initial=0pt,
+ right indent/.initial=0pt,
+ fit to path/.is if=pgf@lib@dec@text@fit,
+ fit to path stretching spaces/.default=true,
+ fit to path stretching spaces/.code={%
+ \csname pgf@lib@dec@text@fit#1\endcsname%
+ \csname pgf@lib@dec@text@stretch@spaces#1\endcsname%
+ }%
+}%
\newif\ifpgf@lib@dec@text@scan@space
\newif\ifpgf@lib@dec@text@stretch@spaces
\newif\ifpgf@lib@dec@text@fit
-\def\pgf@lib@decorationtextcolor{black}
+\def\pgf@lib@decorationtextcolor{black}%
-\def\pgf@lib@dec@text@left@text{left}
-\def\pgf@lib@dec@text@right@text{right}
-\def\pgf@lib@dec@text@right@center{center}
+\def\pgf@lib@dec@text@left@text{left}%
+\def\pgf@lib@dec@text@right@text{right}%
+\def\pgf@lib@dec@text@right@center{center}%
% Decorates a path with a text. The path is removed during this
% process
-\pgfdeclaredecoration{text along path}{initial}{
-\state{initial}[width=+0pt, next state=left indent,
- persistent precomputation={%
- \edef\pgf@lib@dec@text@indent@left{\pgfkeysvalueof{/pgf/decoration/text align/left indent}}%
- \edef\pgf@lib@dec@text@indent@right{\pgfkeysvalueof{/pgf/decoration/text align/right indent}}%
- \edef\pgf@lib@dec@text@align{\pgfkeysvalueof{/pgf/decoration/text align/align}}%
- \pgfdecoratedremainingdistance=\pgfdecoratedpathlength%
- \advance\pgfdecoratedremainingdistance by-\pgf@lib@dec@text@indent@right\relax%
- \edef\pgfdecoratedpathlength{\the\pgfdecoratedremainingdistance}%
- \pgf@lib@dec@text@getwidth%
- \pgf@x=\pgf@lib@dec@text@width\relax%
- \pgf@y=\pgfdecoratedremainingdistance%
- \ifpgf@lib@dec@text@fit%
- \advance\pgf@y by-\pgf@lib@dec@text@indent@left\relax%
- \advance\pgf@y by-\pgf@x%
- \ifpgf@lib@dec@text@stretch@spaces%
- \def\pgf@lib@dec@text@character@shift{0pt}%
- \divide\pgf@y by\pgf@lib@dec@space@count\relax%
- \edef\pgf@lib@dec@text@space@shift{\the\pgf@y}%
- \else%
- \c@pgf@counta=\pgf@lib@dec@character@count\relax%
- \advance\c@pgf@counta by-1\relax%
- \divide\pgf@y by\c@pgf@counta\relax%
- \edef\pgf@lib@dec@text@character@shift{\the\pgf@y}%
- \def\pgf@lib@dec@text@space@shift{0pt}%
- \fi%
- \ifdim\pgf@y<0pt\relax%
- \pgf@lib@dec@text@fitfalse%
- \pgf@lib@dec@text@stretch@spacesfalse%
- \def\pgf@lib@dec@text@character@shift{0pt}%
- \def\pgf@lib@dec@text@space@shift{0pt}%
- \fi%
- \else%
- \def\pgf@lib@dec@text@character@shift{0pt}%
- \def\pgf@lib@dec@text@space@shift{0pt}%
- \ifx\pgf@lib@dec@text@align\pgf@lib@dec@text@left@text%
- \else%
- \ifx\pgf@lib@dec@text@align\pgf@lib@dec@text@right@text%
- \advance\pgf@y by-\pgf@x%
- \edef\pgf@lib@dec@text@indent@left{\the\pgf@y}%
- \else%
- \advance\pgf@y by-\pgf@x%
- \advance\pgf@y by-\pgf@lib@dec@text@indent@left\relax%
- \pgf@y=0.5\pgf@y%
- \advance\pgf@y by\pgf@lib@dec@text@indent@left\relax%
- \edef\pgf@lib@dec@text@indent@left{\the\pgf@y}%
- \fi%
- \fi%
- \fi%
- \let\pgfdecorationrestoftext=\pgfdecorationtext%
- }]{}
-\state{left indent}[width=+\pgf@lib@dec@text@indent@left, next state=scan]{}
+\pgfdeclaredecoration{text along path}{initial}{%
+ \state{initial}[
+ width=+0pt, next state=left indent,
+ persistent precomputation={%
+ \edef\pgf@lib@dec@text@indent@left{\pgfkeysvalueof{/pgf/decoration/text align/left indent}}%
+ \edef\pgf@lib@dec@text@indent@right{\pgfkeysvalueof{/pgf/decoration/text align/right indent}}%
+ \edef\pgf@lib@dec@text@align{\pgfkeysvalueof{/pgf/decoration/text align/align}}%
+ \pgfdecoratedremainingdistance=\pgfdecoratedpathlength%
+ \advance\pgfdecoratedremainingdistance by-\pgf@lib@dec@text@indent@right\relax%
+ \edef\pgfdecoratedpathlength{\the\pgfdecoratedremainingdistance}%
+ \pgf@lib@dec@text@getwidth%
+ \pgf@x=\pgf@lib@dec@text@width\relax%
+ \pgf@y=\pgfdecoratedremainingdistance%
+ \ifpgf@lib@dec@text@fit%
+ \advance\pgf@y by-\pgf@lib@dec@text@indent@left\relax%
+ \advance\pgf@y by-\pgf@x%
+ \ifpgf@lib@dec@text@stretch@spaces%
+ \def\pgf@lib@dec@text@character@shift{0pt}%
+ \divide\pgf@y by\pgf@lib@dec@space@count\relax%
+ \edef\pgf@lib@dec@text@space@shift{\the\pgf@y}%
+ \else%
+ \c@pgf@counta=\pgf@lib@dec@character@count\relax%
+ \advance\c@pgf@counta by-1\relax%
+ \divide\pgf@y by\c@pgf@counta\relax%
+ \edef\pgf@lib@dec@text@character@shift{\the\pgf@y}%
+ \def\pgf@lib@dec@text@space@shift{0pt}%
+ \fi%
+ \ifdim\pgf@y<0pt\relax%
+ \pgf@lib@dec@text@fitfalse%
+ \pgf@lib@dec@text@stretch@spacesfalse%
+ \def\pgf@lib@dec@text@character@shift{0pt}%
+ \def\pgf@lib@dec@text@space@shift{0pt}%
+ \fi%
+ \else%
+ \def\pgf@lib@dec@text@character@shift{0pt}%
+ \def\pgf@lib@dec@text@space@shift{0pt}%
+ \ifx\pgf@lib@dec@text@align\pgf@lib@dec@text@left@text%
+ \else%
+ \ifx\pgf@lib@dec@text@align\pgf@lib@dec@text@right@text%
+ \advance\pgf@y by-\pgf@x%
+ \edef\pgf@lib@dec@text@indent@left{\the\pgf@y}%
+ \else%
+ \advance\pgf@y by-\pgf@x%
+ \advance\pgf@y by-\pgf@lib@dec@text@indent@left\relax%
+ \pgf@y=0.5\pgf@y%
+ \advance\pgf@y by\pgf@lib@dec@text@indent@left\relax%
+ \edef\pgf@lib@dec@text@indent@left{\the\pgf@y}%
+ \fi%
+ \fi%
+ \fi%
+ \let\pgfdecorationrestoftext=\pgfdecorationtext%
+ }]{}%
+\state{left indent}[width=+\pgf@lib@dec@text@indent@left, next state=scan]{}%
%
-\state{scan}[width=+0pt, next state=before typeset,
- persistent precomputation={
- \pgf@lib@dec@text@scanchar%
- \ifvoid\pgf@lib@dec@text@box%
- \setbox\pgf@lib@dec@text@box\hbox{}%
- \wd\pgf@lib@dec@text@box16383pt\relax%
- \fi%
- }]{}
+\state{scan}[
+ width=+0pt,
+ next state=before typeset,
+ persistent precomputation={
+ \pgf@lib@dec@text@scanchar%
+ \ifvoid\pgf@lib@dec@text@box%
+ \setbox\pgf@lib@dec@text@box\hbox{}%
+ \wd\pgf@lib@dec@text@box16383pt\relax%
+ \fi%
+}]{}%
%
-\state{before typeset}[width=+.5\wd\pgf@lib@dec@text@box, next state=typeset]{}
+\state{before typeset}[width=+.5\wd\pgf@lib@dec@text@box, next state=typeset]{}%
%
\state{typeset}[width=+0pt, next state=after typeset]
{%
\pgftransformxshift{+-.5\wd\pgf@lib@dec@text@box}%
\setbox\pgf@hbox\hbox{\copy\pgf@lib@dec@text@box}%
\pgfqboxsynced\pgf@hbox%
-}
+}%
\state{after typeset}[width=+.5\wd\pgf@lib@dec@text@box, next state=shift,
- persistent precomputation={%
- \ifpgf@lib@dec@text@fit%
- \ifpgf@lib@dec@text@stretch@spaces%
- \ifpgf@lib@dec@text@scan@space%
- \let\pgf@lib@dec@text@shift=\pgf@lib@dec@text@space@shift%
- \else%
- \def\pgf@lib@dec@text@shift{0pt}%
- \fi%
- \else%
- \let\pgf@lib@dec@text@shift=\pgf@lib@dec@text@character@shift%
- \fi%
- \else%
- \def\pgf@lib@dec@text@shift{0pt}%
- \fi%
- }]{}
-\state{shift}[width=+\pgf@lib@dec@text@shift, next state=scan]{}
-\state{final}{}
-}
+ persistent precomputation={%
+ \ifpgf@lib@dec@text@fit%
+ \ifpgf@lib@dec@text@stretch@spaces%
+ \ifpgf@lib@dec@text@scan@space%
+ \let\pgf@lib@dec@text@shift=\pgf@lib@dec@text@space@shift%
+ \else%
+ \def\pgf@lib@dec@text@shift{0pt}%
+ \fi%
+ \else%
+ \let\pgf@lib@dec@text@shift=\pgf@lib@dec@text@character@shift%
+ \fi%
+ \else%
+ \def\pgf@lib@dec@text@shift{0pt}%
+ \fi%
+ }]{}%
+\state{shift}[width=+\pgf@lib@dec@text@shift, next state=scan]{}%
+\state{final}{}%
+}%
% \pgfsetdecoratetextformatdelimiters
-%
+%
% Set the delimiters for formatting in the text decoration.
% NB: Catcodes for delimiters should be 11 or 12.
%
@@ -153,18 +156,18 @@
% \def\pgfdecoratetext{The [\it]very[+\color{green}]green[] sprouts.}
%
\def\pgfsetdecoratetextformatdelimiters#1#2{%
- \def\pgf@lib@dec@text@formatchar{#1}%
- \def\pgf@test{#2}%
- \ifx\pgf@test\pgfutil@empty%
- \def\pgf@lib@dec@text@collectformat##1#1{%
- \pgf@lib@dec@text@@collectformat##1\pgf@stop}%
- \else%
- \def\pgf@lib@dec@text@collectformat##1#2{%
- \pgf@lib@dec@text@@collectformat##1\pgf@stop}%
- \fi%
-}
-
-\pgfsetdecoratetextformatdelimiters{|}{}
+ \def\pgf@lib@dec@text@formatchar{#1}%
+ \def\pgf@test{#2}%
+ \ifx\pgf@test\pgfutil@empty%
+ \def\pgf@lib@dec@text@collectformat##1#1{%
+ \pgf@lib@dec@text@@collectformat##1\pgf@stop}%
+ \else%
+ \def\pgf@lib@dec@text@collectformat##1#2{%
+ \pgf@lib@dec@text@@collectformat##1\pgf@stop}%
+ \fi%
+}%
+
+\pgfsetdecoratetextformatdelimiters{|}{}%
\newbox\pgf@lib@dec@text@box
\newif\ifpgf@lib@decorate@textmathmode
@@ -174,174 +177,181 @@
\let\pgf@lib@dec@text@format=\pgfutil@empty
\def\pgf@lib@dec@text@scanchar{%
- \pgf@lib@dec@text@scan@spacefalse%
- \ifx\pgfdecorationrestoftext\pgfutil@empty%
- \let\pgf@lib@dec@text@char\pgfutil@empty%
- \setbox\pgf@lib@dec@text@box\box\pgfutil@voidb@x%
- \let\pgf@next\relax%
- \else%
- \let\pgf@next\pgf@lib@dec@text@@scanchar%
- \fi%
- \pgf@next}
-
+ \pgf@lib@dec@text@scan@spacefalse%
+ \ifx\pgfdecorationrestoftext\pgfutil@empty%
+ \let\pgf@lib@dec@text@char\pgfutil@empty%
+ \setbox\pgf@lib@dec@text@box\box\pgfutil@voidb@x%
+ \let\pgf@next\relax%
+ \else\ifx\pgfdecorationrestoftext\pgf@lib@dec@mathshift%
+ \ifpgf@lib@decorate@textmathmode%
+ \pgf@lib@decorate@textmathmodefalse%
+ \fi%
+ \let\pgf@lib@dec@text@char\pgfutil@empty%
+ \setbox\pgf@lib@dec@text@box\box\pgfutil@voidb@x%
+ \let\pgf@next\relax%
+ \else
+ \let\pgf@next\pgf@lib@dec@text@@scanchar%
+ \fi\fi%
+ \pgf@next}%
+
\def\pgf@lib@dec@text@@scanchar{%
- \expandafter\pgf@lib@dec@text@@@scanchar\pgfdecorationrestoftext\pgf@stop}
+ \expandafter\pgf@lib@dec@text@@@scanchar\pgfdecorationrestoftext\pgf@stop}%
\def\pgf@lib@dec@text@@@scanchar{%
- \futurelet\pgf@lib@dec@lettoken%
- \pgf@lib@dec@text@@@@scanchar}
-
+ \futurelet\pgf@lib@dec@lettoken%
+ \pgf@lib@dec@text@@@@scanchar}%
+
\def\pgf@lib@dec@text@@@@scanchar{%
- \ifx\pgf@lib@dec@lettoken\pgfutil@sptoken%
- \let\pgf@next\pgf@lib@dec@text@insertspace%
- \else%
- \let\pgf@next\pgf@lib@dec@text@@@@@scanchar%
- \fi%
- \pgf@next}
+ \ifx\pgf@lib@dec@lettoken\pgfutil@sptoken%
+ \let\pgf@next\pgf@lib@dec@text@insertspace%
+ \else%
+ \let\pgf@next\pgf@lib@dec@text@@@@@scanchar%
+ \fi%
+ \pgf@next}%
\def\pgf@lib@dec@text@@@@@scanchar{%
- \pgfutil@ifnextchar\bgroup{\pgf@lib@dec@text@collectgroup}%
- {\pgf@lib@dec@text@@@@@@scanchar}}
-
+ \pgfutil@ifnextchar\bgroup{\pgf@lib@dec@text@collectgroup}%
+ {\pgf@lib@dec@text@@@@@@scanchar}}%
+
\def\pgf@lib@dec@text@collectgroup#1{%
- \def\pgf@lib@dec@text@char{#1}%
- \pgf@lib@dec@text@collectrestoftext}
-
+ \def\pgf@lib@dec@text@char{#1}%
+ \pgf@lib@dec@text@collectrestoftext}%
+
\def\pgf@lib@dec@text@@@@@@scanchar#1{%
- \ifx#1\pgf@stop%
- \pgf@lib@dec@text@box\box\pgfutil@voidb@x%
- \let\pgf@next\pgf@lib@dec@text@endoftext%
- \else%
- \def\pgf@lib@dec@text@char{#1}%
- \ifx#1\space%
- \let\pgf@next\pgf@lib@dec@text@collectrestoftext%
- \else%
- \ifx#1\ %
- \let\pgf@next\pgf@lib@dec@text@collectrestoftext%
- \else%
- \ifx\pgf@lib@dec@text@char\pgf@lib@dec@text@formatchar%
- \let\pgf@next\pgf@lib@dec@text@collectformat%
- \else%
- \expandafter\ifcat\noexpand#1\relax%
- \let\pgf@next\pgf@lib@dec@text@expandcs%
- \else%
- \ifnum\catcode`#1=3\relax%
- \ifpgf@lib@decorate@textmathmode%
- \pgf@lib@decorate@textmathmodefalse%
- \else%
- \pgf@lib@decorate@textmathmodetrue%
- \fi%
- \let\pgf@next\pgf@lib@dec@text@@@scanchar%
- \else%
- \let\pgf@next\pgf@lib@dec@text@collectrestoftext%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \pgf@next%
-}
+ \ifx#1\pgf@stop%
+ \pgf@lib@dec@text@box\box\pgfutil@voidb@x%
+ \let\pgf@next\pgf@lib@dec@text@endoftext%
+ \else%
+ \def\pgf@lib@dec@text@char{#1}%
+ \ifx#1\space%
+ \let\pgf@next\pgf@lib@dec@text@collectrestoftext%
+ \else%
+ \ifx#1\ %
+ \let\pgf@next\pgf@lib@dec@text@collectrestoftext%
+ \else%
+ \ifx\pgf@lib@dec@text@char\pgf@lib@dec@text@formatchar%
+ \let\pgf@next\pgf@lib@dec@text@collectformat%
+ \else%
+ \expandafter\ifcat\noexpand#1\relax%
+ \let\pgf@next\pgf@lib@dec@text@expandcs%
+ \else%
+ \ifnum\catcode`#1=3\relax%
+ \ifpgf@lib@decorate@textmathmode%
+ \pgf@lib@decorate@textmathmodefalse%
+ \else%
+ \pgf@lib@decorate@textmathmodetrue%
+ \fi%
+ \let\pgf@next\pgf@lib@dec@text@@@scanchar%
+ \else%
+ \let\pgf@next\pgf@lib@dec@text@collectrestoftext%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \pgf@next%
+}%
\def\pgf@lib@dec@text@@collectformat{%
- \pgfutil@ifnextchar+{\pgf@lib@dec@text@addtoformat}{\pgf@lib@dec@text@setformat}}
-
+ \pgfutil@ifnextchar+{\pgf@lib@dec@text@addtoformat}{\pgf@lib@dec@text@setformat}}%
+
\def\pgf@lib@dec@text@setformat#1\pgf@stop{%
- \def\pgf@lib@dec@text@format{#1}%
- \pgf@lib@dec@text@@@scanchar%
-}
+ \def\pgf@lib@dec@text@format{#1}%
+ \pgf@lib@dec@text@@@scanchar%
+}%
\def\pgf@lib@dec@text@addtoformat+#1\pgf@stop{%
- \expandafter\def\expandafter\pgf@lib@dec@text@format\expandafter{\pgf@lib@dec@text@format#1}%
- \pgf@lib@dec@text@@@scanchar%
-}
+ \expandafter\def\expandafter\pgf@lib@dec@text@format\expandafter{\pgf@lib@dec@text@format#1}%
+ \pgf@lib@dec@text@@@scanchar%
+}%
\def\pgf@lib@dec@text@insertspace{%
- \pgf@lib@dec@text@scan@spacetrue%
- \pgfutil@ifnextchar\bgroup{\pgf@lib@dec@text@@insertspacegrp}%
- {\pgf@lib@dec@text@@insertspace}}
-
+ \pgf@lib@dec@text@scan@spacetrue%
+ \pgfutil@ifnextchar\bgroup{\pgf@lib@dec@text@@insertspacegrp}%
+ {\pgf@lib@dec@text@@insertspace}}%
+
\def\pgf@lib@dec@text@@insertspacegrp#1{%
- \pgf@lib@dec@text@@@@@@scanchar\space{#1}}
-
+ \pgf@lib@dec@text@@@@@@scanchar\space{#1}}%
+
\def\pgf@lib@dec@text@@insertspace#1{%
- \pgf@lib@dec@text@@@@@@scanchar\space#1}
-
+ \pgf@lib@dec@text@@@@@@scanchar\space#1}%
+
\def\pgf@lib@dec@text@expandcs{%
- \expandafter\expandafter\expandafter\pgf@lib@dec@text@@@@@scanchar%
- \pgf@lib@dec@text@char}
+ \expandafter\expandafter\expandafter\pgf@lib@dec@text@@@@@scanchar%
+ \pgf@lib@dec@text@char}%
\def\pgf@lib@dec@text@endoftext{%
- \let\pgfdecoraterestoftext\pgfutil@empty%
- \let\pgf@lib@dec@text@char\pgfutil@empty%
-}
+ \let\pgfdecorationrestoftext\pgfutil@empty%
+ \let\pgf@lib@dec@text@char\pgfutil@empty%
+}%
\def\pgf@lib@dec@text@collectrestoftext{%
- \pgf@lib@dec@text@dobox%
- \futurelet\pgf@lib@dec@text@lettoken%
- \pgf@lib@dec@text@@collectrestoftext}
+ \pgf@lib@dec@text@dobox%
+ \futurelet\pgf@lib@dec@text@lettoken%
+ \pgf@lib@dec@text@@collectrestoftext}%
\def\pgf@lib@dec@text@@collectrestoftext{%
- \ifx\bgroup\pgf@lib@dec@text@lettoken%
- \let\pgf@next\pgf@lib@dec@text@@@collectrestoftextgrp%
- \else%
- \let\pgf@next\pgf@lib@dec@text@@@collectrestoftext%
- \fi%
- \pgf@next}
-
+ \ifx\bgroup\pgf@lib@dec@text@lettoken%
+ \let\pgf@next\pgf@lib@dec@text@@@collectrestoftextgrp%
+ \else%
+ \let\pgf@next\pgf@lib@dec@text@@@collectrestoftext%
+ \fi%
+ \pgf@next}%
+
\def\pgf@lib@dec@text@@@collectrestoftextgrp#1#2\pgf@stop{\def\pgfdecorationrestoftext{{#1}#2}%
-}
+}%
-\def\pgf@lib@dec@text@@@collectrestoftext#1\pgf@stop{\def\pgfdecorationrestoftext{#1}}
+\def\pgf@lib@dec@text@@@collectrestoftext#1\pgf@stop{\def\pgfdecorationrestoftext{#1}}%
{%
- \catcode`\$3 %
- \gdef\pgf@lib@dec@mathshift{$}%
- \catcode`\$9 $% For editors with annoying syntax highlighting.
+ \catcode`\$3 %
+ \gdef\pgf@lib@dec@mathshift{$}%
+ \catcode`\$9 $% For editors with annoying syntax highlighting.
}%
\def\pgf@lib@dec@text@dobox{%
- \setbox\pgf@lib@dec@text@box\hbox{%
- \pgfinterruptpicture%
- \begingroup%
- \pgfsetcolor{\pgf@lib@decorationtextcolor}%
- \ifpgf@lib@decorate@textmathmode\pgf@lib@dec@mathshift\fi%
- \pgf@lib@dec@text@format\relax%
- \pgf@lib@dec@text@char%
- \ifpgf@lib@decorate@textmathmode\pgf@lib@dec@mathshift\fi%
- \endgroup%
- \endpgfinterruptpicture%
- }%
-}
+ \setbox\pgf@lib@dec@text@box\hbox{%
+ \pgfinterruptpicture%
+ \begingroup%
+ \pgfsetcolor{\pgf@lib@decorationtextcolor}%
+ \ifpgf@lib@decorate@textmathmode\pgf@lib@dec@mathshift\fi%
+ \pgf@lib@dec@text@format\relax%
+ \pgf@lib@dec@text@char%
+ \ifpgf@lib@decorate@textmathmode\pgf@lib@dec@mathshift\fi%
+ \endgroup%
+ \endpgfinterruptpicture%
+ }%
+}%
\def\pgf@lib@dec@text@getwidth{%
- \begingroup%
- \let\c@pgf@lib@dec@characters=\c@pgf@counta%
- \let\c@pgf@lib@dec@spaces=\c@pgf@countb%
- \let\pgfdecorationrestoftext=\pgfdecorationtext%
- \c@pgf@lib@dec@spaces=0\relax%
- \c@pgf@lib@dec@characters=0\relax%
- \pgfmathloop%
- \pgf@lib@dec@text@scanchar%
- \ifvoid\pgf@lib@dec@text@box%
- \else%
- \setbox\pgf@hbox=\hbox{{%
- \unhbox\pgf@hbox%
- \unhbox\pgf@lib@dec@text@box%
- }}%
- \advance\c@pgf@lib@dec@characters by1\relax%
- \ifpgf@lib@dec@text@scan@space%
- \advance\c@pgf@lib@dec@spaces by1\relax%
- \fi%
- \repeatpgfmathloop%
- \global\pgf@x=\the\wd\pgf@hbox%
- \xdef\pgf@lib@dec@temp{\the\c@pgf@lib@dec@characters}%
- \xdef\pgf@lib@dec@@temp{\the\c@pgf@lib@dec@spaces}%
- \endgroup%
- \edef\pgf@lib@dec@text@width{\the\pgf@x}%
- \let\pgf@lib@dec@character@count=\pgf@lib@dec@temp%
- \let\pgf@lib@dec@space@count=\pgf@lib@dec@@temp%
-}
-
-
-
-\endinput \ No newline at end of file
+ \begingroup%
+ \let\c@pgf@lib@dec@characters=\c@pgf@counta%
+ \let\c@pgf@lib@dec@spaces=\c@pgf@countb%
+ \let\pgfdecorationrestoftext=\pgfdecorationtext%
+ \c@pgf@lib@dec@spaces=0\relax%
+ \c@pgf@lib@dec@characters=0\relax%
+ \pgfmathloop%
+ \pgf@lib@dec@text@scanchar%
+ \ifvoid\pgf@lib@dec@text@box%
+ \else%
+ \setbox\pgf@hbox=\hbox{{%
+ \unhbox\pgf@hbox%
+ \unhbox\pgf@lib@dec@text@box%
+ }}%
+ \advance\c@pgf@lib@dec@characters by1\relax%
+ \ifpgf@lib@dec@text@scan@space%
+ \advance\c@pgf@lib@dec@spaces by1\relax%
+ \fi%
+ \repeatpgfmathloop%
+ \global\pgf@x=\the\wd\pgf@hbox%
+ \xdef\pgf@lib@dec@temp{\the\c@pgf@lib@dec@characters}%
+ \xdef\pgf@lib@dec@@temp{\the\c@pgf@lib@dec@spaces}%
+ \endgroup%
+ \edef\pgf@lib@dec@text@width{\the\pgf@x}%
+ \let\pgf@lib@dec@character@count=\pgf@lib@dec@temp%
+ \let\pgf@lib@dec@space@count=\pgf@lib@dec@@temp%
+}%
+
+
+
+\endinput