diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries')
7 files changed, 370 insertions, 179 deletions
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}} |