From 9512ee188f093d3f12646f92bac5126168b3410e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 22 Aug 2022 20:49:17 +0000 Subject: tikz-ext (22aug22) git-svn-id: svn://tug.org/texlive/trunk@64166 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/tikz-ext/README.md | 29 ++ .../latex/tikz-ext/tikz-ext-manual-en-calendar.tex | 80 +++++ .../latex/tikz-ext/tikz-ext-manual-en-intro.tex | 28 ++ .../tikz-ext-manual-en-library-calendar-plus.tex | 69 ++++ .../tikz-ext/tikz-ext-manual-en-library-misc.tex | 244 ++++++++++++++ .../tikz-ext-manual-en-library-node-families.tex | 102 ++++++ .../tikz-ext-manual-en-library-paths.arcto.tex | 110 ++++++ .../tikz-ext-manual-en-library-paths.ortho.tex | 185 +++++++++++ .../tikz-ext-manual-en-library-paths.timer.tex | 90 +++++ .../tikz-ext-manual-en-library-patterns.images.tex | 50 +++ ...tikz-ext-manual-en-library-positioning-plus.tex | 183 ++++++++++ ...kz-ext-manual-en-library-topaths.arcthrough.tex | 63 ++++ .../tikz-ext/tikz-ext-manual-en-library-trans.tex | 136 ++++++++ .../tikz-ext/tikz-ext-manual-en-main-body.tex | 192 +++++++++++ .../tikz-ext/tikz-ext-manual-en-main-preamble.tex | 368 +++++++++++++++++++++ .../tikz-ext/tikz-ext-manual-en-pgf-trans.tex | 175 ++++++++++ .../doc/latex/tikz-ext/tikz-ext-manual.pdf | Bin 0 -> 356908 bytes .../doc/latex/tikz-ext/tikz-ext-manual.tex | 33 ++ 18 files changed, 2137 insertions(+) create mode 100644 Master/texmf-dist/doc/latex/tikz-ext/README.md create mode 100644 Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-calendar.tex create mode 100644 Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-intro.tex create mode 100644 Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-calendar-plus.tex create mode 100644 Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-misc.tex create mode 100644 Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-node-families.tex create mode 100644 Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.arcto.tex create mode 100644 Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.ortho.tex create mode 100644 Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.timer.tex create mode 100644 Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-patterns.images.tex create mode 100644 Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-positioning-plus.tex create mode 100644 Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-topaths.arcthrough.tex create mode 100644 Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-trans.tex create mode 100644 Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-main-body.tex create mode 100644 Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-main-preamble.tex create mode 100644 Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-trans.tex create mode 100644 Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual.pdf create mode 100644 Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual.tex (limited to 'Master/texmf-dist/doc') diff --git a/Master/texmf-dist/doc/latex/tikz-ext/README.md b/Master/texmf-dist/doc/latex/tikz-ext/README.md new file mode 100644 index 00000000000..b0e84a76de9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-ext/README.md @@ -0,0 +1,29 @@ +# TikZ-Extensions + +## License + +This material is subject to the LaTeX Project Public License and the GNU Free Documentation License. + +## About the Author + +Name: Qrrbrbirlbel + +## Introduction + +This is not a LaTeX package but a collection of libraries for PGF and TikZ. + +These are + + * `ext.calendar-plus`, + * `ext.node-familes`, + * `ext.transformations.mirror`, + * `ext.paths.arcto`, + * `ext.paths.ortho`, + * `ext.paths.timer`, + * `ext.patterns.images`, + * `ext.positioning-plus`, + * `ext.topaths.arcthrough` and + * `ext.misc`. + + These were developed in response to questions on tex.stackexchange.com. + Some of these can be find by searching for my [user id](https://tex.stackexchange.com/search?q=user%3A16595+%22my+library%22). \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-calendar.tex b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-calendar.tex new file mode 100644 index 00000000000..88a3567c1a4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-calendar.tex @@ -0,0 +1,80 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\section{Calendar: Weeknumbers and more conditionals} +\begin{package}{calendar-ext} + This package adds week numbers and more conditionals to the PGF package |pgfcalendar|. + (Despite the code example above, this package is not set up to work with Con\TeX t.) +\end{package} + +%This package extends the |pgfcalendar| package. + +\begin{multicols}{2} + +\subsection{Extensions} + +The following tests are added. +\begin{itemize} +\itemcalendaroption{Jan} This test is passed by all dates that are in the month of January. +\itemcalendaroption{Feb} as above. +\itemcalendaroption{Mar} as above. +\itemcalendaroption{Apr} as above. +\itemcalendaroption{May} as above. +\itemcalendaroption{Jun} as above. +\itemcalendaroption{Jul} as above. +\itemcalendaroption{Aug} as above. +\itemcalendaroption{Sep} as above. +\itemcalendaroption{Oct} as above. +\itemcalendaroption{Nov} as above. +\itemcalendaroption{Dec} as above. +\itemcalendaroption{leap year}\opt{|=|\meta{year}} + This test checks whether the given year is a leap year. If + \meta{year} is omitted, it checks the year of the current date. +\itemcalendaroption{and}|=|\marg{tests} + This test passes when all \meta{tests} pass. +\itemcalendaroption{not}|=|\marg{tests} + This test passes when \meta{tests} do not pass. +\itemcalendaroption{yesterday}|=|\marg{tests} + This test passes when the previous day passes \meta{tests}. +\itemcalendaroption{week}|=|\meta{num} + This test passes when the current week of the year equals \marg{num}. +\end{itemize} + +The shorthands for |d-| and |m-| are slightly changed so that they are +expandable. This makes it possible to use these shorthands inside of PGFmath. +The shorthands for the week (see section~\ref{calendar:weeknumbering}) +are added. These are +\begin{itemize} +\item |n-| (shortest numerical representation), +\item |n=| (shortest but added horizontal space) and +\item |n0| (leading zero when below 10). +\end{itemize} + +\subsection{Week numbering (ISO~8601)} +\label{calendar:weeknumbering} +\begin{command}{\pgfcalendarjulianyeartoweek\marg{Julian day}\marg{year}\marg{week counter}} + This command calculates the week for the \meta{Julian day} of \meta{year}. + The \meta{week counter} must be a \TeX\space counter. + + The calculation follows the rule of ISO~8601 where the first week has that + year's first Thursday in it. +\end{command} + +Inside of |\pgfcalendar|\indexCommandO\pgfcalendar the command |\pgfcalendarcurrentweek| will be available. +\begin{command}{\pgfcalendarcurrentweek} + This command returns the current week number (always two digits -- use shorthand |n.| + to strip the leading zero). +\end{command} + +Inside of |\ifdate|\indexCommandO\ifdate the command |\pgfcalendarifdateweek| will be available. +\begin{command}{\pgfcalendarifdateweek} + This command returns the week number (always two digits). +\end{command} +\end{multicols} \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-intro.tex b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-intro.tex new file mode 100644 index 00000000000..ac5811ac6e1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-intro.tex @@ -0,0 +1,28 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\part{Introduction} +\begin{multicols}{2} +\section{Usage} +This package is called |tikz-ext|, however, one can't load it via |\usepackage|. +Instead, this package consists of multiple PGF and \tikzname\space libraries +which are loaded by either |\usepgflibrary| or |\usetikzlibrary|. + +\section{Why do we need it?} +Since I have been answering questions on \hyperlink{https://tex.stackexchange.com}{TeX.sx} +I've noticed that some questions come up again and again, +every time with a slightly different approach on how to solve them. + +I don't like reinventing the wheel which is why I've gathered the code of my answers in this package. + +And, yes, I am using them myself, too. + +\section{Should these libraries be part of \tikzname?} +I guess. +\end{multicols} \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-calendar-plus.tex b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-calendar-plus.tex new file mode 100644 index 00000000000..14c78e9be0f --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-calendar-plus.tex @@ -0,0 +1,69 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\section{Calendar} +\begin{tikzlibrary}{ext.calendar-plus} + This library extends the \tikzname\space library |calendar|\indexLibraryO{calendar}. +\end{tikzlibrary} + +\begin{multicols}{2} + +\subsection{Value-keys and nestable \texttt{if} key} + +The values of following keys are originally stored in some macros that are not +accessible by the user. These are now simple value-keys. +The |@|-protected macros are still available, of course. + +\begin{key}{/tikz/day xshift (initially 3ex)} +\end{key} +\begin{key}{/tikz/day yshift (initially 3.5ex)} +\end{key} +\begin{key}{/tikz/month xshift (initially 9ex)} +\end{key} +\begin{key}{/tikz/month yshift (initially 9ex)} +\end{key} + +It is now also possible to nest |/tikz/if| occurrences. +\begin{key}{/tikz/if=|(|\meta{conditions}|)|\meta{code or options}\opt{|else|\meta{else code or options}}} +\end{key} + +\subsection{Week numbering (ISO~8601)} + +The actual week number algorithm is implemented by the |pgfcalendar-ext| package/module in section~\ref{calendar:weeknumbering}. +\begin{key}{/tikz/week code=\meta{code}} + Works like |/tikz/day code| or |/tikz/month code|, only for weeks.\indexKeyO{day code}\indexKeyO{month code} +\end{key} + +\begin{key}{/tikz/week text=\meta{text}} + Works like |/tikz/day text| or |/tikz/month text|, only for weeks.\indexKeyO{day text}\indexKeyO{month text} +\end{key} + +\begin{stylekey}{/tikz/every week} + Works like |/tikz/every day| or |/tikz/every month|, only for weeks.\indexKeyO{every day}\indexKeyO{every month} +\end{stylekey} + +\begin{stylekey}{/tikz/week label left} + Places the week label to the left of the first day of the month. (For + |week list| and |month list| where a week does not start on a Monday, the + position is chosen ``as if'' the week had started on a Monday -- which is + usually exactly what you want.) + % +\begin{codeexample}[preamble={\usetikzlibrary{ext.calendar-plus}}] +\tikz + \calendar [week list, month label above centered, + dates=2022-07-01 to 2022-07-31, + week label left, + every week/.append style={gray!50!black,font=\sffamily}]; +\end{codeexample} + % +\end{stylekey} + +\end{multicols} +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-misc.tex b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-misc.tex new file mode 100644 index 00000000000..79cc9c21c3e --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-misc.tex @@ -0,0 +1,244 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\section{And a little bit more} +\begin{tikzlibrary}{ext.misc} + This library adds miscellaneous utilities to PGFmath, PGF or \tikzname. +\end{tikzlibrary} + +\subsection{PGFmath} + +\begin{multicols}{2} +\pgfkeys{/codeexample/every codeexample/.append style={width=3cm}} +\subsubsection{Postfix operator \texttt{R}} + +Similar to |\segments[]| in PSTricks, the postfix operator |R| allows the user +to use an arbitrary number of segments of a circle to be used instead of an angle. + +\begin{key}{/tikz/full arc=\meta{num} (default |{}|)} + The number \meta{num} of segments will be set up. + Using |full arc| with an empty value disables the segmentation and |1R| equals $1^\circ$. + + The given value \meta{num} is evaluated when the key is used and doesn't change when + \meta{num} contains variables that change. +\end{key} +The |R| operator can then be used. +\begin{math-operator}{R}{postfix}{fullarc} + Multiplies \mvar{x} with $\frac{360}{\meta{num}}$. +\end{math-operator} + +\subsubsection{Functions} + +\begin{math-function}{strrepeat("\mvar{Text}", \mvar{x})} +\mathcommand + Returns a string with \mvar{Text} repeated \mvar{x} times. + +\begin{codeexample}[] +\pgfmathparse{strrepeat("foo", 5)} +\pgfmathresult +\end{codeexample} +\end{math-function} + +\begin{math-function}{isInString("\mvar{String}", "\mvar{Text}")} +\mathcommand + Returns |1| (true) if \mvar{Text} contains \mvar{String}, + otherwise |0| (false). + +\begin{codeexample}[] +\pgfmathparse{isInString("foo", "bar")} +\pgfmathresult \ and\ +\pgfmathparse{isInString("foo", "foobar")} +\pgfmathresult +\end{codeexample} +\end{math-function} + +\begin{math-function}{strcat("\mvar{Text A}", "\mvar{Text B}", …)} +\mathcommand + Returns the concatenation of all given parameters. + +\begin{codeexample}[] +\pgfmathparse{strcat("blue!", int(7*3), "!green")} +\pgfmathresult +\end{codeexample} +\end{math-function} + + +\begin{math-function}{isEmpty("\mvar{Text}")} +\mathcommand + Returns |1| (true) if \mvar{Text} is empty, otherwise |0| (false). + % +\begin{codeexample}[] +\pgfmathparse{isEmpty("foo")} \pgfmathresult\ and\ +\pgfmathparse{isEmpty("")} \pgfmathresult\ and\ +\def\emptyText{} +\pgfmathparse{isEmpty("\emptyText")} \pgfmathresult +\end{codeexample} +\end{math-function} + +\begin{math-function}{atanXY(\mvar{x},\mvar{y})} +\mathcommand + Arctangent of $\mvar y\div \mvar x$ in degrees. This also takes into account the quadrant. + This is just a argument-swapped version of |atan2|\indexMathFunctionO{atan2} which makes it easier to use + the |\p| commands of the |calc|\indexLibraryO{calc} library. + % +\begin{codeexample}[] +\pgfmathparse{atanXY(3,4)} \pgfmathresult +\end{codeexample} +\end{math-function} +\begin{math-function}{atanYX(\mvar{y},\mvar{x})} +\mathcommand + Arctangent of $y\div x$ in degrees. This also takes into account the quadrant. +\begin{codeexample}[] +\pgfmathparse{atanYX(4,3)} \pgfmathresult +\end{codeexample} +\end{math-function} + +\subsubsection{Functions: using coordinates} +The following functions can only be used with PGF and/or \tikzname. +Since the arguments are usually plain text (and not numbers) one has to wrap +them in |"|. +\begin{math-function}{anglebetween("\mvar{p1}", "\mvar{p2}")}\mathcommand + Return the angle between the centers of the nodes \mvar{p1} and \mvar{p2}. +\end{math-function} +\begin{math-function}{qanglebetween("\mvar{p}")}\mathcommand + Return the angle between the origin and the center of the node \mvar{p}. +\end{math-function} +\begin{math-function}{distancebetween("\mvar{p1}", "\mvar{p2}")}\mathcommand + Return the distance (in pt) between the centers of the nodes \mvar{p1} and \mvar{p2}. +\end{math-function} +\begin{math-function}{qdistancebetween("\mvar{p}")}\mathcommand + Return the distance (in pt) between the origin and the center of the node \mvar{p}. +\end{math-function} + +\end{multicols} + +\begin{codeexample}[width=6cm,preamble=\usetikzlibrary{calc,ext.misc,through}] +\begin{tikzpicture} +\path (0,0) coordinate (A) + (0:4) coordinate (B) +(75:4) coordinate (C); +\draw (A) -- (B) -- (C) -- cycle; +\foreach \cnt in {1,...,4}{ + \pgfmathsetmacro\triA{distancebetween("B","C")} + \pgfmathsetmacro\triB{distancebetween("C","A")} + \pgfmathsetmacro\triC{distancebetween("A","B")} + \path (barycentric cs:A=\triA,B=\triB,C=\triC) coordinate (M) + node [draw, circle through=($(A)!(M)!(C)$)] (M) {}; + \draw ($(C)-(A)$) coordinate (vecB) + (M.75-90) coordinate (@) + (intersection of @--[shift=(vecB)]@ and B--C) coordinate (C) -- + (intersection of @--[shift=(vecB)]@ and B--A) coordinate (A);} +\end{tikzpicture} +\end{codeexample} +\subsection{PGFkeys} + +\begin{multicols}{2} + +\subsubsection{Conditionals} + +\begin{key}{/utils/if=\meta{cond}\meta{true}\opt{\meta{false}}} + This key checks the conditional \meta{cond} and applies the styles \meta{true} + if \meta{cond} is true, otherwise \meta{false}. + \meta{cond} can be anything that PGFmath understands. + + As a side effect on how PGFkeys parses argument, the \meta{false} argument is + actually optional. +\end{key} + +The following keys use \TeX' macros |\if|, |\ifx|, |\ifnum| and |\ifdim| for faster +executions. + +\begin{key}{/utils/TeX/if=\meta{token A}\meta{token B}\meta{true}\opt{\meta{false}}} + This key checks via |\if| if \meta{token A} matches \meta{token B} + and applies the styles \meta{true} if it does, otherwise \meta{false}. + + As a side effect on how PGFkeys parses argument, the \meta{false} argument is + actually optional. +\end{key} + +\begin{key}{/utils/TeX/ifx=\meta{token A}\meta{token B}\meta{true}\opt{\meta{false}}} + As above. +\end{key} + +\begin{key}{/utils/TeX/ifnum=\meta{num cond}\meta{true}\\opt{\meta{false}}} + This key checks |\ifnum|\meta{num cond} + and applies the styles \meta{true} if true, otherwise \meta{false}. + A delimiting |\relax| will be inserted after \meta{num cond}. + + As a side effect on how PGFkeys parses argument, the \meta{false} argument is + actually optional. +\end{key} + +\begin{key}{/utils/TeX/ifdim=\meta{dim cond}\meta{true}\opt{\meta{false}}} + As above. +\end{key} + +\begin{key}{/utils/TeX/ifempty=\meta{Text}\meta{true}\opt{\meta{false}}} + This checks whether \meta{Text} is empty and applies styles \meta{true} if true, + otherwise \meta{false}. +\end{key} + + +\subsubsection{Handlers} + +While already a lot of values given to keys are evaluated by PGFmath at some point, +not all of them are. + +\begin{handler}{{.pgfmath}|=|\meta{eval}} + This handler evaluates \meta{eval} before it is handed to the key. +\end{handler} + +\begin{handler}{{.pgfmath int}|=|\meta{eval}} + As above but truncates the result. +\end{handler} + +\begin{handler}{{.pgfmath strcat}|=|\meta{eval}} + As above but uses the |strcat| function. + + In the example below, one could have used the |/pgf/foreach/evaluate| key from |\foreach|. +\begin{codeexample}[width=3.7cm,preamble=\usetikzlibrary{misc}] +\tikz\foreach \i in {0,10,...,100} +\draw[ + line width=+.2cm, + color/.pgfmath strcat={"red!",sqrt(\i)*10,"!blue"} +] + (0,\i/50) -- +(right:3); +\end{codeexample} +\end{handler} + +\begin{handler}{{.List}|=|\meta{\meta{e1}, \meta{e2}, \dots, \meta{en}}} + This handler evaluates the given list with |\foreach| and concatenates the element and + the result is then given to the used key. +\end{handler} +\end{multicols} +\begin{codeexample}[width=6cm,preamble=\usetikzlibrary{fit,ext.misc}] +\begin{tikzpicture}[nodes={draw, dashed, inner sep=+10pt}] + \foreach \point [count=\cnt] in {(0,0), (0,2), (2,0), (2,2), (3,3), (-1,-1)} + \fill \point circle[radius=.1] coordinate (point-\cnt); + \node[gray, fit/.List={(point-1),(point-...),(point-4)}] {}; + \node[red, fit/.List={(point-1),(point-...),(point-5)}] {}; + \node[blue, fit/.List={(point-1),(point-...),(point-6)}] {}; +\end{tikzpicture} +\end{codeexample} + +\subsection{PGFfor} + +Instead of |\foreach \var in {start, start + delta, ..., end}| one can use +|\foreach \var[use int=start to end step delta]|. + +\begin{key}{/pgf/foreach/use int=\meta{start}|to|\meta{end}\opt{|step|\meta{delta}}} +The values \meta{start}, \meta{end} and \meta{delta} are evaluates by PGFmath at initialization. +The part |step |\meta{delta} is optional (\meta{delta} = 1). +\end{key} + +\begin{key}{/pgf/foreach/use float=\meta{start}|to|\meta{end}\opt{|step|\meta{delta}}} +Same as above, however the results are not truncated. +\end{key} + +%TODO: edges to and edges through +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-node-families.tex b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-node-families.tex new file mode 100644 index 00000000000..04ebb7c7a0c --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-node-families.tex @@ -0,0 +1,102 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\section{Node Families} +\begin{tikzlibrary}{ext.node-families} + With this library the user can instruct multiple nodes to have the same + width, height, text width, text height or text width. + This uses the hook \referenceKeyandIndexO{execute at end picture} to write the nodes' + measurements to the \filetype{aux} file. + + Unfortunately, this does not work with the |external| library.\indexLibraryO{external}% + \footnote{Not only would the \texttt{external} library not notice the change of the value between compilations runs, + it also changes the way \texttt{\textbackslash pgfutil@writeout} works which suddenly writes to the \textsc{log} file instead.} +\end{tikzlibrary} + +This library introduces two new shapes called |Circle| and |Rectangle| +that are basically copies of the original shapes |circle|\indexShapeO{circle} and |rectangle|\indexShapeO{rectangle}. +However, their dimension will be set to the same maximum |minimum width| and |minimum height| +when one of the following \meta{name}s are declared. +\begin{key}{/tikz/node family/width=\meta{name} (initially |\{\}|)} +Nodes with the same \meta{name} will have the same \referenceKeyandIndexO[/pgf/]{minimum width}. +An empty \meta{name} disables the evaluation by the library. +\begin{codeexample}[preamble=\usetikzlibrary{positioning,ext.node-families},/tikz/node distance=.5cm] +\tikzexternaldisable % ext.node-families does not work with active externalization +\begin{tikzpicture}[nodes={Rectangle, draw, node family/width=manual}] +\node (a) {Foo}; +\node[below=of a] (b) {Foobar}; +\end{tikzpicture} +\end{codeexample} +\end{key} +\begin{key}{/tikz/node family/height=\meta{name} (initially |\{\}|)} +Nodes with the same \meta{name} will have the same \referenceKeyandIndexO[/pgf/]{minimum height}. +An empty \meta{name} disables the evaluation by the library. +\end{key} +\begin{key}{/tikz/node family/size=\meta{name}} +Sets both |height| and |width|. +\end{key} + +While |node family/width| and |node family/height| only work for the new shapes |Circle| and |Rectangle|, +the following keys~-- when setup, see below~-- work with every shape with one single node part. +Initially though, only |circle|, |rectangle|, |Circle| and |Rectangle| are set up that way. +\begin{key}{/tikz/node family/text height=\meta{name} (initially |\{\}|)} +Nodes with the same \meta{name} will have the same text height. +An empty \meta{name} disables the evaluation by the library. +\end{key} + +\begin{key}{/tikz/node family/text depth=\meta{name} (initially |\{\}|)} +Nodes with the same \meta{name} will have the same text depth. +An empty \meta{name} disables the evaluation by the library. +\end{key} + +\begin{key}{/tikz/node family/text width=\meta{name} (initially |\{\}|)} +Nodes with the same \meta{name} will have the same text width. +An empty \meta{name} disables the evaluation by the library. +\end{key} + +\begin{key}{/tikz/node family/text=\meta{name}} +Sets |text height|, |text depth| and |text width|. +\end{key} + +Since the width of the node's content's box is setup much earlier, +the previous key only extends the width of that box which would make the text +seem as if it where aligned to the left. +With |text width family align| this can changed. +\begin{key}{/tikz/node family/text width align=\meta{alignment}(initially |center|)} +\meta{alignment} is one of |left|, |center| or |right|. + +\begin{codeexample}[preamble=\usetikzlibrary{positioning,ext.node-families},/tikz/node distance=.5cm] +\tikzexternaldisable % ext.node-families does not work with active externalization +\begin{tikzpicture}[nodes={Rectangle, draw, node family={text width=manual, text width align=right}}] +\node (a) {Foo}; +\node[below=of a] (b) {Foobar}; +\end{tikzpicture} +\end{codeexample} +\end{key} + +\begin{key}{/tikz/node family/prefix=\meta{prefix}(initially \expandafter|\string\pgfpictureid-|)} +The family names are prefixed with the value of |/tikz/node family/prefix|. +\end{key} + +\begin{key}{/tikz/node family/setup shape=\meta{shape}} +This adds instructions to the \meta{shape}'s definition which +adjust the text box's dimensions according to the family. + +This should be only used once per shape. +\end{key} +\begin{codeexample}[width=9cm,preamble=\usetikzlibrary{ext.node-families,shapes.geometric}] +\tikzexternaldisable % ext.node-families does not work with active externalization +\begin{tikzpicture}[node family/setup shape=diamond] +\foreach \cnt[count=\Cnt] in {a,...,h} + \node[draw, diamond, node family/text=aTOh] (\cnt) + at (right:\Cnt) {\cnt}; +\draw[help lines] (a.south) -- (h.south) (a.north) -- (h.north) (a.base-|a.west) -- (h.base-|h.east); +\end{tikzpicture} +\end{codeexample} +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.arcto.tex b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.arcto.tex new file mode 100644 index 00000000000..8ed660b3a30 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.arcto.tex @@ -0,0 +1,110 @@ +% !TeX root = tikz-ext-manual.tex +% !TeX spellcheck = en_US +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\section{Arc \emph{to} a point} +\label{library:paths.arcto} + +\begin{tikzlibrary}{ext.paths.arcto} + This library adds the new path operation |arc to| that specifies an arc \emph{to} a point~-- + without the user having to specify any angles. +\end{tikzlibrary} + +\begin{codeexample}[width=.5\linewidth,preamble=\usetikzlibrary{ext.paths.arcto}] +\begin{tikzpicture}[ultra thick,dot/.style={label={#1}}] +\coordinate[dot=below left:$a$] (a) at (0,0); +\coordinate[dot=above right:$b$] (b) at (2,3); +\begin{scope}[ + radius=3, + nodes={ + shape=circle, + fill=white, + fill opacity=.9, + text opacity=1, + inner sep=+0pt, + sloped, + allow upside down + }] +\draw[blue] (a) arc to[] + node[near start] {.25} node {.5} node[near end] {.75} (b); +\draw[red] (a) arc to[clockwise] + node[near start] {.25} node {.5} node[near end] {.75} (b); +\draw[blue!50] (a) arc to[large] + node[near start] {.25} node {.5} node[near end] {.75} (b); +\draw[red!50] (a) arc to[large, clockwise] + node[near start] {.25} node {.5} node[near end] {.75} (b); +\end{scope} + +\fill[radius=2pt] (a) circle[] (b) circle[]; +\end{tikzpicture} +\end{codeexample} + +\begin{pathoperation}{arc to}{\opt{\oarg{options}}\meta{coordinate or cycle}} +When this operation is used, the path gets extended by an arc that goes through +the current point and \meta{coordinate}. + +For two points there exist two circles or four arcs that go through or connect +these two points. Which one of these is constructed is determined by the following +options that can be used inside of \meta{options}. + +\begin{stylekey}{/tikz/arc to/clockwise} + This constructs an arc that goes clockwise. +\end{stylekey} + +\begin{stylekey}{/tikz/arc to/counter clockwise} + This constructs an arc that goes counter clockwise. + + This is the default. +\end{stylekey} + +\begin{stylekey}{/tikz/arc to/large} + This constructs an arc whose angle is larger than $180^\circ$. +\end{stylekey} + +\begin{stylekey}{/tikz/arc to/small} + This constructs an arc whose angle is smaller than $180^\circ$. +\end{stylekey} + +\begin{key}{/tikz/arc to/rotate=\meta{degree}} + Rotates the arc by \meta{degree}. + This is only noticeable when |x radius| and |y radius| are different. +\end{key} + +\begin{key}{/tikz/arc to/x radius=\meta{value}} + This forwards the \meta{value} to \referenceKeyandIndexO{x radius}. + Its \meta{value} is used for the radius of the arc. +\end{key} + +\begin{key}{/tikz/arc to/y radius=\meta{value}} + This forwards the \meta{value} to \referenceKeyandIndexO{y radius}. + Its \meta{value} is used for the radius of the arc. +\end{key} + +\begin{key}{/tikz/arc to/radius=\meta{value}} + This forwards the \meta{value} to both |/tikz/x radius| and |/tikz/y radius|. + Its \meta{value} is used for radius of the arc. +\end{key} + +\begin{stylekey}{/tikz/every arc to} + After |/tikz/every arc| this will also be applied before any \meta{options} are set. +\end{stylekey} + +It should be noted that this uses |\pgfpatharcto| for which the \tikzname\space manual warns:\indexCommandO\pgfpatharcto +\begin{quote}\itshape + The internal computations necessary for this command are numerically very unstable. + In particular, the arc will not always really end at the \meta{target coordinate}, + but may be off by up to several points. + A more precise positioning is currently infeasible due to \TeX's numerical weaknesses. + The only case it works quite nicely is when the resulting angle is a multiple of $90^\circ$. +\end{quote} + +The |arc to| path operation will also work only in the |canvas| coordinate system. +The lengths of the vectors $(1, 0)$ and $(0, 1)$ will be used for the calculation of the radii +but no further consideration is done. +\end{pathoperation} \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.ortho.tex b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.ortho.tex new file mode 100644 index 00000000000..a46f6be0234 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.ortho.tex @@ -0,0 +1,185 @@ +% !TeX root = tikz-ext-manual.tex +% !TeX spellcheck = en_US +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\section{More Horizontal and Vertical Lines} +\label{library:paths.ortho} + +\begin{tikzlibrary}{ext.paths.ortho} + This library adds new path specifications \verb!|-|!, \verb!-|-! as well as + |r-ud|, |r-du|, |r-lr| and |r-rl|. +\end{tikzlibrary} + +\subsection{Zig-Zag} +Similar to the path operations \verb!|-! and \verb!-|! this library adds\indexPathOperationO{\protect\pgfmanualbar-}\indexPathOperationO{-\protect\pgfmanualbar} +the path operations \verb!|-|! and \verb!-|-!. +{\catcode`\|=12 +\begin{pathoperation}[noindex]{|-|}{\opt{\oarg{options}}\meta{coordinate or cycle}} + \index{---1@\protect\texttt{\protect\pgfmanualbar-\protect\pgfmanualbar} path operation}% + \index{Path operations!---1@\protect\texttt{\protect\pgfmanualbar-\protect\pgfmanualbar}}% + \pgfmanualpdflabel[\catcode`\|=12 ]{|-|}{}% + This operation means ``first vertical, then horizontal and then vertical again''. +\end{pathoperation} +\begin{pathoperation}[noindex]{-|-}{\opt{\oarg{options}}\meta{coordinate or cycle}} + \index{--1@\protect\texttt{-\protect\pgfmanualbar-} path operation}% + \index{Path operations!--1@\protect\texttt{-\protect\pgfmanualbar-}}% + \pgfmanualpdflabel[\catcode`\|=12 ]{-|-}{}% + This operation means ``first horizontal, then vertical and then horizontal again''. +\end{pathoperation} +} +\begin{key}{/tikz/hvvh/ratio=\meta{ratio} (initially 0.5)} + This sets the ratio for the middle part of the Zig-Zag connection. + + For values $\meta{ratio} < 0$ and $\meta{ratio} > 1$ the Zig-Zag lines will + look more like Zig-Zig lines. +\begin{codeexample}[preamble=\usetikzlibrary{paths.ortho}] +\begin{tikzpicture}[very thick, rounded corners] +\draw[help lines] (-.25, -1.25) grid (2.25, 1.25); +\draw (0, 0) -|- (2, 1) -- + (2, 0) -|-[ratio=.25] (0,-1) -- cycle; +\end{tikzpicture} +\end{codeexample} +\end{key} +%TODO: hvvh/distance needs fixing, maybe? +\begin{key}{/tikz/hvvh/distance=\meta{distance}} + This sets the distance between the start point + and the middle part of the Zig-Zag connection. + + For values $\meta{distance} < 0$ the distance will be used for the target coordinate. +\begin{codeexample}[width=8cm,preamble=\usetikzlibrary{ext.paths.ortho}] +\begin{tikzpicture}[very thick,-latex] +\draw[help lines,-] (-.25, -.25) grid (5.25, 3.25); +\draw (0, 0) -|-[distance= .5cm] ++(2, 1); +\draw (0, 2) -|-[distance=-.5cm] ++(2, 1); + +\tikzset{xshift=3cm} +\draw (2, 1) -|-[distance= .5cm] ++(-2, -1); +\draw (2, 3) -|-[distance=-.5cm] ++(-2, -1); +\end{tikzpicture} +\end{codeexample} +\end{key} +\begin{key}{/tikz/hvvh/from center=\opt{\meta{true or false}} (default true)} + When nodes get connected the placement of the middle part of the Zig-Zag + and the Zig-Zig (see below) connections will be calculated from the border + of these nodes. + The middle part of the connections can be calculated from the nodes' center + if this key is set to |true|. +\end{key} + +New timers are setup for both the Zig-Zag and the Zig-Zig connections, +these can be configured through the following keys. +\begin{codeexample}[width=8cm,preamble=\usetikzlibrary{paths.ortho}] +\tikz \draw (0,0) -|- (2,3) + foreach \p in {0.0, 0.25, 0.5, 0.75, 1.0}{ + node [pos=\p] {\p}}; +\end{codeexample} +\begin{key}{/tikz/hvvh/spacing=\meta{number} (initially 4)} + Unless $\meta{number} = 0$ is set + \begin{itemize} + \item |pos = 0| will be at the start,\indexKeyO{pos} + \item |pos = 1| will be at the end, + \item |pos = |$\frac{1}{\meta{number}}$ will be at the first kink, + \item |pos = |$\frac{\meta{number}-1}{\meta{number}}$ will be at the second kink and + \item |pos = .5| will be in the middle of the middle part of the connection. + \end{itemize} + + If $\meta{number} = 0$ then + \begin{itemize} + \item |pos = -1| will be at the start, + \item |pos = 2| will be at the end, + \item |pos = 0| will be at the first kink, + \item |pos = 1| will be at the second kink and + \item |pos = .5| will still be in the middle of the middle part of the connection. + \end{itemize} +\end{key} +\begin{key}{/tikz/hvvh/middle 0 to 1} + This is an alias for |spacing = 0|. +\end{key} + +\subsection{Zig-Zig} +\begin{pathoperation}{r-ud}{\opt{\oarg{options}}\meta{coordinate or cycle}} + This operation means ``first up, then horizontal and then down''. + \begin{key}{/tikz/udlr/ud distance=\meta{length} (initially .5cm)} + This sets the distance between the start and the horizontal line to \meta{length}. + \end{key} +\end{pathoperation} +\begin{pathoperation}{r-du}{\opt{\oarg{options}}\meta{coordinate or cycle}} + This operation means ``first down, then horizontal and then up''. + \begin{key}{/tikz/udlr/du distance=\meta{length} (initially .5cm)} + This sets the distance between the start and the horizontal line to \meta{length}. + \end{key} +\end{pathoperation} +\begin{pathoperation}{r-lr}{\opt{\oarg{options}}\meta{coordinate or cycle}} + This operation means ``left down, then vertical and then right''. + \begin{key}{/tikz/udlr/lr distance=\meta{length} (initially .5cm)} + This sets the distance between the start and the vertical line to \meta{length}. + \end{key} +\end{pathoperation} +\begin{pathoperation}{r-rl}{\opt{\oarg{options}}\meta{coordinate or cycle}} + This operation means ``first right, then vertical and then down''. + \begin{key}{/tikz/udlr/rl distance=\meta{length} (initially .5cm)} + This sets the distance between the start and the vertical line to \meta{length}. + \end{key} +\end{pathoperation} + +All distances can be set with on key. +\begin{key}{/tikz/udlr/distance=\meta{length}} + Sets all distances in the |/tikz/udlr| namespace. +\end{key} + +\begin{key}{/tikz/udlr/from center=\opt{\meta{true or false}} (initially false, default true)} + This is an alias for |/tikz/hvvh/from center|. +\end{key} + +\subsection{Even more Horizontal and Vertical Lines} + +The following keys can be used to access vertical and horizontal line path operations. +\begin{stylekey}{/tikz/horizontal vertical} + This installs \verb!to path = -| (\tikztotarget) \tikztonodes! that can be used with\indexKeyO{to path} + the path operations |to| or |edge|. +\end{stylekey} +\begin{stylekey}{/tikz/vertical horizontal} + This installs \verb!to path = |- (\tikztotarget) \tikztonodes! that can be used with + the path operations |to| or |edge|. +\end{stylekey} +\begin{stylekey}{/tikz/horizontal vertical horizontal} + This installs \verb!to path = -|- (\tikztotarget) \tikztonodes! that can be used with + the path operations |to| or |edge|. +\end{stylekey} +\begin{stylekey}{/tikz/vertical horizontal vertical} + This installs \verb!to path = |-| (\tikztotarget) \tikztonodes! that can be used with + the path operations |to| or |edge|. +\end{stylekey} + +When connecting rectangular nodes, these keys could be useful as well. +They all need to be given to a |to| or |edge| path operation. +\begin{stylekey}{/tikz/only vertical second=\opt{\meta{length}} (default 0pt)} +This draws a vertical line from the start point to the target point so that +it connects to the target point in the center (or at its border in case it is a node). + +The optional \meta{length} can be used to shift the line orthogonally to its direction. +\end{stylekey} +\begin{stylekey}{/tikz/only horizontal second=\opt{\meta{length}} (default 0pt)} +This draws a horizontal line from the start point to the target point so that +it connects to the target point in the center (or at its border in case it is a node). + +The optional \meta{length} can be used to shift the line orthogonally to its direction. +\end{stylekey} +\begin{stylekey}{/tikz/only vertical first=\opt{\meta{length}} (default 0pt)} +This draws a vertical line from the start point to the target point so that +it connects to the start point in the center (or at its border in case it is a node). + +The optional \meta{length} can be used to shift the line orthogonally to its direction. +\end{stylekey} +\begin{stylekey}{/tikz/only horizontal first=\opt{\meta{length}} (default 0pt)} +This draws a horizontal line from the start point to the target point so that +it connects to the start point in the center (or at its border in case it is a node). + +The optional \meta{length} can be used to shift the line orthogonally to its direction. +\end{stylekey} diff --git a/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.timer.tex b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.timer.tex new file mode 100644 index 00000000000..09049bf8297 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-paths.timer.tex @@ -0,0 +1,90 @@ +% !TeX root = tikz-ext-manual.tex +% !TeX spellcheck = en_US +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\section{Extending the Path Timers} +\label{library:timer} + +\begin{tikzlibrary}{ext.paths.timer} + This library adds timers to the path specifications |rectangle|, |parabola|, |sin| and |cos|. +\end{tikzlibrary} + +In \tikzname, the path specification |rectangle|, |parabola|, |sin| and |cos| do not provide +their own timer, i.\,e. a node placing algorithm that is dependent on the actual path. +For |rectangle| the timer of the straight line between the rectangle's corners is used, for +the other paths, nodes, coordinates, pics, etc. are placed on the last coordinate. + +This library allows this. + +\subsection{Rectangle} +\indexPathOperationO{rectangle} + +For the |rectangle| path operator, the timer starts with |pos = 0| (= |at start|) from\indexKeyO{pos} +the starting coordinate in a counter-clockwise direction along the rectangle. +The corners will be at positions 0.0, 0.25, 0.5, 0.75 and 1.0. + +\begin{codeexample}[width=10cm,preamble=\usetikzlibrary{ext.paths.timer}] +\begin{tikzpicture}[scale=2, every pin edge/.style={latex-, gray}] +\coordinate [label=above right:Target] (A) at (0,0); +\coordinate [label=below left:Start] (B) at (1,2); +\draw[->, help lines] ([shift=(50:.3 and .75)] .5,1) + arc[start angle=50, delta angle=340, x radius=.3, y radius=.75]; +\draw (B) rectangle (A) + foreach \pos/\ang in {at start/60, very near start/90, near start/180, pos=.375/180, + midway/180, pos=.625/270, near end/0, very near end/0, at end/0}{ + node[pin=\ang:\pos, style/.expanded=\pos]{}}; +\end{tikzpicture} +\end{codeexample} + +\subsection{Parabola} +\indexPathOperationO{parabola}% + +For the |parabola| path operator the timer is similar to the |.. controls ..| operator. + +The position 0.5 will lie at the |bend|. +\begin{codeexample}[width=.3\linewidth,preamble=\usetikzlibrary{ext.paths.timer}] +\begin{tikzpicture} +\draw[help lines] (-2.25, -1.25) grid (2.25, 3.25); +\draw ( 2,-1) parabola bend (0,0) (-1,3); +\draw[ultra thick] (-2,-1) parabola bend (0,0) ( 1,3) + foreach \pos in {1,...,4,6,7,...,9}{ + node[ + pos=.\pos, sloped, fill=white, font=\small, inner sep=+0pt + ] {\pos} + }; +\end{tikzpicture} +\end{codeexample} + +If no |bend| is specified half the positions will collapse into one end of the curve. + +\begin{codeexample}[width=.3\linewidth,preamble=\usetikzlibrary{ext.paths.timer}] +\begin{tikzpicture}[every pin edge/.style={latex-, shorten <=1pt, gray}] +\draw (-2,-2) parabola (1,0) + foreach \pos in {0, 1, ..., 10} { + node [pos=\pos/10, pin={[anchor=-18*\pos+90]-18*\pos+270:\pos}]{} + }; +\end{tikzpicture} +\end{codeexample} + +\subsection{Sine/Cosine} +\indexPathOperationO{sin}\indexPathOperationO{cos}% + +The |sin| and |cos| path operators also allow placing of nodes along their paths. + +\begin{codeexample}[width=.3\linewidth,preamble=\usetikzlibrary{ext.paths.timer}] +\begin{tikzpicture}[mark nodes on line/.style={insert path={ + foreach \pos in {1, ..., 9} {node[ + sloped, fill=white, font=\small, inner sep=+0pt, pos=\pos/10] {\pos}}}}] +\draw[help lines] (-2.1,-2.1) grid (2.1,0.1); +\draw (-2,-2) sin (1,0) [mark nodes on line]; +\draw[shift=(0:1)](-2,-2) cos (1,0) [mark nodes on line]; +\end{tikzpicture} +\end{codeexample} + +\endinput diff --git a/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-patterns.images.tex b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-patterns.images.tex new file mode 100644 index 00000000000..10fa3aca6d0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-patterns.images.tex @@ -0,0 +1,50 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\clearpage +\section{Using Images as a Pattern} +\label{library:patterns.images} + +\begin{tikzlibrary}{ext.patterns.images} + This library allows to use an image to be used as a repeating pattern for a path. +\end{tikzlibrary} + +With this library arbitrary images (or indeed PDF documents) can be used as +a repeating pattern for the background of a path. + +This is a two-step process: +\begin{enumerate} +\item Declaring an image as an ``image-pattern''. +\item Using the ``image-pattern''. +\end{enumerate} + +\begin{command}{\pgfsetupimageaspattern\oarg{options}\marg{name}\marg{image}} +\end{command} + +\begin{key}{/tikz/image as pattern=\meta{options} (default |\{\}|)} + +\begin{codeexample}[preamble=\usetikzlibrary{ext.patterns.images}] +\pgfsetupimageaspattern[width=.5cm]{grid}{example-image-1x1} +\tikz \node[star, minimum size=3cm, draw, + image as pattern={name=grid,options={left, bottom, y=-.5cm, rotate=45}}] {}; +\end{codeexample} +\end{key} + +\begin{key}{/tikz/image as pattern/name=\meta{name}} +Specifies the name of the ``image-pattern'' to be used. +\end{key} + +\begin{stylekey}{/tikz/image as pattern/option} +Options that's be used by the internal |\pgftext|,\indexCommandO{\pgftext} +only keys from |/pgf/text| should be used.\indexKeyO[/pgf/]{text} +\end{stylekey} + +\begin{stylekey}{/tikz/image as pattern/options=\meta{style}} +Appends style |/tikz/image as pattern/option|. +\end{stylekey} \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-positioning-plus.tex b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-positioning-plus.tex new file mode 100644 index 00000000000..a0451a8fd7c --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-positioning-plus.tex @@ -0,0 +1,183 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\clearpage +\section{Positioning Plus} +\label{library:positioning-plus} +\tikzsetnextfilename{posplus} +\begin{tikzlibrary}{ext.positioning-plus} + With the help of the |positioning|\indexLibrary{positioning} and the |fit|\indexLibrary{fit} library this extends the placement of nodes. +\end{tikzlibrary} + +\subsection{Useful corner anchors} +The anchors |corner north east|, |corner north west|, |corner south west| and |corner south east| +are defined as ``generic anchors'', i.\,e. they are defined for all shapes. +This is mostly useful for the placement of circular shapes. +\begin{stylekey}{/tikz/corner above left=\opt{\meta{specification}} (default 0pt)} + Similar as \referenceKeyandIndexO{above left} of the \tikzname\space library |positioning| + but uses the |corner north west| anchor. +\end{stylekey} +\begin{stylekey}{/tikz/corner below left=\opt{\meta{specification}} (default 0pt)} + Similar as \referenceKeyandIndexO{below left} of the \tikzname\space library |positioning| + but uses the |corner south west| anchor. +\end{stylekey} +\begin{stylekey}{/tikz/corner above right=\opt{\meta{specification}} (default 0pt)} + Similar as \referenceKeyandIndexO{above right} of the \tikzname\space library |positioning| + but uses the |corner north east| anchor. +\end{stylekey} +\begin{stylekey}{/tikz/corner below right=\opt{\meta{specification}} (default 0pt)} + Similar as \referenceKeyandIndexO{below right} of the \tikzname\space library |positioning| + but uses the |corner south east| anchor. +\end{stylekey} + +\begin{codeexample}[width=.6\linewidth,preamble=\usetikzlibrary{ext.positioning-plus}] +\Huge +\begin{tikzpicture} +\node[name=s,shape=circle,shape example] + {Circle\vrule width 1pt height 2cm}; +\foreach \anchor/\placement in { + north west/above left, north/above, north east/above right, + west/left, center/above, east/right, + mid west/right, mid/above, mid east/left, + base west/left, base/below, base east/right, + south west/below left, south/below, south east/below right, + text/left, 10/right, 130/above} + \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} + node[\placement] {\scriptsize\texttt{(s.\anchor)}}; +\draw (s.corner north west) rectangle (s.corner south east); +\foreach \anchor/\placement in { + corner north west/above left, corner north east/above right, + corner south west/below left, corner south east/below right} + \draw[red,shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} + node[\placement] {\scriptsize\texttt{(s.\anchor)}}; +\end{tikzpicture} +\end{codeexample} + +\subsection{Useful placement keys for vertical and horizontal alignment} +\begin{stylekey}{/tikz/north left=\opt{\meta{specification}} (default 0pt)} + Like \referenceKeyandIndexO{left} but aligns the nodes at their |north| border. + + This is basically the same as |left=of reference.north west, anchor=north east|. + % +\begin{codeexample}[preamble=\usetikzlibrary{ext.positioning-plus}] +\begin{tikzpicture}[nodes=draw] +\node[minimum height=2cm] (a) {}; +\node[minimum height=3cm, north right=of a] {}; +\end{tikzpicture} +\end{codeexample} +\end{stylekey} +\begin{stylekey}{/tikz/north right=\opt{\meta{specification}} (default 0pt)} + Like \referenceKeyandIndexO{right} but aligns the nodes at their |north| border. + + This is basically the same as |left=of reference.north east, anchor=north west|. +\end{stylekey} +\begin{stylekey}{/tikz/south left=\opt{\meta{specification}} (default 0pt)} + Like \referenceKeyandIndexO{left} but aligns the nodes at their |south| border. + + This is basically the same as |left=of reference.south west, anchor=south east|. +\end{stylekey} +\begin{stylekey}{/tikz/south right=\opt{\meta{specification}} (default 0pt)} + Like \referenceKeyandIndexO{right} but aligns the nodes at their |south| border. + + This is basically the same as |left=of reference.south east, anchor=south west|. +\end{stylekey} +\begin{stylekey}{/tikz/west above=\opt{\meta{specification}} (default 0pt)} + Like \referenceKeyandIndexO{above} but aligns the nodes at their |west| border. + + This is basically the same as |left=of reference.north west, anchor=south west|. +\end{stylekey} +\begin{stylekey}{/tikz/west below=\opt{\meta{specification}} (default 0pt)} + Like \referenceKeyandIndexO{below} but aligns the nodes at their |west| border. + + This is basically the same as |left=of reference.south west, anchor=north west|. +\end{stylekey} +\begin{stylekey}{/tikz/east above=\opt{\meta{specification}} (default 0pt)} + Like \referenceKeyandIndexO{above} but aligns the nodes at their |east| border. + + This is basically the same as |left=of reference.north east, anchor=south east|. +\end{stylekey} +\begin{stylekey}{/tikz/east below=\opt{\meta{specification}} (default 0pt)} + Like \referenceKeyandIndexO{below} but aligns the nodes at their |east| border. + + This is basically the same as |left=of reference.south east, anchor=north east|. +\end{stylekey} + +The same exist for the recently introduces corner anchors, too. +\begin{stylekey}{/tikz/corner north left=\opt{\meta{specification}} (default 0pt)} + The same as |/tikz/north left| but uses the new corner anchors. +\end{stylekey} +\begin{stylekey}{/tikz/corner north right=\opt{\meta{specification}} (default 0pt)} + The same as |/tikz/north right| but uses the new corner anchors. +\end{stylekey} +\begin{stylekey}{/tikz/corner south left=\opt{\meta{specification}} (default 0pt)} + The same as |/tikz/south left| but uses the new corner anchors. +\end{stylekey} +\begin{stylekey}{/tikz/corner south right=\opt{\meta{specification}} (default 0pt)} + The same as |/tikz/south right| but uses the new corner anchors. +\end{stylekey} +\begin{stylekey}{/tikz/corner west above=\opt{\meta{specification}} (default 0pt)} + The same as |/tikz/west above| but uses the new corner anchors. +\end{stylekey} +\begin{stylekey}{/tikz/corner west below=\opt{\meta{specification}} (default 0pt)} + The same as |/tikz/west below| but uses the new corner anchors. +\end{stylekey} +\begin{stylekey}{/tikz/corner east above=\opt{\meta{specification}} (default 0pt)} + The same as |/tikz/east above| but uses the new corner anchors. +\end{stylekey} +\begin{stylekey}{/tikz/corner east below=\opt{\meta{specification}} (default 0pt)} + The same as |/tikz/east below| but uses the new corner anchors. +\end{stylekey} + +While the \meta{specification} of all these keys still accept the same form as with \tikzname, +the |ext.positioning-plus| library extends this even more. + +The specification after |of| can contain a list of coordinates +(like the |fit| key of the |fit| library). +This means that the new node will be placed in relation to a rectangular bounding box +that fits around all this nodes in the list. + +If this list is prefixed with \verb!|!, |-| or |+|, +the new node will also have the same height (\verb!|!), +the same width (|-|) or both as this bounding box. + +\begin{codeexample}[preamble=\usetikzlibrary{ext.positioning-plus}] +\begin{tikzpicture}[nodes=draw] +\node (A) {A}; +\node[below=of A] (BCD) {BCD}; +\node[right=of |(A)(BCD)] (c) {}; +\node[below=.5:of -(A)(BCD)] (d) {}; +\draw[help lines] (BCD.south west) -- (c.south east) + (BCD.north east) -- (d.south east); +\end{tikzpicture} +\end{codeexample} + +This functionality is also available without the placement: +\begin{stylekey}{/tikz/fit bounding box=\meta{list of coordinates}} + Creates a rectangular node with the name |fit bounding box| that encompasses + the \meta{list of coordinates}. +\end{stylekey} +\begin{stylekey}{/tikz/span vertical=\meta{list of coordinates}} + Creates a rectangular node with the name |fit bounding box| that encompasses + the \meta{list of coordinates} \emph{and} sets the \referenceKeyandIndexO[/pgf]{minimum height} to + the height of this bounding box. +\end{stylekey} +\begin{stylekey}{/tikz/span horizontal=\meta{list of coordinates}} + Creates a rectangular node with the name |fit bounding box| that encompasses + the \meta{list of coordinates} \emph{and} sets the \referenceKeyandIndexO[/pgf]{minimum width} to + the width of this bounding box. +\end{stylekey} +\begin{stylekey}{/tikz/span=\meta{list of coordinates}} + Is a combination of |/tikz/span vertical| and |/tikz/span horizontal|. +\end{stylekey} + +As you maybe noticed in the example above, the \meta{specification} also allows a prefix +delimited by |:| which the |node distance| will be multiplied to with for the placement.% +\footnote{This is probably more useful when \referenceKeyandIndexO{on grid} is used.} + +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-topaths.arcthrough.tex b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-topaths.arcthrough.tex new file mode 100644 index 00000000000..1d9e5ba9df6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-topaths.arcthrough.tex @@ -0,0 +1,63 @@ +% !TeX root = tikz-ext-manual.tex +% !TeX spellcheck = en_US +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\section{Arcs through Three Points} +\label{library:topaths.arcthrough} +\begin{tikzlibrary}{ext.topaths.arcthrough} + This library allows to use an arc defined by three points. +\end{tikzlibrary} + +\begin{codeexample}[width=10cm,preamble=\usetikzlibrary{ext.topaths.arcthrough}] +\begin{tikzpicture} +\coordinate[label=above right:$A$] (A) at ( 3, 1); +\coordinate[label=above:$B$] (B) at ( 1, 2); +\coordinate[label=below left:$C$] (C) at (-2,-2); + +\draw[ultra thick, draw=green, fill=green!50] + (B) to[arc through={clockwise,(A)}] (C) + -- (arc through center) -- cycle; +\draw[ultra thick, draw=blue, fill=blue!50] + (B) to[arc through=(A)] (C) + -- (arc through center) -- cycle; + +\foreach \p in {A,B,C, arc through center} \fill[red] (\p) circle[radius=2pt]; +\end{tikzpicture} +\end{codeexample} + +This can only by used for circles in the |canvas| coordinate system. + +\begin{multicols}{2} +\begin{key}{/tikz/arc through/through=\meta{coordinate} (initially {(0,0)})} + The coordinate on the circle that defines~-- together with the + starting and target point~-- a circle. +\end{key} + +\begin{key}{/tikz/arc through/center suffix=\meta{suffix} (initially {})} + The |arc through| will define a coordinate named |arc through center|\meta{suffix} + so that it can be referenced later. +\end{key} + +\begin{key}{/tikz/arc through/clockwise} + The resulting arc will go clockwise from the starting point to the target point. + This will not necessarily go through the |through| point. +\end{key} + +\begin{key}{/tikz/arc through/counter clockwise} + The resulting arc will go counter clockwise from the starting point to the target point. + This will not necessarily go through the |through| point. +\end{key} + +\begin{key}{/tikz/arc through=\meta{key-value}} + This key should be used with |to|\indexPathOperationO{to} or |edge|\indexPathOperationO{edge}. + A parameter other than |center suffix|, |clockwise| or |counter clockwise| will + be assumed to be the |through| coordinate. +\end{key} +\end{multicols} +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-trans.tex b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-trans.tex new file mode 100644 index 00000000000..b2aa0f8f7f1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-library-trans.tex @@ -0,0 +1,136 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\clearpage +\section{Mirror, Mirror on the Wall} +\label{library:mirror} + +\begin{tikzlibrary}{ext.transformations.mirror} + This library adds more transformations to \tikzname. +\end{tikzlibrary} + +As explained in section~\ref{pgflibrary:transformations}, there are two approaches to setting a mirror transformation. +As with the commands in PGF, we'll be using a lowercase |m| for the reflection matrix and an uppercase |M| for the built-in approach. + +\subsection{Using the reflection matrix} + +\begin{codeexample}[width=.4\linewidth,preamble=\usetikzlibrary{shapes.geometric,ext.transformations.mirror}] +\begin{tikzpicture}[line join=round, thick, reg poly/.style={ + shape=regular polygon, regular polygon sides={#1}}] +\node[reg poly=5, minimum size=+2cm, draw, very thick] (a) {}; +\foreach \i[evaluate={\col=(\i-1)/.04}] in {1,...,5} + \node [mirror=(a.corner \i)--(a.side \i), transform shape, + reg poly=5, minimum size=+2cm, draw=red!\col!blue] {}; +\end{tikzpicture} +\end{codeexample} + +\begin{key}{/tikz/xmirror=\meta{value or coordinate}} + Sets up a transformation that mirrors along a horizontal line that goes through point $(\text{\meta{value}}, 0)$ or \meta{coordinate}. + +\begin{codeexample}[preamble=\usetikzlibrary{ext.transformations.mirror}] +\begin{tikzpicture} +\draw[help lines] (-0.25, -.25) grid (3.25, 1.25); +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); + +\draw[dashed] (1.5, -.25) coordinate (m) -- (1.5, 1.25); +\draw[xmirror=(m),-latex] (0,0) .. controls (.5,1) .. (1,1); +\end{tikzpicture} +\end{codeexample} +\end{key} + +\begin{key}{/tikz/ymirror=\meta{value or coordinate}} + Sets up a transformation that mirrors along a vertical line that goes through point $(0, \text{\meta{value}})$ or \meta{coordinate}. +\end{key} + + +\begin{key}{/tikz/mirror x=\meta{coordinate}} + Similar to |/tikz/xmirror|, this however uses the |xyz| coordinate system instead of the |canvas| system. +\begin{codeexample}[preamble=\usetikzlibrary{ext.transformations.mirror}] +\begin{tikzpicture}[x=.5cm, y=(45:1cm)] + +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); + +\draw[dashed] (1.5, -.25) coordinate (m) -- (1.5, 1.25); + +\draw[ xmirror=(m), -latex, red, dotted] (0,0) .. controls (.5,1) .. (1,1); +\draw[mirror x=(m), -latex] (0,0) .. controls (.5,1) .. (1,1); +\end{tikzpicture} +\end{codeexample} +\end{key} + +\begin{key}{/tikz/mirror y=\meta{coordinate}} + Similar to |/tikz/ymirror|, this however uses the |xyz| coordinate system instead of the |canvas| system. +\end{key} + + +\begin{key}{/tikz/mirror=\meta{point A}|--|\meta{point B}} + Sets up a transformation that mirrors along a line that goes through \meta{point A} and \meta{point B}. + + When only \meta{point A} is given that line goes through \meta{point A} and the origin. +\end{key} + +\subsection{Using built-in transformations} + +\begin{codeexample}[width=.4\linewidth,preamble=\usetikzlibrary{shapes.geometric,ext.transformations.mirror}] +\begin{tikzpicture}[line join=round, thick, reg poly/.style={ + shape=regular polygon, regular polygon sides={#1}}] +\node[reg poly=5, minimum size=+2cm, draw, very thick] (a) {}; +\foreach \i[evaluate={\col=(\i-1)/.04}] in {1,...,5} + \node [Mirror=(a.corner \i)--(a.side \i), transform shape, + reg poly=5, minimum size=+2cm, draw=red!\col!blue] {}; +\end{tikzpicture} +\end{codeexample} + +\begin{key}{/tikz/xMirror=\meta{value or coordinate}} + Sets up a transformation that mirrors along a horizontal line that goes through point $(\text{\meta{value}}, 0)$ or \meta{coordinate}. + +\begin{codeexample}[preamble=\usetikzlibrary{ext.transformations.mirror}] +\begin{tikzpicture} +\draw[help lines] (-0.25, -.25) grid (3.25, 1.25); +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); + +\draw[dashed] (1.5, -.25) coordinate (m) -- (1.5, 1.25); +\draw[xMirror=(m),-latex] (0,0) .. controls (.5,1) .. (1,1); +\end{tikzpicture} +\end{codeexample} +\end{key} + +\begin{key}{/tikz/yMirror=\meta{value or coordinate}} + Sets up a transformation that mirrors along a vertical line that goes through point $(0, \text{\meta{value}})$ or \meta{coordinate}. +\end{key} + + +\begin{key}{/tikz/Mirror x=\meta{coordinate}} + Similar to |/tikz/xMirror|, this however uses the |xyz| coordinate system instead of the |canvas| system. +\begin{codeexample}[preamble=\usetikzlibrary{ext.transformations.mirror}] +\begin{tikzpicture}[x=.5cm, y=(45:1cm)] + +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); + +\draw[dashed] (1.5, -.25) coordinate (m) -- (1.5, 1.25); + +\draw[ xMirror=(m), -latex, red, dotted] (0,0) .. controls (.5,1) .. (1,1); +\draw[Mirror x=(m), -latex] (0,0) .. controls (.5,1) .. (1,1); +\end{tikzpicture} +\end{codeexample} +\end{key} + +\begin{key}{/tikz/Mirror y=\meta{coordinate}} + Similar to |/tikz/yMirror|, this however uses the |xyz| coordinate system instead of the |canvas| system. +\end{key} + + +\begin{key}{/tikz/Mirror=\meta{point A}\opt{|--|\meta{point B}}} + Sets up a transformation that mirrors along a line that goes through \meta{point A} and \meta{point B}. + + When only \meta{point A} is given that line goes through \meta{point A} and the origin. +\end{key} + +\endinput diff --git a/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-main-body.tex b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-main-body.tex new file mode 100644 index 00000000000..e4445d392b4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-main-body.tex @@ -0,0 +1,192 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\newcommand*\tikzextname{Ti\textit kZ-Extensions} +\newcommand*\tikzextversion{0.2} + +%\includeonly{ +% tikz-ext-manual-en-library-paths.arcto, +% tikz-ext-manual-en-library-paths.ortho, +% tikz-ext-manual-en-library-paths.timer, +% tikz-ext-manual-en-library-patterns.images, +% tikz-ext-manual-en-library-topaths.arcthrough, +% tikz-ext-manual-en-library-trans, +% tikz-ext-manual-en-pgf-trans, +% tikz-ext-manual-en-library-misc, +%} +\begin{document} + +\title{\bfseries The \tikzextname\space Package\\ + \large Manual for version \tikzextversion\\[1mm] +\large\href{https://github.com/Qrrbrbirlbel/tikz-extensions}{\texttt{https://github.com/Qrrbrbirlbel/tikz-extensions}} +\author{Qrrbrbirlbel}} + +\maketitle +\label{table-of-contents} + +\tableofcontents + + +\include{tikz-ext-manual-en-intro} + +\part{\tikzname\space Libraries} +\label{part:tikz} + +These libraries only work with \tikzname. +\vspace{1em} +\begin{center}\tikzsetnextfilename{main-cover} +\begin{tikzpicture}[ + very thick, + scale=2.7, + grow cyclic, + level distance=1cm, + level/.style={ + level distance/.expanded=\ifnum#1>1 \tikzleveldistance/1.5\else\tikzleveldistance\fi, + nodes/.expanded={\ifodd#1 fill\else fill=none\fi} + }, + level 1/.style={sibling angle=120}, + level 2/.style={sibling angle=90}, + level 3/.style={sibling angle=90}, + level 4/.style={sibling angle=45}, + nodes={circle,draw,inner sep=+0pt, minimum size=+5pt}, + ] +\path[rotate=30] + node {} + child foreach \cntI in {1,...,3} { + node {} + child foreach \cntII in {1,...,2} { + node {} + child foreach \cntIII in {1,...,2} { + node {} + child foreach \cntIV in {1,...,2} { + node {} + child foreach \cntV in {1,...,2} {} + } + } + } + }; +\end{tikzpicture} +\end{center} + +\tikzsetfigurename{calendar-plus} \include{tikz-ext-manual-en-library-calendar-plus} +\tikzsetfigurename{node-families} \include{tikz-ext-manual-en-library-node-families} +\tikzsetfigurename{paths.arcto} \include{tikz-ext-manual-en-library-paths.arcto} +\tikzsetfigurename{paths.ortho} \include{tikz-ext-manual-en-library-paths.ortho} +\tikzsetfigurename{paths.timer} \include{tikz-ext-manual-en-library-paths.timer} +\tikzsetfigurename{patterns.images} \include{tikz-ext-manual-en-library-patterns.images} +\tikzsetfigurename{positioning-plus}\include{tikz-ext-manual-en-library-positioning-plus} +\tikzsetfigurename{topaths.arcthrough}\include{tikz-ext-manual-en-library-topaths.arcthrough} +\tikzsetfigurename{trans} \include{tikz-ext-manual-en-library-trans} + +\part{PGF Libraries} +\label{part:pgf} +These libraries (should) work with both PGF and \tikzname. + +\begin{center}\tikzsetnextfilename{main-graph} +\begin{codeexample}[width=10cm,preamble=\usetikzlibrary{graphs,graphdrawing,ext.misc} \usegdlibrary{force}] +\tikzset{ + mynode/.style={ + circle, minimum size=10mm, draw, densely dashdotted, thick, + decide color/.expand once=#1}, + decide color/.style 2 args={ + /utils/TeX/if=c#1 + {/utils/TeX/ifnum={#2<5}{bluelight}{bluedark}} + {/utils/TeX/ifnum={#2<8}{light}{dark}}}, + light/.style={fill=gray!20}, bluelight/.style={fill=blue!10}, + dark/.style ={fill=gray!60}, bluedark/.style ={fill=blue!30}} +\tikz\graph[ + spring electrical layout, vertical=c2 to p13, + node distance=1.5cm, typeset=$n_{\tikzgraphnodetext}$, + nodes={mynode=\tikzgraphnodetext}] { + % outer ring + c2 -- {p1, p11, p6}; + p1 -- {p8, c6, p11}; + p8 -- {p3, p10, c6}; + p3 -- {p13, p15, p10}; + p13 -- {p15, c7}; + c7 -- {c3, c4, p15}; + c3 -- {p14, c4}; + p14 -- {p7, c4}; + p7 -- {p9, p2, c4}; + p9 -- {c5, p12, p2}; + c5 -- {c1, p4, p12}; + c1 -- {p6, p4}; + p6 -- {p11, p4}; + % inner ring + p11 -- {c6, p12, p4}; + p5 -- {c6 -- {p10, p12}, p10 -- p15, p15 -- c4, c4 -- p2, p2 -- p12, p12 -- p4}; +}; +\end{codeexample} +\end{center} + +\tikzsetfigurename{PGF.trans}\include{tikz-ext-manual-en-pgf-trans} + +\part{Utilities} + +\label{part:misc} +\vfill\tikzsetnextfilename{main-misc} +\begin{codeexample}[width=6cm, preamble=\usetikzlibrary{ext.misc}] +\begin{tikzpicture}[ + declare function={bigR(\n)=smallR+.05*\n;}, + declare constant={smallR=1; segments=20;}, + full arc=segments] +\foreach \iN[evaluate={\endRadius=bigR(\iN+1);}, use int=0 to segments-1] + \filldraw[fill=gray!50] (\iN R:\endRadius) + arc [radius=\endRadius, start angle=\iN R, delta angle=+1R] -- (\iN R+1R:smallR) + arc [radius=smallR, end angle=\iN R, delta angle=-1R] -- cycle; + +\node {$\phi^2$}; +\node at (north west:{sqrt 2 * bigR(segments/2)}) {$\{\Omega\}_{i=1}^n$}; +\node[rotate=-.5R, right] at (-.5R: bigR segments) {$\partial \varphi$}; + +\tikzset{yshift=-5cm, declare constant={segments=25;}, full arc=segments} +\filldraw[fill=gray!50] (right:smallR) + \foreach \iN[evaluate={\endRadius=bigR(\iN+1);}, use int=0 to segments-1] { + -- (\iN R:\endRadius) arc[radius=\endRadius, start angle=\iN R, delta angle=1R]} + -- (right:smallR) arc[radius=smallR, start angle=0, delta angle=-360]; + +\node {$\phi^2$}; +\node at (north west:{sqrt 2 * bigR(segments/2)}) {$\{\Omega\}_{i=1}^n$}; +\node[rotate=-.5R, right] at (-.5R: bigR segments) {$\partial \varphi$}; +\end{tikzpicture} +\end{codeexample} +\vfill + +\tikzsetfigurename{misc.calendar}\include{tikz-ext-manual-en-calendar} +\tikzsetfigurename{misc.misc}\include{tikz-ext-manual-en-library-misc} + +%%% END +\newcommand*{\addTikz}[1]{Added \tikzname\space library \texttt{ext.#1}.} +\newcommand*{\addPGF}[1]{Added PGF library \texttt{ext.#1}.} +\part{Changelog \& Index} +\section*{Changelog} +\begin{multicols}{2} +Version 0.2 +\begin{itemize} +\item \addTikz{positioning-plus} +\item \addTikz{node-families} +\end{itemize} + +Version 0.1 +\begin{itemize} +\item \addTikz{calendar-plus} +\item \addTikz{misc} +\item \addTikz{paths.arcto} +\item \addTikz{paths.ortho} +\item \addTikz{paths.timer} +\item \addTikz{patterns.images} +\item \addTikz{topaths.arcthrough} +\item \addTikz{transformations.mirror} +\item \addPGF{transformations.mirror} +\end{itemize} +\end{multicols} +\printindex + +%\typeout{Examples: \the\codeexamplecount}% +\end{document} \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-main-preamble.tex b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-main-preamble.tex new file mode 100644 index 00000000000..238c10172f9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-main-preamble.tex @@ -0,0 +1,368 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\usepackage[version=latest]{pgf} + +\usepackage{xkeyval,calc,listings,tikz,fp} + +\usepackage{imakeidx} +\makeindex +\usepackage{hyperref} +\hypersetup{% + colorlinks=false, % use true to enable colors below: + linkcolor=blue,%red, + filecolor=blue,%magenta, + urlcolor=blue,%cyan, + citecolor=blue, + pdfborder=0 0 0, +} + +\usepackage[a4paper,left=2.25cm,right=2.25cm,top=2.5cm,bottom=2.5cm,nohead,columnsep=1cm]{geometry} +\usepackage{amsmath,amssymb} +\usepackage{xxcolor} +\usepackage{pifont} + +\usepackage[T1]{fontenc} +% Promote `Missing character` reports to full errors +% require texlive 2021 or above +\tracinglostchars=3 + +\input{pgfmanual-en-macros} + +\usepackage{unicode-math} +\setmathfont[Scale=MatchUppercase]{libertinusmath-regular.otf} +\usepackage[ttscale=.85]{libertine} +\setmonofont[Scale=0.8]{Bitstream Vera Sans Mono} + +\makeatletter +\renewcommand*\l@section[2]{% + \ifnum \c@tocdepth >\z@ + \addpenalty\@secpenalty + \addvspace{1.0em \@plus\p@}% + \setlength\@tempdima{2.5em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \bfseries + \advance\leftskip\@tempdima + \hskip -\leftskip + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par + \endgroup + \fi} +\renewcommand*\l@subsection{\@dottedtocline{2}{2.5em}{3.3em}} +\renewcommand*\l@subsubsection{\@dottedtocline{3}{5.8em}{4.2em}} +\def\@pnumwidth{2.2em} +\makeatother + +% Global styles: +\tikzset{ + every plot/.style={prefix=plots/pgf-}, + shape example/.style={ + color=black!30, + draw, + fill=yellow!30, + line width=.5cm, + inner xsep=2.5cm, + inner ysep=0.5cm} +} + +% Detect changed labels +% by David Carlisle https://tex.stackexchange.com/a/169245 +\makeatletter +\def\@testdef#1#2#3{% + \def\reserved@a{#3}% + \expandafter\ifx\csname #1@#2\endcsname\reserved@a\else + \typeout{^^JLabel `#2' changed:^^J\meaning\reserved@a^^J\expandafter\meaning\csname #1@#2\endcsname^^J}% + \@tempswatrue + \fi} +\makeatother + +\usetikzlibrary{ + ext.calendar-plus, + ext.misc, + ext.node-families, + ext.paths.arcto, + ext.paths.ortho, + ext.paths.timer, + ext.patterns.images, + ext.positioning-plus, + ext.topaths.arcthrough, + ext.transformations.mirror, + % + calc, + fit, + shapes.geometric, + through, + trees, +} + +%% needs Lua! +\usetikzlibrary{graphs,graphdrawing} +\usegdlibrary{force} + +\makeatletter +\def\endofcodeexample#1{% original from tex/latex/pgf/doc/pgfmanual-en-macros.tex by Till Tantau et al + \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@hidden\else + \ifcode@execute% + \setbox\codeexamplebox=\hbox{% + \ifx\code@render\pgfutil@empty% + {% + {% + \returntospace% + \commenthandler% + \xdef\code@temp{#1}% removes returns and comments + }% + \catcode`\^^M=9% + \colorbox{graphicbackground}{\color{black}\ignorespaces% + \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{}% + \def\code@mid{\parskip2pt\par\noindent}% + \def\code@width{\linewidth-6pt}% + \def\code@end{}% + \else% + \def\code@start{% +% \linewidth=\textwidth% removed this line + \parshape \@ne 0pt \linewidth + \leavevmode% + \hbox\bgroup}% + \def\code@flushstart{\hfill}% + \def\code@flushend{\hbox{}}% + \def\code@mid{\hskip6pt}% + \def\code@width{\linewidth-12pt-\codeexamplewidth}% + \def\code@end{\egroup}% + \fi% + \code@start% + \noindent% + \begin{minipage}[t]{\codeexamplewidth}\raggedright + \hrule width0pt% + \footnotesize\vskip-1em% + \code@flushstart\box\codeexamplebox\code@flushend% + \vskip0pt% + \leavevmode% + \box\codeexampleboxanim% + \vskip-1ex + \leavevmode% + \end{minipage}% + \else% + \def\code@mid{\par} + \def\code@width{\linewidth-6pt} + \def\code@end{} + \fi% + \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 + \fi + \endcodeexample\endgroup% +} + +\newenvironment{pathoperation'}[3][]{ + \begin{pgfmanualentry} + \def\pgfmanualtest{#1}% + \pgfmanualentryheadline{% + \ifx\pgfmanualtest\@empty% + \pgfmanualpdflabel{#2}{}% + \fi% + %\textcolor{gray}{{\ttfamily\char`\\path}\ \ \dots} + %\declare{\texttt{\noligs{#2}}}#3\ \textcolor{gray}{\dots\texttt{;}} + }% + \ifx\pgfmanualtest\@empty% + \index{#2@\protect\texttt{#2} path operation}% + \index{Path operations!#2@\protect\texttt{#2}}% + \fi% + \pgfmanualbody +} +{ + \end{pgfmanualentry} +} +\makeatother + +\usepackage{paracol} + +%% normal references +\newcommand*{\indexLibrary}[1]{% + \index{#1@\protect\texttt{#1} library}% + \index{Libraries!#1@\protect\texttt{#1}}% +} +\newcommand*{\indexMathFunction}[1]{% + \index{#1@\protect\texttt{#1} math function}% + \index{Math functions!#1@\protect\texttt{#1}}% +} +\newcommand*{\indexShape}[1]{% + \index{#1@\protect\texttt{#1} shape}% + \index{Shapes!#1@\protect\texttt{#1}}% +} +\newcommand*{\indexHandler}[1]{% + \index{\gobble#1@\protect\texttt{#1} handler}% + \index{Key handlers!#1@\protect\texttt{#1}} +} +\newcommand*{\indexKey}[2][/tikz/]{% + \def\mykey{#1#2}% + \def\mypath{}% + \gdef\myname{}% + \decompose#1#2/\nil +} +\newcommand*{\indexPathOperation}[1]{% + \index{#1@\protect\texttt{#1} path operation}% + \index{Path operations!#1@\protect\texttt{#1}}% +} + +%% references to original +\newcommand*{\indexLibraryO}[1]{% + \index{#1@\originalprefix\protect\texttt{\original{#1}} library\originalsuffix}% + \index{Libraries!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}% +} +\newcommand*{\indexMathFunctionO}[1]{% + \index{#1@\protect\texttt{\original{#1}} math function\originalsuffix}% + \index{Math functions!#1@\protect\texttt{\original{#1}}\originalsuffix}% +} +\newcommand*{\indexShapeO}[1]{% + \index{#1@\originalprefix\protect\texttt{\original{#1}} shape\originalsuffix}% + \index{Shapes!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}% +} +\newcommand*{\indexHandlerO}[1]{% + \index{\gobble#1@\originalprefix\protect\texttt{\original{#1}} handler\originalsuffix}% + \index{Key handlers!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix} +} +\newcommand*{\indexKeyO}[2][/tikz/]{%TODO + \begingroup\let\decomposetoodeep\decomposetoodeepO + \def\mykey{#1#2}% + \def\mypath{}% + \gdef\myname{}% + \firsttimetrue + \decomposeO#1#2/\nil + \endgroup +} +\def\decomposetoodeepO#1/#2/\nil{% + % avoid too-deep nesting in index + \index{#1/#2@\originalprefix\protect\texttt{\original{#1/#2}} key\originalsuffix}% + \index{\mypath#1/#2@\originalprefix\protect\texttt{\original{#1/#2}}\originalsuffix}% + \decomposefindlast/#1/#2/\nil% +} +\def\decomposeO/#1/#2\nil{% + \def\test{#2}% + \ifx\test\empty% + % aha. + \index{#1@\originalprefix\protect\texttt{\original{#1}} key\originalsuffix}% + \index{\mypath#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}% + \gdef\myname{#1}% + \pgfmanualpdflabel{#1}{} + \else% + \advance\pgfmanualdecomposecount by1\relax% + \ifnum\pgfmanualdecomposecount>2\relax% + \decomposetoodeepO#1/#2\nil% + \else% + \iffirsttime% + \begingroup% + % also make a pdf link anchor with full key path. + \def\hyperlabelwithoutslash##1/\nil{% + \pgfmanualpdflabel{##1}{}% + }% + \hyperlabelwithoutslash/#1/#2\nil% + \endgroup% + \def\mypath{#1@\protect\texttt{/#1/}!}% + \firsttimefalse% + \else% + \expandafter\def\expandafter\mypath\expandafter{\mypath#1@\protect\texttt{#1/}!}% + \fi% + \def\firsttime{}% + \decomposeO/#2\nil% + \fi% + \fi% +} +\newcommand*{\indexPathOperationO}[1]{% + \index{#1@\originalprefix\protect\texttt{\original{#1}} path operation\originalsuffix}% + \index{Path operations!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}% +} + +\newcommand*{\indexCommandO}[1]{% + \removeats{#1}% + \index{\strippedat @\originalprefix\protect\texttt{\original{\protect\string\protect#1}}\originalsuffix}% +} + +\newcommand*{\referenceKeyandIndexO}[2][/tikz/]{\texttt{#1#2}\indexKeyO[#1]{#2}}% + +\colorlet{originalindex}{gray} +\newcommand*{\original}[1]{\textcolor{originalindex}{#1}} +\newcommand*{\originalsuffix}{}%\textsuperscript{\textdagger}}%\normalsize +\newcommand*{\originalprefix}{}%\footnotesize + +%\newcommand*{\original}[1]{\textcolor{originalindex}{#1}} +%\newcommand*{\original}[1]{#1}%\textcolor{originalindex}{#1}} +%\newcommand*{\originalsuffix}{}%\textsuperscript{\color{blue}\tikzname}} +%\DeclareRobustCommand*{\originalprefix}{\smash{\footnotesize\llap{\textbullet\space}}} + +\newcommand*{\filetype}[1]{\textsc{#1}} + +\makeatletter +\def\index@prologue{\section*{Index}\addcontentsline{toc}{section}{Index} + This index contains automatically generated entries as well as {\originalprefix\original{references}\originalsuffix} to + original functionalities of PGF/\tikzname. + \bigskip +} +\makeatother \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-trans.tex b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-trans.tex new file mode 100644 index 00000000000..b0f0f2906d8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-pgf-trans.tex @@ -0,0 +1,175 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\section{Transformations: Mirroring} +\label{pgflibrary:transformations} + +\begin{purepgflibrary}{ext.transformations.mirror} + This library adds mirror transformations to PGF. +\end{purepgflibrary} + +Two approaches to mirror transformation exist: +\begin{enumerate} +\item Using the reflection matrix (see left column). + + This depends on |\pgfpointnormalised|\indexCommandO\pgfpointnormalised which involves + the sine\indexMathFunctionO{sin} and the cosine\indexMathFunctionO{cos} functions of PGFmath. + +\item Using built-in transformations (see right column). + + This depends on |\pgfmathanglebetween|\indexCommandO\pgfmathanglebetween which involves the arctangent (|atan2|\indexMathFunctionO{atan2}) function of PGFmath. +\end{enumerate} + +Which one is better? I don't know. +Choose one you're comfortable with. + +\begin{paracol}{2} + +\subsection{Using the reflection matrix} + +The following commands use the reflection matrix that sets the transformation matrix following +\begin{equation*} + A = \frac{1}{\Vert\vec l\Vert^2} \begin{bmatrix} + l_x^2-l_y^2 & 2l_xl_y \\ + 2l_xl_y & l_y^2-l_x^2\\ + \end{bmatrix}. +\end{equation*} + +\switchcolumn% > + +\stepcounter{subsection} +\subsection{Using built-in transformations} + +The following commands use a combination of shifting, rotating, $-1$ scaling, +rotating back and shifting back to reach the mirror transformation. + +The commands are named the same as on the left side, +only the |m| in |mirror| is capitalized. + +\switchcolumn*% < + +\begin{command}{\pgftransformxmirror\marg{value}} + Sets up a transformation that mirrors along a vertical line that goes through point $(\text{\meta{value}}, 0)$. + +\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] +\begin{tikzpicture} +\draw[help lines] (-0.25, -.25) grid (3.25, 1.25); +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); + +\draw[dashed] (1.5, -.25) -- (1.5, 1.25); +\pgftransformxmirror{1.5} + +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); +\end{tikzpicture} +\end{codeexample} +\end{command} + +\switchcolumn% > + +\begin{command}{\pgftransformxMirror\marg{value}} + Sets up a transformation that mirrors along a vertical line that goes through point $(\text{\meta{value}}, 0)$. + +\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] +\begin{tikzpicture} +\draw[help lines] (-0.25, -.25) grid (3.25, 1.25); +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); + +\draw[dashed] (1.5, -.25) -- (1.5, 1.25); +\pgftransformxMirror{1.5} + +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); +\end{tikzpicture} +\end{codeexample} +\end{command} + +\switchcolumn*% < + +\begin{command}{\pgftransformymirror\marg{value}} + Sets up a transformation that mirrors along a horizontal line that goes through point $(0, \text{\meta{value})}$. +\end{command} + +\begin{command}{\pgftransformmirror\marg{point A}\marg{point B}} + Sets up a transformation that mirrors along the line that goes through \meta{point A} and \meta{point B}. + +\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] +\begin{tikzpicture} +\draw[help lines] (-.25, -2.25) grid (2.5, 1.25); +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); + +\draw[dashed] (0, -1) -- (2, 0); +\pgftransformmirror{\pgfpointxy{0}{-1}} + {\pgfpointxy{2}{ 0}} + +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); +\end{tikzpicture} +\end{codeexample} +\end{command} + +\switchcolumn% > + +\begin{command}{\pgftransformyMirror\marg{value}} + Sets up a transformation that mirrors along a horizontal line that goes through point $(0, \text{\meta{value})}$. +\end{command} + +\begin{command}{\pgftransformMirror\marg{point A}\marg{point B}} + Sets up a transformation that mirrors along the line that goes through \meta{point A} and \meta{point B}. + +\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] +\begin{tikzpicture} +\draw[help lines] (-.25, -2.25) grid (2.5, 1.25); +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); + +\draw[dashed] (0, -1) -- (2, 0); +\pgftransformMirror{\pgfpointxy{0}{-1}} + {\pgfpointxy{2}{ 0}} + +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); +\end{tikzpicture} +\end{codeexample} +\end{command} + +\switchcolumn*% < + +\begin{command}{\pgfqtransformmirror\marg{point A}} + Sets up a transformation that mirrors along the line that goes through the origin and \meta{point A}. + +\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] +\begin{tikzpicture} +\draw[help lines] (-.25, -.25) grid (2.25, 1.25); +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); + +\draw[dashed] (0, 0) -- (2, 1); +\pgfqtransformmirror{\pgfpointxy{2}{1}} + +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); +\end{tikzpicture} +\end{codeexample} +\end{command} + +\switchcolumn + +\begin{command}{\pgfqtransformMirror\marg{point A}} + Sets up a transformation that mirrors along the line that goes through the origin and \meta{point A}. + +\begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] +\begin{tikzpicture} +\draw[help lines] (-.25, -.25) grid (2.25, 1.25); +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); + +\draw[dashed] (0, 0) -- (2, 1); +\pgfqtransformMirror{\pgfpointxy{2}{1}} + +\draw[-latex] (0,0) .. controls (.5,1) .. (1,1); +\end{tikzpicture} +\end{codeexample} +\end{command} + +\end{paracol} +\endinput diff --git a/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual.pdf b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual.pdf new file mode 100644 index 00000000000..7879c7cd9be Binary files /dev/null and b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual.pdf differ diff --git a/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual.tex b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual.tex new file mode 100644 index 00000000000..2375904d805 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-ext/tikz-ext-manual.tex @@ -0,0 +1,33 @@ +% !TeX TS-program = lualatex +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% arara: lualatex +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\documentclass[a4paper,doc2,landscape]{ltxdoc} + +\input{tikz-ext-manual-en-main-preamble.tex} +\usetikzlibrary{external} +%\newif\iftikzextmanualexternalize +%\tikzextmanualexternalizetrue +%\iftikzextmanualexternalize + \tikzexternalize[ + prefix=tikz/, +% prefix=../../tikz-extensions-tikz/, +% mode=convert with system call, + %mode=list and make, + %mode=list only,export=true,% simply skips EVERY picture -> good for debugging the text. + ] + \tikzexternalenable + \tikzifexternalizing{% + \pgfkeys{/pdflinks/codeexample links=false}% + }{}% +%\fi + +\input{tikz-ext-manual-en-main-body.tex} -- cgit v1.2.3