Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ! Extra }, or forgotten endgroup.
- pgf@externalend ->unskip egroup egroup
- {def pgf@external@trim {0}def ...
- l.88 end{forest}
- documentclass[a4paper,12pt, twoside,dvipsnames]{article}
- usepackage[dvipsnames]{xcolor}
- usepackage{tikz}
- usetikzlibrary{external}
- tikzexternalize[mode=list and make, prefix=ext-tikz/]
- usepackage[external]{forest}
- usetikzlibrary{fadings, arrows.meta}
- makeatletter
- newififtikz@shading@path
- tikzset{
- % There are three circumstances in which the fading sep is needed:
- % 1. Arrows which do not update the bounding box (which is most of them).
- % 2. Line caps/joins and mitres that extend outside the natural bounding
- % box of the path (these are not calculated by PGF).
- % 3. Other reasons that haven't been anticipated.
- fading xsep/.store in=pgfpathfadingxsep,
- fading ysep/.store in=pgfpathfadingysep,
- fading sep/.style={fading xsep=#1, fading ysep=#1},
- fading sep=0.0cm,
- shading path/.code={%
- % Prevent this stuff happning recursively.
- iftikz@shading@path%
- else%
- tikz@shading@pathtrue%
- % tikz@addmode installs the `modes' (e.g., fill, draw, shade)
- % to be applied to the path. It isn't usualy for doing more
- % changes to the path's construction.
- tikz@addmode{%
- pgfgetpathpgf@currentfadingpath%
- % Get the boudning box of the current path size including the fading sep
- pgfextract@processpgf@fadingpath@southwest{pgfpointadd{pgfqpoint{pgf@pathminx}{pgf@pathminy}}%
- {pgfpoint{-pgfpathfadingxsep}{-pgfpathfadingysep}}}%%
- pgfextract@processpgf@fadingpath@northeast{pgfpointadd{pgfqpoint{pgf@pathmaxx}{pgf@pathmaxy}}%
- {pgfpoint{pgfpathfadingxsep}{pgfpathfadingysep}}}%
- % Clear the path
- pgfsetpathpgfutil@empty%
- % Interrupt the path and picture to create a fading.
- pgfinterruptpath%
- pgfinterruptpicture%
- begin{tikzfadingfrompicture}[name=.]
- path [shade=none,fill=none, #1] pgfextra{%
- % Set the softpath. Any transformations in #1 will have no effect.
- % This will *not* update the bounding box...
- pgfsetpathpgf@currentfadingpath%
- % ...so it is done manually.
- pgf@fadingpath@southwest
- expandafterpgf@protocolsizes{thepgf@x}{thepgf@y}%
- pgf@fadingpath@northeast%
- expandafterpgf@protocolsizes{thepgf@x}{thepgf@y}%
- };
- % Now get the bounding of the picture.
- xdefpgf@fadingboundingbox@southwest{noexpandpgfqpoint{thepgf@picminx}{thepgf@picminy}}%
- xdefpgf@fadingboundingbox@northeast{noexpandpgfqpoint{thepgf@picmaxx}{thepgf@picmaxy}}%
- %
- end{tikzfadingfrompicture}%
- endpgfinterruptpicture%
- endpgfinterruptpath%
- % Install a rectangle that covers the shaded/faded path picture.
- pgfpathrectanglecorners{pgf@fadingboundingbox@southwest}{pgf@fadingboundingbox@northeast}%
- % Make the fading happen.
- deftikz@path@fading{.}%
- tikz@mode@fade@pathtrue%
- tikz@fade@adjustfalse%10pt
- % Shift the fading to the mid point of the rectangle
- pgfpointscale{0.5}{pgfpointadd{pgf@fadingboundingbox@southwest}{pgf@fadingboundingbox@northeast}}%
- edeftikz@fade@transform{shift={(thepgf@x,thepgf@y)}}%
- }%
- fi%
- }
- }
- begin{document}
- begingroup
- centering
- begin{forest}
- [, phantom, for children={fit=band}, s sep'+=60pt
- [ 2, name=l1 ]
- [ 2, name=r1 ]
- ]
- path [left color=orange, right color=MidnightBlue, shading path={draw=transparent!0, dashed, -Latex}] (l1) .. controls ++(0,-1) and ++(0,-1) .. (r1);
- end{forest}
- endgroup
- end{document}
Add Comment
Please, Sign In to add comment