From 531d43fafa269c546d587eaca6cd14adcd11914f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 8 Aug 2015 22:54:29 +0000 Subject: pgf (8aug15) git-svn-id: svn://tug.org/texlive/trunk@38079 c570f23f-e606-0410-a88d-b1316a301751 --- .../tikzlibrarydatavisualization.code.tex | 120 +++++++------- .../libraries/graphs/tikzlibrarygraphs.code.tex | 33 +++- .../tikz/libraries/tikzexternalshared.code.tex | 90 +++++++++-- .../tikz/libraries/tikzlibraryfolding.code.tex | 176 ++++++++++----------- .../libraries/tikzlibraryintersections.code.tex | 28 ++-- .../libraries/tikzlibrarypatterns.meta.code.tex | 98 ++++++++++++ .../tikz/libraries/tikzlibraryquotes.code.tex | 4 +- .../generic/pgf/frontendlayer/tikz/tikz.code.tex | 94 ++++++++--- 8 files changed, 440 insertions(+), 203 deletions(-) create mode 100644 Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypatterns.meta.code.tex (limited to 'Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz') diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.code.tex index e181c3b97ab..ba79c22b33f 100644 --- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.code.tex @@ -7,7 +7,7 @@ % % See the file doc/generic/pgf/licenses/LICENSE for more details. -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.code.tex,v 1.44 2013/07/19 13:16:48 tantau Exp $ +\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.code.tex,v 1.48 2015/05/18 17:01:16 tantau Exp $ \usepgfmodule{datavisualization} \usetikzlibrary{backgrounds} @@ -19,7 +19,8 @@ \pgfkeys{/tikz/\tikz@dv@key/.try={#1}}% \ifpgfkeyssuccess% \else% - \pgfkeys{/errors/unknown key={/tikz/data visualization/\tikz@dv@key}{#1}}% + \edef\pgf@temp{/errors/unknown key={/tikz/data visualization/\tikz@dv@key}}% + \expandafter\pgfkeys\expandafter{\pgf@temp{#1}}% \fi% }, /tikz/data visualization/data/.unknown/.code={% @@ -28,7 +29,8 @@ \pgfkeys{/pgf/data/\tikz@dv@key/.try={#1}}% \ifpgfkeyssuccess% \else% - \pgfkeys{/errors/unknown key={/pgf/data/\tikz@dv@key}{#1}}% + \edef\pgf@temp{/errors/unknown key={/pgf/data/\tikz@dv@key}}% + \expandafter\pgfkeys\expandafter{\pgf@temp{#1}}% \fi% } } @@ -775,7 +777,7 @@ \def\tikz@lib@dv@show@axis#1#2{% \scope[data visualization/axis layer,/tikz/data visualization/.cd,low=min,high=max,every axis/.try,#2] - \pgfkeysgetvalue{#1/scaling mapper}\tikz@dv@axis@mapper + \pgfkeysgetvalue{#1/scaling mapper}\tikz@dv@axis@mapper% % Ok, calculate direction vector: \tikzpointandanchordirection{\tikz@dv@axis@mapper.set in to(min)}{\tikz@dv@axis@mapper.set in to(max)} \xdef\tikz@dv@axis@dir{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}} @@ -1178,48 +1180,53 @@ \pgfkeysgetvalue{/tikz/data visualization/phase}\tikz@temp \pgfdvmathenter{\tikz@dv@lib@phase}{\tikz@temp} \pgfdvmathenter{\tikz@dv@lib@step}{\tikz@lib@dv@step} - % Compute start: - \pgfdvmathsub{\tikz@dv@lib@temp}{\pgfdvmin}{\tikz@dv@lib@phase}% temp = dvmin - phase - \pgfdvmathdiv{\tikz@dv@lib@temp}{\tikz@dv@lib@temp}{\tikz@dv@lib@step}% temp = temp/step - \pgfdvmathfloor{\tikz@dv@lib@temp}{\tikz@dv@lib@temp}% temp = floor(temp) - \pgfdvmathmul{\tikz@lib@dv@current}{\tikz@dv@lib@temp}{\tikz@dv@lib@step}% current = temp*step ... - \pgfdvmathadd{\tikz@lib@dv@current}{\tikz@lib@dv@current}{\tikz@dv@lib@phase}% + phase - \let\tikz@lib@dv@ats\pgfutil@empty% - \let\tikz@lib@dv@minor@ats\pgfutil@empty% - \tikz@lib@dv@mapper.get function(\tikz@temp)% - \ifx\tikz@temp\pgfutil@empty% - \pgfdvmathenter{\tikz@one@hundreth}{0.001}% - \pgfdvmathsub{\tikz@lib@temp}{\pgfdvmax}{\pgfdvmin}% - \pgfdvmathmul{\tikz@lib@dv@epsilon}{\tikz@lib@temp}{\tikz@one@hundreth}% epsilon = (max - min)/1000 - \else - \let\tikz@lib@dv@epsilon\pgfdvmathalwayszero - \fi - \pgfdvmathsub{\tikz@lib@dv@min@minus@epsilon}{\pgfdvmin}{\tikz@lib@dv@epsilon}% - \pgfdvmathadd{\tikz@lib@dv@max@plus@epsilon}{\pgfdvmax}{\tikz@lib@dv@epsilon}% - \pgfkeysgetvalue{/tikz/data visualization/minor steps between steps}\tikz@lib@dv@substeps% - \ifx\tikz@lib@dv@substeps\pgfutil@empty - \else - \pgfmathsetmacro\tikz@temp{\tikz@lib@dv@substeps+1}% - \pgfdvmathenter{\tikz@dv@lib@substeps}{\tikz@temp}% - \pgfdvmathdiv{\tikz@lib@dv@substep}{\tikz@dv@lib@step}{\tikz@dv@lib@substeps}% - \fi - \loop% - \ifx\tikz@lib@dv@substeps\pgfutil@empty% - \else% - \let\tikz@lib@dv@subcurrent=\tikz@lib@dv@current% - \pgfmathsetcount{\c@pgf@counta}{\tikz@lib@dv@substeps}% - \let\tikz@lib@dv@next=\tikz@lib@dv@subloop% - \tikz@lib@dv@subloop - \fi% - \pgfdvmathifless{\tikz@lib@dv@current}{\tikz@lib@dv@min@minus@epsilon}{}{% - \pgfdvmathexitbyserializing{\tikz@temp}{\tikz@lib@dv@current}% - \edef\tikz@lib@dv@ats{\tikz@lib@dv@ats,\tikz@temp}% - } - \pgfdvmathadd{\tikz@lib@dv@current}{\tikz@lib@dv@current}{\tikz@dv@lib@step}% - \pgfdvmathifless{\tikz@lib@dv@current}{\tikz@lib@dv@max@plus@epsilon}{\tikz@lib@dv@continuetrue}{\tikz@lib@dv@continuefalse}% - \iftikz@lib@dv@continue% - \repeat% - \tikzdatavisualizationset{major/.expanded={at={\tikz@lib@dv@ats}},minor/.expanded={at={\tikz@lib@dv@minor@ats}}}% + \pgfdvmathifless{\pgfdvmathalwayszero}{\tikz@dv@lib@step}{% + % Compute start: + \pgfdvmathsub{\tikz@dv@lib@temp}{\pgfdvmin}{\tikz@dv@lib@phase}% temp = dvmin - phase + \pgfdvmathdiv{\tikz@dv@lib@temp}{\tikz@dv@lib@temp}{\tikz@dv@lib@step}% temp = temp/step + \pgfdvmathfloor{\tikz@dv@lib@temp}{\tikz@dv@lib@temp}% temp = floor(temp) + \pgfdvmathmul{\tikz@lib@dv@current}{\tikz@dv@lib@temp}{\tikz@dv@lib@step}% current = temp*step ... + \pgfdvmathadd{\tikz@lib@dv@current}{\tikz@lib@dv@current}{\tikz@dv@lib@phase}% + phase + \let\tikz@lib@dv@ats\pgfutil@empty% + \let\tikz@lib@dv@minor@ats\pgfutil@empty% + \tikz@lib@dv@mapper.get function(\tikz@temp)% + \ifx\tikz@temp\pgfutil@empty% + \pgfdvmathenter{\tikz@one@hundreth}{0.001}% + \pgfdvmathsub{\tikz@lib@temp}{\pgfdvmax}{\pgfdvmin}% + \pgfdvmathmul{\tikz@lib@dv@epsilon}{\tikz@lib@temp}{\tikz@one@hundreth}% epsilon = (max - min)/1000 + \else + \let\tikz@lib@dv@epsilon\pgfdvmathalwayszero + \fi + \pgfdvmathsub{\tikz@lib@dv@min@minus@epsilon}{\pgfdvmin}{\tikz@lib@dv@epsilon}% + \pgfdvmathadd{\tikz@lib@dv@max@plus@epsilon}{\pgfdvmax}{\tikz@lib@dv@epsilon}% + \pgfkeysgetvalue{/tikz/data visualization/minor steps between steps}\tikz@lib@dv@substeps% + \ifx\tikz@lib@dv@substeps\pgfutil@empty + \else + \pgfmathsetmacro\tikz@temp{\tikz@lib@dv@substeps+1}% + \pgfdvmathenter{\tikz@dv@lib@substeps}{\tikz@temp}% + \pgfdvmathdiv{\tikz@lib@dv@substep}{\tikz@dv@lib@step}{\tikz@dv@lib@substeps}% + \fi + \loop% + \ifx\tikz@lib@dv@substeps\pgfutil@empty% + \else% + \let\tikz@lib@dv@subcurrent=\tikz@lib@dv@current% + \pgfmathsetcount{\c@pgf@counta}{\tikz@lib@dv@substeps}% + \let\tikz@lib@dv@next=\tikz@lib@dv@subloop% + \tikz@lib@dv@subloop + \fi% + \pgfdvmathifless{\tikz@lib@dv@current}{\tikz@lib@dv@min@minus@epsilon}{}{% + \pgfdvmathexitbyserializing{\tikz@temp}{\tikz@lib@dv@current}% + \edef\tikz@lib@dv@ats{\tikz@lib@dv@ats,\tikz@temp}% + } + \pgfdvmathadd{\tikz@lib@dv@current}{\tikz@lib@dv@current}{\tikz@dv@lib@step}% + \pgfdvmathifless{\tikz@lib@dv@current}{\tikz@lib@dv@max@plus@epsilon}{\tikz@lib@dv@continuetrue}{\tikz@lib@dv@continuefalse}% + \iftikz@lib@dv@continue% + \repeat% + \tikzdatavisualizationset{major/.expanded={at={\tikz@lib@dv@ats}},minor/.expanded={at={\tikz@lib@dv@minor@ats}}}% + }{% + \pgfdvmathexitbyserializing{\tikz@temp}{\pgfdvmin}% + \tikzdatavisualizationset{major/.expanded={at={\tikz@temp}}}% + }% \fi% } \newif\iftikz@lib@dv@continue @@ -1267,8 +1274,8 @@ \pgfdvmathenter{\tikz@lib@dv@about@val}{#1}% \pgfdvmathdiv{\tikz@lib@dv@around}{\tikz@lib@dv@diff}{\tikz@lib@dv@about@val}% % Make mantisse sensible - \pgfmathfloattomacro{\tikz@lib@dv@around}{\tikz@lib@dv@flags}{\tikz@lib@dv@mant}{\tikz@lib@dv@exp} - \pgf@xc=\tikz@lib@dv@mant pt% + \pgfmathfloattomacro{\tikz@lib@dv@around}{\tikz@lib@dv@flags}{\tikz@lib@dv@mant}{\tikz@lib@dv@exp}% + \pgf@xc=\tikz@lib@dv@mant pt % \pgfkeysgetvalue{/tikz/data visualization/about strategy}\tikz@lib@dv@strat \foreach \tikz@lib@dv@threshold/\tikz@lib@replace in \tikz@lib@dv@strat { @@ -1276,15 +1283,20 @@ \global\pgf@xc=\tikz@lib@replace pt% \breakforeach \fi - } + }% \ifdim\pgf@xc<10pt% - \pgfmathfloatcreate{\tikz@lib@dv@flags}{\pgf@sys@tonumber{\pgf@xc}}{\tikz@lib@dv@exp} + \pgfmathfloatcreate{\tikz@lib@dv@flags}{\pgf@sys@tonumber{\pgf@xc}}{\tikz@lib@dv@exp}% \else - \pgfmathsetmacro\tikz@lib@dv@exp{\tikz@lib@dv@exp+1} + \begingroup + \c@pgf@countd=\tikz@lib@dv@exp + \advance\c@pgf@countd by1 + \edef\tikz@lib@dv@exp{\the\c@pgf@countd}% + \pgfmath@smuggleone\tikz@lib@dv@exp + \endgroup \divide\pgf@xc by 10\relax - \pgfmathfloatcreate{\tikz@lib@dv@flags}{\pgf@sys@tonumber{\pgf@xc}}{\tikz@lib@dv@exp} + \pgfmathfloatcreate{\tikz@lib@dv@flags}{\pgf@sys@tonumber{\pgf@xc}}{\tikz@lib@dv@exp}% \fi - \pgfmathfloattofixed{\pgfmathresult} + \pgfmathfloattofixed{\pgfmathresult}% \let\tikz@lib@dv@step=\pgfmathresult } @@ -1441,7 +1453,7 @@ \tikz@dv@parse@unit@length@#1per1units\pgf@stop% \fi% } -\def\tikz@dv@parse@unit@length@#1per#2units{ +\def\tikz@dv@parse@unit@length@#1per#2units\pgf@stop{ \pgfkeysalso{\tikz@dv@axis/scaling=0 at 0 and #2 at #1} } diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex index c82c98c7db7..3f17447fdda 100644 --- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex @@ -8,7 +8,7 @@ % % See the file doc/generic/pgf/licenses/LICENSE for more details. -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex,v 1.43 2013/10/10 09:08:58 tantau Exp $ +\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex,v 1.44 2015/06/05 12:41:59 tantau Exp $ % @@ -856,6 +856,16 @@ \fi% } +\newif\iftikzgraphsautonumbernodes +\newcount\tikz@lib@auto@number + +\def\tikz@lib@do@autonumber{% + \ifx\tikz@lib@graph@name@only\pgfutil@empty% + \else% + \edef\tikz@lib@graph@name@only{\tikz@lib@graph@name@only\tikz@lib@auto@sep\the\tikz@lib@auto@number}% + \global\advance\tikz@lib@auto@number by1\relax% + \fi% +} % % Parse the normal part of a node (name and, possibly, text after slash) @@ -928,6 +938,9 @@ % \def\tikz@lib@graph@handle@node@cont{% + \iftikzgraphsautonumbernodes% + \tikz@lib@do@autonumber% + \fi% \iftikz@lib@graph@fresh@node% \tikz@lg@if@local@node{\tikz@lib@graph@name}{\tikz@lg@find@fresh@name}{}% \fi% @@ -1257,6 +1270,13 @@ \newif\iftikz@lib@graph@fresh@node \tikzgraphsset{fresh nodes/.is if=tikz@lib@graph@fresh@node} +\tikzgraphsset{number nodes/.code=% + \pgfmathsetcount\tikz@lib@auto@number{#1}% + \tikzgraphsautonumbernodestrue,% + number nodes/.default=1,% + number nodes sep/.code=\def\tikz@lib@auto@sep{#1} +} +\def\tikz@lib@auto@sep{\space} \newif\iftikz@lib@graph@node@created @@ -2530,16 +2550,17 @@ \def\tikz@lib@graphs@quick@node#1"{% \def\tikzgraphnodename{#1}% - \pgfutil@ifnextchar/\tikz@lib@graphs@quick@text\tikz@lib@graphs@quick@notext% + \let\tikzgraphnodetext\tikzgraphnodename% + \iftikzgraphsautonumbernodes + \edef\tikzgraphnodename{\tikzgraphnodename\tikz@lib@auto@sep\the\tikz@lib@auto@number}% + \global\advance\tikz@lib@auto@number by1\relax% + \fi + \pgfutil@ifnextchar/\tikz@lib@graphs@quick@text\tikz@lib@graphs@quick@opt% } \def\tikz@lib@graphs@quick@text/"#1"{% \def\tikzgraphnodetext{#1}% \tikz@lib@graphs@quick@opt% } -\def\tikz@lib@graphs@quick@notext{% - \let\tikzgraphnodetext\tikzgraphnodename% - \tikz@lib@graphs@quick@opt% -} \def\tikz@lib@graphs@quick@opt{% \pgfutil@ifnextchar[\tikz@lib@graphs@quick@withopt{\tikz@lib@graphs@quick@withopt[]}%] } diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzexternalshared.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzexternalshared.code.tex index fc01637466b..50829d90f46 100644 --- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzexternalshared.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzexternalshared.code.tex @@ -98,15 +98,22 @@ }% -\pgfutil@ifundefined{pdfshellescape}{% - \def\tikzexternalcheckshellescape{}% +\pgfutil@IfUndefined{pdfshellescape}{% + % let's hope that \usepackage{pdftexcmds} has been used... + \pgfutil@IfUndefined{pdf@shellescape}{% + \def\tikzexternalcheckshellescape{0}% + }{% + \let\tikzexternalcheckshellescape=\pdf@shellescape + }% }{% - \ifnum\pdfshellescape=1 - \def\tikzexternalcheckshellescape{\pgfkeysvalueof{/tikz/external/shell escape}\space}% - \else - \def\tikzexternalcheckshellescape{}% - \fi + \let\tikzexternalcheckshellescape=\pdfshellescape }% +\ifnum\tikzexternalcheckshellescape=1 + \def\tikzexternalcheckshellescape{\pgfkeysvalueof{/tikz/external/shell escape}\space}% +\else + \def\tikzexternalcheckshellescape{}% +\fi + \newif\iftikzexternal@auto@detect@jobname \pgfqkeys{/tikz/external}{ @@ -138,8 +145,6 @@ \pgfkeysalso{/tikz/external/figure list=true,/pgf/images/aux in dpth=true}% }, mode=convert with system call, - system call/.initial={pdflatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"}, -% system call/.initial={pdflatex -interaction=batchmode -jobname '\image' '\texsource'; pdftops -eps \image.pdf}, force remake/.is if=tikzexternal@force@remake, force remake/.default=true, failed ref warnings for/.initial={\ref,\cite,\pageref}, @@ -234,6 +239,7 @@ \fi }, optimize command away=\includegraphics, + optimize command away=\pgfincludeexternalgraphics, % EXPERIMENTAL (UNTESTED): optimize latex env away/.code={% \expandafter\let\expandafter\pgf@tempa\csname #1\endcsname @@ -262,6 +268,46 @@ up to date check=md5, } +\expandafter\def\csname tikzexternal@driver@pgfsys-pdftex.def\endcsname{% + \pgfutil@IfUndefined{directlua}{% + \pgfkeyssetvalue{/tikz/external/system call}{% + pdflatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"% + }% + }{% + \pgfkeyssetvalue{/tikz/external/system call}{% + lualatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"% + }% + }% +}% +%-------------------------------------------------- +% \expandafter\def\csname tikzexternal@driver@pgfsys-dvipdfm.def\endcsname{% +% \pgfkeyssetvalue{/tikz/external/system call}{% +% latex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"% +% && dvipdfm "\image".dvi % +% }% +% }% +%-------------------------------------------------- +\expandafter\def\csname tikzexternal@driver@pgfsys-xetex.def\endcsname{% + \pgfkeyssetvalue{/tikz/external/system call}{% + xelatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"% + }% +}% +\expandafter\def\csname tikzexternal@driver@pgfsys-dvips.def\endcsname{% + \pgfkeyssetvalue{/tikz/external/system call}{% + latex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource" % + && dvips -o "\image".ps "\image".dvi % + }% +}% + +% Auto-select a suitable default value fo 'system call': +\pgfutil@ifundefined{tikzexternal@driver@\pgfsysdriver}{% + % fallback. We do not know the driver here. + \csname tikzexternal@driver@pgfsys-pdftex.def\endcsname +}{% + \csname tikzexternal@driver@\pgfsysdriver\endcsname +}% + + \def\tikzsetfigurename#1{\pgfkeyssetvalue{/tikz/external/figure name}{#1}}% \def\tikzappendtofigurename#1{\pgfkeys{/tikz/external/figure name/.add={}{#1}}} @@ -446,6 +492,9 @@ % '\ref,\pageref,\cite'. % % For use in the aux lock handling only. +% +% ATTENTION: this is used if and only if *all* references are broken +% (because the .aux file is NOT read at all)! \def\tikzexternalauxlock@handleref{% \let\pgf@external@grab@refundefinedtrue=\pgf@external@grab@refundefinedtrue@orig % @@ -472,11 +521,18 @@ \fi \fi }% -\def\tikzexternalauxlock@handleref@repl#1{\pgfutil@ifnextchar[{\tikzexternalauxlock@handleref@repl@{#1}}{\tikzexternalauxlock@handleref@repl@{#1}[]}}% -\def\tikzexternalauxlock@handleref@repl@#1[#2]#3{% +\def\tikzexternalauxlock@handleref@repl#1{% + \pgfutil@ifnextchar[{\tikzexternalauxlock@handleref@gobble@opt{#1}}{\tikzexternalauxlock@handleref@repl@{#1}}% +}% +% silently discard the options. We merely need to generate a warning. +\def\tikzexternalauxlock@handleref@gobble@opt#1[#2]{% + % there may be more than one set of options (biblatex's \cite): + \pgfutil@ifnextchar[{\tikzexternalauxlock@handleref@gobble@opt{#1}}{\tikzexternalauxlock@handleref@repl@{#1}}% +}% +\def\tikzexternalauxlock@handleref@repl@#1#2{% \tikzifexternalizingcurrent{% % note that '#1' is NO control sequence! it is a protected string - \csname tikzexternalauxlock@handleref@orig@#1\endcsname{#3}% + \csname tikzexternalauxlock@handleref@orig@#1\endcsname{#2}% \begingroup \def\n{\pgfexternal@hat\pgfexternal@hat J}% \tikzexternal@assemble@systemcall{\pgfactualjobname}{\pgf@tempa}% @@ -484,7 +540,7 @@ \pgfexternalstorecommand{% \noexpand\begingroup \noexpand\toks0={\pgf@tempa}% - \noexpand\immediate\noexpand\write16{\tikzexternalauxlock@handleref@warning{#3}{\noexpand\the\noexpand\toks0}}% + \noexpand\immediate\noexpand\write16{\tikzexternalauxlock@handleref@warning{#2}{\noexpand\the\noexpand\toks0}}% \noexpand\G@refundefinedtrue \noexpand\endgroup }% @@ -888,8 +944,8 @@ \def\tikzexternalmakefiledefaultdeprule{% \immediate\write\tikzexternal@outmakefile{\tikzexternal@PERCENTchar.\tikzexternaldepext:}% - \immediate\write\tikzexternal@outmakefile{\tikzexternal@TABchar mkdir -p $(dir $@)}% - \immediate\write\tikzexternal@outmakefile{\tikzexternal@TABchar touch $@ \tikzexternal@HASHchar\space will be filled later.}% + \immediate\write\tikzexternal@outmakefile{\tikzexternal@TABchar mkdir -p \tikzexternal@normal@dq $(dir $@)\tikzexternal@normal@dq}% + \immediate\write\tikzexternal@outmakefile{\tikzexternal@TABchar touch \tikzexternal@normal@dq $@\tikzexternal@normal@dq\space \tikzexternal@HASHchar\space will be filled later.}% }% % Invokes '#1' if a makefile is to be written and '#2' if not. @@ -1222,7 +1278,9 @@ }% \fi \expandafter\pgfincludeexternalgraphics\expandafter{\tikzexternal@curfilename}% - \global\let\G@refundefinedtrue=\tikz@refundefinedtrue@@ + \if5\tikzexternal@opmode + \global\let\G@refundefinedtrue=\tikz@refundefinedtrue@@ + \fi \tikzexternal@closeenvironments } diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfolding.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfolding.code.tex index 1c45b6eac4d..8cd08fc5cd0 100644 --- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfolding.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfolding.code.tex @@ -8,7 +8,7 @@ % % See the file doc/generic/pgf/licenses/LICENSE for more details. -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfolding.code.tex,v 1.3 2013/08/28 11:00:54 tantau Exp $ +\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfolding.code.tex,v 1.5 2015/08/03 08:39:35 cfeuersaenger Exp $ % @@ -23,140 +23,140 @@ % ----- \def\tikz@lib@fold@triangle#1#2#3#4{% - \begin{scope}[xshift=.5\tikz@lib@fold@length,yshift=.28868\tikz@lib@fold@length] + \scope[xshift=.5\tikz@lib@fold@length,yshift=.28868\tikz@lib@fold@length] #1 - \end{scope} - \begin{scope}[shift={(60:\tikz@lib@fold@length)},rotate=-60] + \endscope + \scope[shift={(60:\tikz@lib@fold@length)},rotate=-60] #2 - \end{scope} - \begin{scope}[xshift=\tikz@lib@fold@length,rotate=180] + \endscope + \scope[xshift=\tikz@lib@fold@length,rotate=180] #3 - \end{scope} - \begin{scope}[rotate=60] + \endscope + \scope[rotate=60] #4 - \end{scope} + \endscope } \def\tikz@lib@fold@square#1#2#3#4#5{% - \begin{scope}[xshift=.5\tikz@lib@fold@length,yshift=.5\tikz@lib@fold@length] + \scope[xshift=.5\tikz@lib@fold@length,yshift=.5\tikz@lib@fold@length] #1 - \end{scope} - \begin{scope}[yshift=\tikz@lib@fold@length] + \endscope + \scope[yshift=\tikz@lib@fold@length] #2 - \end{scope} - \begin{scope}[xshift=\tikz@lib@fold@length,yshift=\tikz@lib@fold@length,rotate=-90] + \endscope + \scope[xshift=\tikz@lib@fold@length,yshift=\tikz@lib@fold@length,rotate=-90] #3 - \end{scope} - \begin{scope}[xshift=\tikz@lib@fold@length,rotate=180] + \endscope + \scope[xshift=\tikz@lib@fold@length,rotate=180] #4 - \end{scope} - \begin{scope}[rotate=90] + \endscope + \scope[rotate=90] #5 - \end{scope} + \endscope } \def\tikz@lib@fold@pentagon#1#2#3#4#5#6{% - \begin{scope}[xshift=.5\tikz@lib@fold@length,yshift=0.68819\tikz@lib@fold@length] + \scope[xshift=.5\tikz@lib@fold@length,yshift=0.68819\tikz@lib@fold@length] #1 - \end{scope} - \begin{scope}[shift={(108:\tikz@lib@fold@length)},shift={(36:\tikz@lib@fold@length)},rotate=-36] + \endscope + \scope[shift={(108:\tikz@lib@fold@length)},shift={(36:\tikz@lib@fold@length)},rotate=-36] #2 - \end{scope} - \begin{scope}[xshift=\tikz@lib@fold@length,shift={(72:\tikz@lib@fold@length)},rotate=-108] + \endscope + \scope[xshift=\tikz@lib@fold@length,shift={(72:\tikz@lib@fold@length)},rotate=-108] #3 - \end{scope} - \begin{scope}[xshift=\tikz@lib@fold@length,rotate=180] + \endscope + \scope[xshift=\tikz@lib@fold@length,rotate=180] #4 - \end{scope} - \begin{scope}[rotate=108] + \endscope + \scope[rotate=108] #5 - \end{scope} - \begin{scope}[shift={(108:\tikz@lib@fold@length)},rotate=36] + \endscope + \scope[shift={(108:\tikz@lib@fold@length)},rotate=36] #6 - \end{scope} + \endscope } \def\tikz@lib@fold@hexagon#1#2#3#4#5#6#7{% - \begin{scope} + \scope [shift={(60:\tikz@lib@fold@length)}] #1 - \end{scope} - \begin{scope} + \endscope + \scope [shift={(120:\tikz@lib@fold@length)}, shift={(60:\tikz@lib@fold@length)}] #2 - \end{scope} - \begin{scope} + \endscope + \scope [shift={(120:\tikz@lib@fold@length)}, shift={(60:\tikz@lib@fold@length)}, xshift=\tikz@lib@fold@length, rotate=-60] #3 - \end{scope} - \begin{scope} + \endscope + \scope [xshift=\tikz@lib@fold@length, shift={(60:\tikz@lib@fold@length)}, rotate=-120] #4 - \end{scope} - \begin{scope} + \endscope + \scope [xshift=\tikz@lib@fold@length, rotate=180] #5 - \end{scope} - \begin{scope} + \endscope + \scope [rotate=120] #6 - \end{scope} - \begin{scope} + \endscope + \scope [shift={(120:\tikz@lib@fold@length)}, rotate=60] #7 - \end{scope} + \endscope } \def\tikz@lib@fold@octagon#1#2#3#4#5#6#7#8#9{% - \begin{scope}[xshift=.5\tikz@lib@fold@length,yshift=1.20711\tikz@lib@fold@length] + \scope[xshift=.5\tikz@lib@fold@length,yshift=1.20711\tikz@lib@fold@length] #1 - \end{scope} - \begin{scope}[yshift=2.41421\tikz@lib@fold@length] + \endscope + \scope[yshift=2.41421\tikz@lib@fold@length] #2 - \end{scope} - \begin{scope}[xshift=\tikz@lib@fold@length,yshift=2.41421\tikz@lib@fold@length,rotate=-45] + \endscope + \scope[xshift=\tikz@lib@fold@length,yshift=2.41421\tikz@lib@fold@length,rotate=-45] #3 - \end{scope} - \begin{scope}[xshift=1.70711\tikz@lib@fold@length,yshift=1.70711\tikz@lib@fold@length,rotate=-90] + \endscope + \scope[xshift=1.70711\tikz@lib@fold@length,yshift=1.70711\tikz@lib@fold@length,rotate=-90] #4 - \end{scope} - \begin{scope}[xshift=1.70711\tikz@lib@fold@length,yshift=.70711\tikz@lib@fold@length,rotate=-135] + \endscope + \scope[xshift=1.70711\tikz@lib@fold@length,yshift=.70711\tikz@lib@fold@length,rotate=-135] #5 - \end{scope} - \begin{scope}[xshift=\tikz@lib@fold@length,rotate=180] + \endscope + \scope[xshift=\tikz@lib@fold@length,rotate=180] #6 - \end{scope} - \begin{scope}[rotate=135] + \endscope + \scope[rotate=135] #7 - \end{scope} - \begin{scope}[xshift=-.70711\tikz@lib@fold@length,yshift=.70711\tikz@lib@fold@length,rotate=90] + \endscope + \scope[xshift=-.70711\tikz@lib@fold@length,yshift=.70711\tikz@lib@fold@length,rotate=90] #8 - \end{scope} - \begin{scope}[xshift=-.70711\tikz@lib@fold@length,yshift=1.70711\tikz@lib@fold@length,rotate=45] + \endscope + \scope[xshift=-.70711\tikz@lib@fold@length,yshift=1.70711\tikz@lib@fold@length,rotate=45] #9 - \end{scope} + \endscope } \def\tikz@lib@fold@decagon#1#2#3#4#5#6#7{% - \begin{scope}[shift={(72:1.61803\tikz@lib@fold@length)}] %decagon inside a circle with radius the golden ratio has side length 1 + \scope[shift={(72:1.61803\tikz@lib@fold@length)}] %decagon inside a circle with radius the golden ratio has side length 1 #1 - \end{scope} - \begin{scope} + \endscope + \scope [shift={(36:\tikz@lib@fold@length)}, shift={(72:\tikz@lib@fold@length)}, shift={(108:\tikz@lib@fold@length)}, shift={(144:\tikz@lib@fold@length)}] #2 - \end{scope} - \begin{scope} + \endscope + \scope [xshift=\tikz@lib@fold@length, shift={(36:\tikz@lib@fold@length)}, shift={(72:\tikz@lib@fold@length)}, @@ -164,59 +164,59 @@ shift={(144:\tikz@lib@fold@length)}, rotate=-36] #3 - \end{scope} - \begin{scope} + \endscope + \scope [xshift=\tikz@lib@fold@length, shift={(36:\tikz@lib@fold@length)}, shift={(72:\tikz@lib@fold@length)}, shift={(108:\tikz@lib@fold@length)}, rotate=-72] #4 - \end{scope} - \begin{scope} + \endscope + \scope [xshift=\tikz@lib@fold@length, shift={(36:\tikz@lib@fold@length)}, shift={(72:\tikz@lib@fold@length)}, rotate=-108] #5 - \end{scope} - \begin{scope} + \endscope + \scope [xshift=\tikz@lib@fold@length, shift={(36:\tikz@lib@fold@length)}, rotate=-144] #6 - \end{scope} - \begin{scope} + \endscope + \scope [xshift=\tikz@lib@fold@length, rotate=180] #7 - \end{scope} + \endscope \tikz@lib@fold@decagonbis } \def\tikz@lib@fold@decagonbis#1#2#3#4{% - \begin{scope} + \scope [rotate=144] #1 - \end{scope} - \begin{scope} + \endscope + \scope [shift={(144:\tikz@lib@fold@length)}, rotate=108] #2 - \end{scope} - \begin{scope} + \endscope + \scope [shift={(144:\tikz@lib@fold@length)}, shift={(108:\tikz@lib@fold@length)}, rotate=72] #3 - \end{scope} - \begin{scope} + \endscope + \scope [shift={(144:\tikz@lib@fold@length)}, shift={(108:\tikz@lib@fold@length)}, shift={(72:\tikz@lib@fold@length)}, rotate=36] #4 - \end{scope} + \endscope } \def\tikz@lib@fold@path{\draw[every fold](0,0) -- (\tikz@lib@fold@length,0pt);} @@ -532,12 +532,12 @@ pics/octahedron truncated folding/.style = {code=\tikzfoldingtruncatedoctahedron[];}, pics/dodecahedron folding/.style = {code=\tikzfoldingdodecahedron[];}, pics/dodecahedron' folding/.style = {code=\tikzfoldingalternatedodecahedron[];}, - pics/cuboctahedron folding/.style = {code=\tikzfoldingoctahedron[];}, - pics/cuboctahedron truncated folding/.style = {code=\tikzfoldingtruncatedoctahedron[];}, + pics/cuboctahedron folding/.style = {code=\tikzfoldingcuboctahedron[];}, + pics/cuboctahedron truncated folding/.style = {code=\tikzfoldingtruncatedcuboctahedron[];}, pics/icosahedron folding/.style = {code=\tikzfoldingicosahedron[];}, pics/rhombicuboctahedron folding/.style = {code=\tikzfoldingrhombicuboctahedron[];}, pics/snub cube folding/.style = {code=\tikzfoldingsnubcube[];}, - pics/icosidodecahedron folding/.style = {code=\tikzfoldingicosahedron[];} + pics/icosidodecahedron folding/.style = {code=\tikzfoldingicosidodecahedron[];} } diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryintersections.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryintersections.code.tex index e35633fc20d..361d961339b 100644 --- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryintersections.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryintersections.code.tex @@ -9,6 +9,9 @@ \usepgflibrary{intersections} +% FIXME : the 'name path global' is not reset properly - and some +% following 'name path' will append to it rather that reset it. + \pgfkeys{% /tikz/name path global/.code={% % reset any "old" variables inheritted from some other path @@ -36,13 +39,6 @@ \ifx\tikz@intersect@namedpaths\pgfutil@empty% \else% \tikz@intersect@namedpaths% - \pgfutil@ifundefined{tikz@intersect@path@name@#1}{}% - {% - \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\tikz@intersect@@temppath% - \expandafter\expandafter\expandafter{\csname tikz@intersect@path@name@#1\endcsname}% - \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\tikz@intersect@temppath% - \expandafter\expandafter\expandafter{\expandafter\tikz@intersect@temppath\tikz@intersect@temppath}% - }% \fi% \tikz@intersect@addto@path@names{#1}{#2}% }% @@ -60,16 +56,20 @@ \let\tikz@finish@orig=\tikz@finish \def\tikz@finish{% - \tikz@finish@orig% - \tikz@intersect@finish% + \tikz@finish@orig% + \tikz@intersect@finish% } \def\tikz@intersect@finish{% - \ifx\tikz@intersect@namedpaths\pgfutil@empty% - \else% - \tikz@intersect@namedpaths% - \let\tikz@intersect@namedpaths=\pgfutil@empty% - \fi% + \ifx\tikz@intersect@namedpaths\pgfutil@empty% + \else% + \tikz@intersect@namedpaths% + % FIXME : it is reasonable to reset this globally as it is global + % in its nature. But the reset instruction should be moved to + % \endscope or something related. Resetting it here breaks the + % manual + \let\tikz@intersect@namedpaths=\pgfutil@empty% + \fi% } \let\tikz@intersect@namedpaths=\pgfutil@empty diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypatterns.meta.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypatterns.meta.code.tex new file mode 100644 index 00000000000..6f8ec32f888 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypatterns.meta.code.tex @@ -0,0 +1,98 @@ +% Copyright 2015 by Mark Wibrow +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the file doc/generic/pgf/licenses/LICENSE for more details. + +\usepgflibrary{patterns.meta} + +\tikzset{% + pattern color/.code=\edef\tikz@pattern@color{#1}, + pattern/.code={% + \edef\tikz@temp{#1}% + \ifx\tikz@temp\tikz@nonetext% + \tikz@addmode{\tikz@mode@fillfalse}% + \else% + \ifx\tikz@temp\pgfutil@empty% + \else% + \tikz@addoption{\pgfsetfillpattern{#1}{\tikz@pattern@color}}% + \def\tikz@pattern{#1}% + \fi% + \tikz@addmode{\tikz@mode@filltrue}% + \fi% + } +} + +\def\tikz@pattern@color{black} +\def\tikz@pattern{} + +\tikzset{patterns/.cd, + .unknown/.code={% + \let\tikz@pat@key=\pgfkeyscurrentname% + \pgfkeys{/pgf/patterns/\tikz@pat@key/.try={#1}}% + }, + bottom left/.style={/pgf/patterns/bottom left={\tikz@scan@one@point\pgf@pat@process#1}}, + top right/.style={/pgf/patterns/top right={\tikz@scan@one@point\pgf@pat@process#1}}, + bounding box/.style args={#1(#2)#3and#4(#5)#6}{% + /tikz/patterns/bottom left={(#2)}, + /tikz/patterns/top right={#4(#5)}, + }, + tile size/.style={/pgf/patterns/tile size={\tikz@scan@one@point\pgf@pat@process#1}}, + tile transformation/.style={/pgf/patterns/tile transformation={% + \let\tikz@transform=\relax\pgfkeys{/tikz/.cd,#1}}% + }, + infer tile bounding box/.code={ + \def\pgf@pat@codeafterhook{% + \xdef\tikz@pat@installbb{% + \noexpand\pgfkeys{/tikz/patterns/bounding box={% + (\the\pgf@picminx-#1,\the\pgf@picminy-#1) and + (\the\pgf@picmaxx+#1,\the\pgf@picmaxy+#1) + }, + /tikz/patterns/tile size={% + (\the\pgf@picmaxx-\the\pgf@picminx, + \the\pgf@picmaxy-\the\pgf@picminy)}}}% + }% + \let\pgf@pat@declarepost=\tikz@pat@installbb% + }, + infer tile bounding box/.default=0pt, +} + +\def\tikzdeclarepattern#1{% + \begingroup% + \def\pgf@pat@codebeforehook{% + \let\tikz@transform=\relax% + \pgftransformreset% <- Hmm? + \tikz@declarepattern@install% + \ifnum\pgf@pat@type=0\relax% + \let\pgfsetstrokecolor=\tikz@pat@gobbleone% + \let\pgfsetfillcolor=\tikz@pat@gobbleone% + \fi% + \def\tikz@fig{% + \tikzerror{You cannot use nodes inside a pattern}% + }% + \tikzset{pattern/.code={\tikzerror{You cannot nest patterns}}, + pattern color/.style={pattern}}% + }% + \pgfdeclarepattern{/tikz/patterns/.cd, #1}% + \endgroup% + } + +\def\tikz@declarepattern@install{% + \let\tikz@compat@color@set=\tikz@compat@color@set@insidepatttern% + \tikz@installcommands% +} + +\let\tikz@compat@color@set@orig=\tikz@compat@color@set +\def\tikz@compat@color@set@insidepatttern#1{% + \tikz@compat@color@set@orig{#1}% + \pgfsetfillcolor{#1}\pgfsetstrokecolor{#1}% +} + + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex index 4369b7e2dc2..cab6be1f07b 100644 --- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex @@ -7,7 +7,7 @@ % % See the file doc/generic/pgf/licenses/LICENSE for more details. -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex,v 1.3 2013/08/28 15:24:27 tantau Exp $ +\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex,v 1.4 2014/03/21 19:52:38 tantau Exp $ \def\tikz@quote@parser#1{\tikz@quote@@parser#1\pgf@stop} \def\tikz@quote@@parser"#1"{% @@ -63,6 +63,7 @@ pic quotes mean={pic text={#1},pic text options={every pic quotes/.try,#2}}, every edge quotes/.style={auto}, direction shorthands/.code={% + \pgfkeyslet{/tikz/centered/.@cmd}\tikz@label@@centered \pgfkeyslet{/tikz/above/.@cmd}\tikz@label@@above \pgfkeyslet{/tikz/below/.@cmd}\tikz@label@@below \pgfkeyslet{/tikz/left/.@cmd}\tikz@label@@left @@ -74,6 +75,7 @@ } } +\def\tikz@label@@centered#1\pgfeov{\pgfkeysalso{label position=center,pin position=center}} \def\tikz@label@@above#1\pgfeov{\pgfkeysalso{label position=90,pin position=90}} \def\tikz@label@@below#1\pgfeov{\pgfkeysalso{label position=-90,pin position=-90}} \def\tikz@label@@left#1\pgfeov{\pgfkeysalso{label position=180,pin position=180}} diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex index f8c1e8792f4..09d9a2fa122 100644 --- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex @@ -7,7 +7,7 @@ % % See the file doc/generic/pgf/licenses/LICENSE for more details. -\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/tikz.code.tex,v 1.142 2013/12/13 15:11:58 tantau Exp $ +\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/tikz.code.tex,v 1.151 2015/08/07 10:17:34 cfeuersaenger Exp $ \def\tikzerror#1{\pgfutil@packageerror{tikz}{#1}{}} @@ -375,25 +375,28 @@ \tikzset{rotate around x/.code={% \tikz@xyz@rotate@let% - \tikz@xyz@rotate@xyz@xaxis{0pt}{1pt}{0pt}{#1}% + \pgfmathparse{#1}\let\tikz@xyz@angle=\pgfmathresult% + \tikz@xyz@rotate@xyz@xaxis{0pt}{1pt}{0pt}{\tikz@xyz@angle}% \pgfextract@process\tikz@xyz@rotate@yvec{\pgfpointxyz{\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@y}}{\pgf@sys@tonumber{\pgf@z}}}% - \tikz@xyz@rotate@xyz@xaxis{0pt}{0pt}{1pt}{#1}% + \tikz@xyz@rotate@xyz@xaxis{0pt}{0pt}{1pt}{\tikz@xyz@angle}% \pgfsetzvec{\pgfpointxyz{\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@y}}{\pgf@sys@tonumber{\pgf@z}}}% \pgfsetyvec{\tikz@xyz@rotate@yvec}% }, rotate around y/.code={% \tikz@xyz@rotate@let% - \tikz@xyz@rotate@xyz@yaxis{1pt}{0pt}{0pt}{#1}% + \pgfmathparse{#1}\let\tikz@xyz@angle=\pgfmathresult% + \tikz@xyz@rotate@xyz@yaxis{1pt}{0pt}{0pt}{\tikz@xyz@angle}% \pgfextract@process\tikz@xyz@rotate@xvec{\pgfpointxyz{\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@y}}{\pgf@sys@tonumber{\pgf@z}}}% - \tikz@xyz@rotate@xyz@yaxis{0pt}{0pt}{1pt}{#1}% + \tikz@xyz@rotate@xyz@yaxis{0pt}{0pt}{1pt}{\tikz@xyz@angle}% \pgfsetzvec{\pgfpointxyz{\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@y}}{\pgf@sys@tonumber{\pgf@z}}}% \pgfsetxvec{\tikz@xyz@rotate@xvec}% }, rotate around z/.code={% \tikz@xyz@rotate@let% - \tikz@xyz@rotate@xyz@zaxis{1pt}{0pt}{0pt}{#1}% + \pgfmathparse{#1}\let\tikz@xyz@angle=\pgfmathresult% + \tikz@xyz@rotate@xyz@zaxis{1pt}{0pt}{0pt}{\tikz@xyz@angle}% \pgfextract@process\tikz@xyz@rotate@xvec{\pgfpointxyz{\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@y}}{\pgf@sys@tonumber{\pgf@z}}}% - \tikz@xyz@rotate@xyz@zaxis{0pt}{1pt}{0pt}{#1}% + \tikz@xyz@rotate@xyz@zaxis{0pt}{1pt}{0pt}{\tikz@xyz@angle}% \pgfsetyvec{\pgfpointxyz{\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@y}}{\pgf@sys@tonumber{\pgf@z}}}% \pgfsetxvec{\tikz@xyz@rotate@xvec}% } @@ -641,6 +644,7 @@ \pgfextra{\let\tikz@save@last@node=\tikzlastnode\tikz@node@is@a@labelfalse}% node [every pin, tikz@label@angle = #2, + anchor=@auto, #1, append after command = {% (\tikz@save@last@node) @@ -670,6 +674,7 @@ \pgfextra{\let\tikz@save@last@node=\tikzlastnode\tikz@node@is@a@labelfalse}% node [every pin, tikz@label@angle = #2, + anchor=@auto, #1, append after command = {% (\tikz@save@last@node) @@ -697,6 +702,7 @@ \tikzset{tikz@label@post/.code 2 args={ \edef\tikz@label@angle{\tikz@label@angle}% + \expandafter\pgfkeys@spdef\expandafter\tikz@label@angle\expandafter{\tikz@label@angle}% \csname tikz@label@angle@is@\tikz@label@angle\endcsname \ifx\tikz@label@angle\tikz@on@text% \def\tikz@node@at{\pgfpointanchor{\tikzlastnode}{center}}% @@ -742,7 +748,9 @@ \pgf@yc=\pgf@y% \pgf@x=\pgf@yc% \pgf@y=-\pgf@xc% - \tikz@auto@anchor% + \ifx\tikz@anchor\tikz@auto@text% + \tikz@auto@anchor% + \fi% \fi% \fi% \fi} @@ -797,6 +805,7 @@ \pgfextra{\let\tikz@save@last@fig@name=\tikz@last@fig@name\tikz@node@is@a@labelfalse} node [every label, tikz@label@angle = #2, + anchor=@auto, #1, tikz@label@post = \tikz@label@distance] {\iftikz@handle@active@nodes\expandafter\scantokens\else\expandafter\pgfutil@firstofone\fi{#3}} \pgfextra{\global\let\tikz@last@fig@name=\tikz@save@last@fig@name} @@ -826,6 +835,7 @@ \pgfextra{\let\tikz@save@last@fig@name=\tikz@last@fig@name\tikz@node@is@a@labelfalse} node [every label, tikz@label@angle = #2, + anchor=@auto, #1, tikz@label@post = \tikz@label@distance] {\iftikz@handle@active@nodes\expandafter\scantokens\else\expandafter\pgfutil@firstofone\fi{#3}} \pgfextra{\global\let\tikz@last@fig@name=\tikz@save@last@fig@name} @@ -841,6 +851,7 @@ \expandafter\def\csname tikz@label@angle@is@below right\endcsname{\def\tikz@label@angle{315}} \def\tikz@compute@direction#1{% + \ifx\tikz@anchor\tikz@auto@text% \let\tikz@do@auto@anchor=\relax \pgfmathsetcount{\c@pgf@counta}{#1}% \ifnum\c@pgf@counta<0\relax @@ -868,8 +879,9 @@ \else% \def\tikz@anchor{west}% \fi\fi\fi\fi\fi\fi\fi\fi% + \fi% } - +\def\tikz@auto@text{@auto} % General node options \tikzset{ @@ -898,7 +910,18 @@ \tikzoption{nodes}{\tikzstyle{every node}+=[#1]} -\tikzset{alias/.code={\tikz@fig@mustbenamed\expandafter\def\expandafter\tikz@alias\expandafter{\tikz@alias\pgfnodealias{#1}{\tikz@fig@name}}}} +\tikzset{alias/.code={% + \tikz@fig@mustbenamed + \begingroup + \toks0=\expandafter{\tikz@alias}% + \edef\pgf@temp{\noexpand\pgfnodealias{\tikz@pp@name{#1}}{\noexpand\tikz@fig@name}}% + \toks1=\expandafter{\pgf@temp}% + \xdef\pgf@marshal{% + \noexpand\def\noexpand\tikz@alias{\the\toks0 \the\toks1 }% + }% + \endgroup + \pgf@marshal +}} % deprecated: \def\tikzaddafternodepathoption#1{#1\tikzset{prefix after command={\pgfextra{#1}}}} @@ -933,7 +956,8 @@ \tikzoption{below right}[]% {\def\tikz@anchor{north west}% \tikz@possibly@transform{x}{}{#1}\tikz@possibly@transform{y}{-}{#1}} - +\tikzset{centered/.code=\def\tikz@anchor{center}} + \tikzoption{node distance}{\def\tikz@node@distance{#1}} \def\tikz@node@distance{1cm} @@ -996,7 +1020,12 @@ % Inter-picture options \tikzoption{remember picture}[true]{\csname pgfrememberpicturepositiononpage#1\endcsname} -\tikzoption{overlay}[]{\pgf@relevantforpicturesizefalse} +\tikzset{ + overlay/.is choice, + overlay/true/.code={\pgf@relevantforpicturesizefalse}, + overlay/false/.code={\pgf@relevantforpicturesizetrue}, + overlay/.default=true +} @@ -1577,10 +1606,10 @@ } \def\tikz@compat@color@set#1{% \pgfutil@color{#1}\pgfutil@colorlet{pgffillcolor}{#1}% - \expandafter\expandafter\expandafter\global% - \expandafter\expandafter\expandafter\let\expandafter\csname\expandafter\string\expandafter\color@pgffillcolor\expandafter\endcsname\csname\string\color@pgffillcolor\endcsname% - \expandafter\expandafter\expandafter\global% - \expandafter\expandafter\expandafter\let\expandafter\csname\expandafter\string\expandafter\color@pgfstrokecolor\expandafter\endcsname\csname\string\color@pgffillcolor\endcsname% + \expandafter\let\expandafter\pgf@temp\csname\string\color@pgffillcolor\endcsname + % for arrow tips: + \global\let\pgf@strokecolor@global=\pgf@temp + \global\let\pgf@fillcolor@global=\pgf@temp } \def\tikz@startup@env{% @@ -2214,8 +2243,10 @@ \ifx\tikz@options\pgfutil@empty% \else% \pgfsys@beginscope% + \let\pgfscope@stroke@color=\pgf@strokecolor@global% + \let\pgfscope@fill@color=\pgf@fillcolor@global% \begingroup% - \tikz@options% + \tikz@options% \fi% % % Step 6: Do a fill if shade or a path picture follows. @@ -2323,6 +2354,8 @@ \ifx\tikz@options\pgfutil@empty% \else% \endgroup% + \global\let\pgf@strokecolor@global=\pgfscope@stroke@color% + \global\let\pgf@fillcolor@global=\pgfscope@fill@color% \pgfsys@endscope% \iftikz@mode@clip% \tikzerror{Extra options not allowed for clipping path command.}% @@ -2341,6 +2374,18 @@ \let\tikz@lib@scope@check\pgfutil@empty% this is a hook for the scopes library \def\tikz@path@do@at@end{\tikz@lib@scope@check} +\def\pgf@outer@auto@adjust@hook{% + {% + \tikz@mode@drawfalse% + \tikz@mode% + \expandafter% + }% + \iftikz@mode@draw\else%xxx + \pgfkeyslet{/pgf/outer xsep}\pgf@zero@text + \pgfkeyslet{/pgf/outer ysep}\pgf@zero@text + \fi% +} + % Extra actions \def\tikz@extra@preaction#1{% @@ -3497,17 +3542,17 @@ \def\tikz@do@arc#1#2#3#4{% \let\tikz@tangent\tikz@tangent@lookup% \edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% - \edef\tikz@timer@start@angle{#1}% - \edef\tikz@timer@end@angle{#2}% + \pgfmathsetmacro\tikz@timer@start@angle{#1}% + \pgfmathsetmacro\tikz@timer@end@angle{#2}% \pgfmathparse{#3}% \let\tikz@arc@x=\pgfmathresult% \ifpgfmathunitsdeclared% \pgfmathparse{#4}% \let\tikz@arc@y=\pgfmathresult% \ifpgfmathunitsdeclared% - \tikz@@@arcfinal{\pgfpatharc{#1}{#2}{\tikz@arc@x pt and \tikz@arc@y pt}} - {\pgfpointpolar{#1}{\tikz@arc@x pt and \tikz@arc@y pt}} - {\pgfpointpolar{#2}{\tikz@arc@x pt and \tikz@arc@y pt}}% + \tikz@@@arcfinal{\pgfpatharc{\tikz@timer@start@angle}{\tikz@timer@end@angle}{\tikz@arc@x pt and \tikz@arc@y pt}} + {\pgfpointpolar{\tikz@timer@start@angle}{\tikz@arc@x pt and \tikz@arc@y pt}} + {\pgfpointpolar{\tikz@timer@end@angle}{\tikz@arc@x pt and \tikz@arc@y pt}}% \edef\tikz@timer@zero@axis{\noexpand\pgfqpoint{\tikz@arc@x pt}{0pt}} \edef\tikz@timer@ninety@axis{\noexpand\pgfqpoint{0pt}{\tikz@arc@y pt}} \else% @@ -3519,8 +3564,8 @@ \ifpgfmathunitsdeclared% \tikzerror{You cannot mix dimensions and dimensionless values in an arc}% \else% - \tikz@@@arcfinal{\pgfpatharcaxes{#1}{#2}{\pgfpointxy{\tikz@arc@x}{0}}{\pgfpointxy{0}{\tikz@arc@y}}} - {\pgfpointpolarxy{#1}{\tikz@arc@x and \tikz@arc@y}}{\pgfpointpolarxy{#2}{\tikz@arc@x and \tikz@arc@y}}% + \tikz@@@arcfinal{\pgfpatharcaxes{\tikz@timer@start@angle}{\tikz@timer@end@angle}{\pgfpointxy{\tikz@arc@x}{0}}{\pgfpointxy{0}{\tikz@arc@y}}} + {\pgfpointpolarxy{\tikz@timer@start@angle}{\tikz@arc@x and \tikz@arc@y}}{\pgfpointpolarxy{\tikz@timer@end@angle}{\tikz@arc@x and \tikz@arc@y}}% \pgf@process{\pgfpointxy{\tikz@arc@x}{0}} \edef\tikz@timer@zero@axis{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}} \pgf@process{\pgfpointxy{0}{\tikz@arc@y}} @@ -3912,6 +3957,7 @@ \setbox\tikz@figbox@bg=\box\tikz@tempbox@bg% \global\pgflinewidth=\tikz@save@line@width% \tikz@do@after@path@smuggle% + \tikz@node@is@picfalse \tikz@do@after@node% } \let\tikz@fig@continue@orig=\tikz@fig@continue -- cgit v1.2.3