summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pgf/macros/pgfmanual-en-macros.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgf/macros/pgfmanual-en-macros.tex')
-rw-r--r--Master/texmf-dist/doc/generic/pgf/macros/pgfmanual-en-macros.tex178
1 files changed, 162 insertions, 16 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/macros/pgfmanual-en-macros.tex b/Master/texmf-dist/doc/generic/pgf/macros/pgfmanual-en-macros.tex
index 9217305dd75..37591af1529 100644
--- a/Master/texmf-dist/doc/generic/pgf/macros/pgfmanual-en-macros.tex
+++ b/Master/texmf-dist/doc/generic/pgf/macros/pgfmanual-en-macros.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-% $Header: /cvsroot/pgf/pgf/doc/generic/pgf/macros/pgfmanual-en-macros.tex,v 1.81 2014/03/20 10:07:44 tantau Exp $
+% $Header$
\providecommand\href[2]{\texttt{#1}}
@@ -15,9 +15,27 @@
\providecommand\hyperlink[2]{\texttt{#1}}
+\newcount\pgfmanualtargetcount
+
+\def\cleanuplink#1{%
+ \expandafter\ifx\csname pgfmanual@hlink@#1\endcsname\relax%
+ \global\advance\pgfmanualtargetcount by1\relax%
+ \expandafter\xdef\csname pgfmanual@hlink@#1\endcsname{pgfmanual-pos-\the\pgfmanualtargetcount}%
+ \fi%
+}
+\def\cleanedhypertarget#1#2{% necessary for dvisvgm
+ \cleanuplink{#1}%
+ \hypertarget{\csname pgfmanual@hlink@#1\endcsname}{#2}%
+}
+\def\cleanedhyperlink#1#2{%
+ \cleanuplink{#1}%
+ \hyperlink{\csname pgfmanual@hlink@#1\endcsname}{#2}%
+}
+
\colorlet{examplefill}{yellow!80!black}
\definecolor{graphicbackground}{rgb}{0.96,0.96,0.8}
\definecolor{codebackground}{rgb}{0.9,0.9,1}
+\definecolor{animationgraphicbackground}{rgb}{0.96,0.96,0.8}
\newenvironment{pgfmanualentry}{\list{}{\leftmargin=2em\itemindent-\leftmargin\def\makelabel##1{\hss##1}}}{\endlist}
\newcommand\pgfmanualentryheadline[1]{\itemsep=0pt\parskip=0pt{\raggedright\item\strut{#1}\par}\topsep=0pt}
@@ -52,6 +70,57 @@
}
+\newenvironment{sysanimateattribute}[1]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{%
+ \pgfmanualpdflabel{#1}{}%
+ \texttt{\string\pgfsysanimate\char`\{\declare{#1}\char`\}}%
+ }
+ \index{#1@\protect\texttt{#1} system layer animation attribute}%
+ \index{Animation attributes (system layer)!#1@\protect\texttt{#1}}%
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+
+\newenvironment{animateattribute}[1]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{%
+ \pgfmanualpdflabel{#1}{}%
+ \texttt{\string\pgfanimateattribute\char`\{\declare{#1}\char`\}\marg{options}}%
+ }
+ \index{#1@\protect\texttt{#1} basic layer animation attribute}%
+ \index{Animation attributes (basic layer)!#1@\protect\texttt{#1}}%
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+
+\newenvironment{tikzanimateattribute}[1]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{%
+ \foreach \attr in{#1} {\expandafter\pgfmanualpdflabel\expandafter{\attr}{}}%
+ \textbf{Animation attribute} \foreach \attr[count=\i]
+ in{#1}{{\ifnum\i>1 \textbf,\fi} \texttt{:\declare{\attr}}}%
+ }
+ \foreach\attr in{#1}{%
+ \edef\indexcall{%
+ \noexpand\index{\attr@\noexpand\protect\noexpand\texttt{\attr} animation attribute}%
+ \noexpand\index{Animation attributes!\attr@\noexpand\protect\noexpand\texttt{\attr}}%
+ }%
+ \indexcall%
+ }%
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+
+
\newenvironment{command}[1]{
\begin{pgfmanualentry}
\extractcommand#1\@@
@@ -163,7 +232,7 @@
\newenvironment{luafiledescription}[1]{}{}
\newenvironment{luacommand}[4]{
- \hypertarget{pgf/lua/#1}{\luageneric{#2}{#3}{\texttt{(#4)}}{\texttt{function}}}
+ \cleanedhypertarget{pgf/lua/#1}{\luageneric{#2}{#3}{\texttt{(#4)}}{\texttt{function}}}
}{\endluageneric}
\newenvironment{luaparameters}{\par\emph{Parameters:}%
@@ -244,7 +313,7 @@
\newenvironment{math-function}[1]{
\def\mathdefaultname{#1}
\extractmathfunctionname{#1}
- \edef\mathurl{{math:\mathname}}\expandafter\hypertarget\expandafter{\mathurl}{}%
+ \edef\mathurl{{math:\mathname}}\expandafter\cleanedhypertarget\expandafter{\mathurl}{}%
\begin{pgfmanualentry}
\pgfmanualentryheadline{\texttt{#1}}%
\index{\mathname @\protect\texttt{\mathname} math function}%
@@ -845,7 +914,7 @@
\index{Class \currentclass!#1@\protect\texttt{#1}}%
}
-\newenvironment{attribute}[1]{
+\newenvironment{classattribute}[1]{
\begin{pgfmanualentry}
\extractattribute#1\@nil
\pgfmanualbody
@@ -1521,6 +1590,8 @@
code/.code= {\colorlet{codebackground}{#1}},
execute code/.is if=code@execute,
code only/.code= {\code@executefalse},
+ setup code/.code= {\pgfmanual@setup@codetrue\code@executefalse},
+ multipage/.code= {\code@executefalse\pgfmanual@multipage@codetrue},
pre/.store in=\code@pre,
post/.store in=\code@post,
% #1 is the *complete* environment contents as it shall be
@@ -1534,8 +1605,23 @@
every codeexample/.style={width=4cm+7pt, tikz syntax=true},
from file/.code={\codeexamplefromfiletrue\def\codeexamplesource{#1}},
tikz syntax/.is if=pgfmanualtikzsyntaxhilighting,
+ animation list/.store in=\code@animation@list,
+ animation pre/.store in=\code@animation@pre,
+ animation post/.store in=\code@animation@post,
+ animation scale/.store in=\pgfmanualanimscale,
+ animation bb/.style={
+ animation pre={
+ \tikzset{
+ every picture/.style={
+ execute at begin picture={
+ \useasboundingbox[clip] #1;}
+ }
+ }
+ }
+ }
}
+\def\pgfmanualanimscale{.5}
\newread\examplesource
@@ -1562,16 +1648,24 @@
\fi
}
+\let\code@animation@pre\pgfutil@empty
+\let\code@animation@post\pgfutil@empty
+\let\code@animation@list\pgfutil@empty
+
\let\code@pre\pgfutil@empty
\let\code@post\pgfutil@empty
\let\code@render\pgfutil@empty
\def\code@catcode@hook{}
+\newif\ifpgfmanual@multipage@code
+\newif\ifpgfmanual@setup@code
\newif\ifcodeexamplefromfile
\newdimen\codeexamplewidth
\newif\ifcode@execute
\newbox\codeexamplebox
\def\codeexample[#1]{%
+ \global\let\pgfmanual@do@this\relax%
+ \aftergroup\pgfmanual@do@this%
\begingroup%
\code@executetrue
\pgfqkeys{/codeexample}{every codeexample,#1}%
@@ -1598,6 +1692,19 @@
\fi}
\def\endofcodeexample#1{%
\endgroup%
+ \ifpgfmanual@setup@code%
+ \gdef\pgfmanual@do@this{%
+ {%
+ \returntospace%
+ \commenthandler%
+ \xdef\code@temp{#1}% removes returns and comments
+ }%
+ \edef\pgfmanualmcatcode{\the\catcode`\^^M}%
+ \catcode`\^^M=9\relax%
+ \expandafter\scantokens\expandafter{\code@temp}%
+ \catcode`\^^M=\pgfmanualmcatcode%
+ }%
+ \fi%
\ifcode@execute%
\setbox\codeexamplebox=\hbox{%
\ifx\code@render\pgfutil@empty%
@@ -1612,10 +1719,34 @@
\code@pre\expandafter\scantokens\expandafter{\code@temp\ignorespaces}\code@post\ignorespaces}%
}%
\else%
+ \global\let\code@temp\code@render%
\colorbox{graphicbackground}{\color{black}\ignorespaces%
\code@render}%
\fi%
}%
+ \ifx\code@animation@list\pgfutil@empty%
+ \else%
+ \setbox\codeexampleboxanim=\vbox{%
+ \rightskip0pt\leftskip0pt plus1filll%
+ \ifdim\wd\codeexamplebox>\codeexamplewidth%
+ \else%
+ \hsize\codeexamplewidth%
+ \advance\hsize by2cm%
+ \fi%
+ \leavevmode\catcode`\^^M=9%
+ \foreach \pgfmanualtime/\pgfmanualtimehow in\code@animation@list{%
+ \setbox\codeexampleboxanim=\hbox{\colorbox{animationgraphicbackground}{%
+ \tikzset{make snapshot of=\pgfmanualtime}%
+ \scalebox{\pgfmanualanimscale}{\color{black}\ignorespaces%
+ \code@animation@pre\expandafter\scantokens\expandafter{\code@temp\ignorespaces}\code@animation@post\ignorespaces}%
+ }}%
+ \space\raise4pt\hbox to0pt{\vrule width0pt height1em\hbox
+ to\wd\codeexampleboxanim{\hfil\scriptsize$t{=}\pgfmanualtimehow \mathrm s$\hfil}\hss}%
+ \lower\ht\codeexampleboxanim\box\codeexampleboxanim\hfil\penalty0\hskip0ptplus-1fil%
+ }%
+ }%
+ \setbox\codeexampleboxanim=\hbox{\hbox{}\hskip-2cm\box\codeexampleboxanim}%
+ \fi%
\ifdim\wd\codeexamplebox>\codeexamplewidth%
\def\code@start{\par}%
\def\code@flushstart{}\def\code@flushend{}%
@@ -1640,6 +1771,9 @@
\hrule width0pt%
\footnotesize\vskip-1em%
\code@flushstart\box\codeexamplebox\code@flushend%
+ \vskip0pt%
+ \leavevmode%
+ \box\codeexampleboxanim%
\vskip-1ex
\leavevmode%
\end{minipage}%
@@ -1648,10 +1782,29 @@
\def\code@width{\linewidth-6pt}
\def\code@end{}
\fi%
- \code@mid%
- \colorbox{codebackground}{%
- \pgfkeysvalueof{/codeexample/prettyprint/base color}%
- \begin{minipage}[t]{\code@width}%
+ \code@mid%
+ \ifpgfmanual@multipage@code%
+ {%
+ \pgfkeysvalueof{/codeexample/prettyprint/base color}%
+ \pgfmanualdolisting{#1}%
+ }%
+ \else%
+ \colorbox{codebackground}{%
+ \pgfkeysvalueof{/codeexample/prettyprint/base color}%
+ \begin{minipage}[t]{\code@width}%
+ \pgfmanualdolisting{#1}%
+ \end{minipage}}%
+ \fi%
+ \code@end%
+ \par%
+ \medskip
+ \endcodeexample\endgroup%
+}
+
+\def\endcodeexample{\endgroup}
+\newbox\codeexampleboxanim
+
+\def\pgfmanualdolisting#1{%
{%
\let\do\@makeother
\dospecials
@@ -1670,16 +1823,9 @@
\obeylines
\everypar \expandafter{\the\everypar \unpenalty}%
\pgfkeysvalueof{/codeexample/typeset listing/.@cmd}{#1}\pgfeov
- }
- \end{minipage}}%
- \code@end%
- \par%
- \medskip
- \endcodeexample\endgroup
+ }%
}
-\def\endcodeexample{\endgroup}
-
\makeatother