summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-06-01 20:21:17 +0000
committerKarl Berry <karl@freefriends.org>2024-06-01 20:21:17 +0000
commiteda932687dfa5c83236058b02a152ae315001d5e (patch)
tree57cac1bd86bdb2a755568f455ba476581a375dd3 /Master/texmf-dist/doc/latex
parent2f361f1349fe289dc6ec3276b81c36cd6bee5b54 (diff)
tqft (1jun24)
git-svn-id: svn://tug.org/texlive/trunk@71401 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r--Master/texmf-dist/doc/latex/tqft/README9
-rw-r--r--Master/texmf-dist/doc/latex/tqft/README.txt13
-rw-r--r--Master/texmf-dist/doc/latex/tqft/tqft.pdfbin460464 -> 476908 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tqft/tqft.tex (renamed from Master/texmf-dist/doc/latex/tqft/tqft_doc.tex)57
-rw-r--r--Master/texmf-dist/doc/latex/tqft/tqft_code.pdfbin281351 -> 292287 bytes
5 files changed, 48 insertions, 31 deletions
diff --git a/Master/texmf-dist/doc/latex/tqft/README b/Master/texmf-dist/doc/latex/tqft/README
deleted file mode 100644
index 365b108946b..00000000000
--- a/Master/texmf-dist/doc/latex/tqft/README
+++ /dev/null
@@ -1,9 +0,0 @@
-----------------------------------------------------------------
-tqft --- a library for drawing TQFT diagrams with TikZ/PGF
-E-mail: stacey@math.ntnu.no
-Released under the LaTeX Project Public License v1.3c or later
-See http://www.latex-project.org/lppl.txt
-----------------------------------------------------------------
-
-This package defines some shapes useful for drawing TQFT diagrams with TikZ/PGF.
-
diff --git a/Master/texmf-dist/doc/latex/tqft/README.txt b/Master/texmf-dist/doc/latex/tqft/README.txt
new file mode 100644
index 00000000000..244978100f6
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tqft/README.txt
@@ -0,0 +1,13 @@
+----------------------------------------------------------------
+tqft --- a TikZ library for drawing TQFT diagrams
+bundle version: v2.3 2024/05/31
+E-mail: Andrew Stacey <loopspace@mathforge.org>
+Released under the LaTeX Project Public License v1.3c or later
+See http://www.latex-project.org/lppl.txt
+----------------------------------------------------------------
+
+This package defines some shapes useful for drawing TQFT diagrams with TikZ/PGF.
+The initial idea of this package came from a question and answer on the site https://tex.stackexchange.com.
+
+The package comes in two versions: a package (tqft.sty) and a TikZ library (tikzlibrarytqft.code.tex). The original package (tqft.sty) is depreciated and has been frozen at version 2.1. The TikZ library is maintained and should be used in preference, except for legacy code.
+
diff --git a/Master/texmf-dist/doc/latex/tqft/tqft.pdf b/Master/texmf-dist/doc/latex/tqft/tqft.pdf
index 7b5ab55652b..d7648343428 100644
--- a/Master/texmf-dist/doc/latex/tqft/tqft.pdf
+++ b/Master/texmf-dist/doc/latex/tqft/tqft.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tqft/tqft_doc.tex b/Master/texmf-dist/doc/latex/tqft/tqft.tex
index 97c7ff541cb..4eb7bdc7d4b 100644
--- a/Master/texmf-dist/doc/latex/tqft/tqft_doc.tex
+++ b/Master/texmf-dist/doc/latex/tqft/tqft.tex
@@ -34,11 +34,16 @@
}
\providecommand*{\url}{\texttt}
-\GetFileInfo{tqft.sty}
+\GetFileInfo{tikzlibrarytqft.code.tex}
+\pdfstringdefDisableCommands{%
+ \def\\{}%
+ \def\url#1{<#1>}%
+}
\title{The \textsf{tqft} Ti\emph{k}Z Library: Documentation}
\author{Andrew Stacey \\ \url{loopspace@mathforge.org}}
+\date{\fileversion~from \filedate}
\begin{document}
@@ -151,7 +156,7 @@ The second version is designed to be similar to the first, but with some improve
The original version was distributed as a \Verb+.sty+ file and so is loaded using \Verb+\usepackage{tqft}+.
The newer version is a Ti\emph{k}Z library and so is loaded using \Verb+\usetikzlibrary{tqft}+.
This makes it possible to use both in the same document.
-This is not recommended, but an attempt has been made to make it possible to switch between the two methods.
+This is not recommended, but an attempt has been made to make it possible to switch between the two methods (mainly to stop this documentation file complaining every time I compile it).
This hasn't been extensively tested so use with caution.
To make the switch use the key \Verb+/tikz/tqft/use nodes=<true|false>+.
By default, the one loaded last should be in effect at the start of the document.
@@ -170,7 +175,8 @@ Moreover, any unknown keys are passed on to the \Verb+/tikz+ directory so there
Some examples take advantage of this switch so when copying and modifying examples from this document, it is important to remember that the first \Verb+tqft+ specific key needs an explicit \Verb+tqft/+ prefix.
-\section{Version 2.0}
+\section{Version 2: Pics via a TikZ Library}
+\label{sec:pic}
\subsection{The Shapes}
@@ -266,6 +272,9 @@ It is a dimensionless number (not necessarily an integer) and is interpreted so
\item \DescribeMacro{genus} This defines the number of holes in the shape.
These are spread out in a horizontal line in the middle of the shape.
+
+\item \DescribeMacro{twisted} This is a boolean that, if set, makes the cobordism \emph{twisted} in that the edges cross as they pass from the incoming to outgoing boundaries.
+This probably won't look good with a non-zero genus, but there's nothing stopping you doing it.
\end{itemize}
\subsection{Styling}
@@ -337,7 +346,6 @@ The latter is for the two sides, but note that if the cobordism has no incoming
\item \Verb=between incoming <n> and <n+1>=,
\item \Verb=between outgoing <n> and <n+1>=,
\item \Verb+between first incoming and first outgoing+,
-\item \Verb+between first incoming and first outgoing+,
\item \Verb+between last incoming and last outgoing+,
\item \Verb+between first and last incoming+,
\item \Verb+between first and last outgoing+.
@@ -418,7 +426,11 @@ They are:
\item \Verb=between first incoming and first outgoing= is on the edge between the first incoming and first outgoing boundary components; note that this is only defined if there are both incoming and outgoing boundary components.
\item \Verb=between last incoming and last outgoing= is on the edge between the last incoming and last outgoing boundary components; note that this is only defined if there are both incoming and outgoing boundary components.
\item \Verb=between first and last incoming=; this is only defined if there are no outgoing components.
+
+This is also available via the alias \Verb=between first incoming and last incoming=.
\item \Verb=between first and last outgoing=; this is only defined if there are no incoming components.
+
+This is also available via the alias \Verb=between first outgoing and last outgoing=.
\item \Verb=hole <n>=; if the genus is non-zero, this points to the centre of the \(n\)th hole.
\end{itemize}
@@ -453,7 +465,7 @@ outgoing boundary 4/below right}
\begin{enumerate}
\item Like \Verb+node+s, \Verb+pic+s need the \Verb+transform shape+ key to be set to take note of external transformations (other than shifts).
-Also, as the tqft pic uses nodes internally, if you use the \Verb+transform shape+ key on the pic, you might find you need to use \Verb+every node/.style={transform shape}+ as well.
+The tqft pic uses nodes internally and those nodes have \Verb+transform shape+ automatically set so this should \emph{just work}.
\item There is an additional \Verb+every tqft+ key which is run when the \Verb+tqft+ key is invoked (which might be via some other key).
This is better placed than the \Verb+every pic+ key since that applies to a surrounding scope rather than to the \Verb+pic+ itself.
\item If the \Verb+tqft+ key is invoked, either implicitly or explicitly, then the \Verb+pic type+ is set to \Verb+cobordism+.
@@ -482,15 +494,13 @@ Use \Verb+transform shape+ and apply your own transformation.
{(0,-8)}/{fill=orange,fill opacity=.5,tqft/every lower boundary component/.style={draw,blue,ultra thin,dashed},tqft/every upper boundary component/.style={draw,green},tqft/cobordism edge/.style={draw,purple},tqft/every boundary component/.style={fill=yellow}},
{(5,-8)}/{fill=orange,fill opacity=.5,tqft/cobordism edge/.style={draw,purple},tqft/every boundary component/.style={fill=yellow,draw=green}}
} {
-\begin{scope}
-\edef\styleit{\noexpand\tikzset{every tqft/.style={\style}}}
-\styleit
+ \begin{scope}[every tqft/.style/.expand once=\style]
\pic[tqft/cap,name=h,at=\coord];
\pic[tqft/pair of pants,anchor=incoming boundary 1,name=a,at=(h-outgoing boundary 1)];
\pic[tqft/cylinder to next,anchor={(0,1)},name=d,at=(a-outgoing boundary 2)];
\pic[tqft/reverse pair of pants,anchor=incoming boundary 1,name=b,at=(a-outgoing boundary 2)];
\pic[tqft/cylinder to prior,anchor=incoming boundary 1,name=c,at=(b-outgoing boundary 1)];
-\pic[tqft/cylinder,anchor=incoming boundary 1,name=e,at=(a-outgoing boundary 1)];
+\pic[tqft/cylinder,twisted,anchor=incoming boundary 1,name=e,at=(a-outgoing boundary 1)];
\pic[tqft/cylinder,anchor=incoming boundary 1,name=f,at=(e-outgoing boundary 1)];
\pic[tqft/reverse pair of pants,anchor=incoming boundary 1,name=g,at=(f-outgoing boundary 1)];
\pic[tqft/cup,anchor=incoming boundary 1,name=i,at=(g-outgoing boundary 1)];
@@ -527,24 +537,26 @@ Use \Verb+transform shape+ and apply your own transformation.
view from=incoming,
anchor=between incoming 1 and 2
]
-\pic[rotate=90,every node/.style={transform shape},name=a,tqft,incoming boundary components=5,skip incoming boundary components={2,4},outgoing boundary components=7,skip outgoing boundary components={2,3,5},offset=-.5];
+\pic[rotate=90,
+ %every node/.style={transform shape},
+ name=a,tqft,incoming boundary components=5,skip incoming boundary components={2,4},outgoing boundary components=7,skip outgoing boundary components={2,3,5},offset=-.5];
\begin{scope}[every pin edge/.style={<-}]
\foreach \anchor/\ang in {
hole 1/-90,
hole 2/90,
hole 3/-90,
- incoming boundary 3/90,
- outgoing boundary 4/-90,
- between last incoming and last outgoing/180,
- between first incoming and first outgoing/180,
- between incoming 1 and 3/90,
- between outgoing 1 and 4/-90,
- between outgoing 4 and 6/-90
+ incoming boundary 3/180,
+ outgoing boundary 4/0,
+ between last incoming and last outgoing/90,
+ between first incoming and first outgoing/-90,
+ between incoming 1 and 3/180,
+ between outgoing 1 and 4/0,
+ between outgoing 4 and 6/0
} {
\node[pin=\ang:\anchor,at=(a-\anchor),inner sep=0pt] {};
}
-\draw[<-] (0,0) -- ++(0,3);
+\draw[<-] (0,0) -- ++(-2,0) node[left] {origin};
\end{scope}
\end{tikzpicture}
\end{example}
@@ -697,10 +709,13 @@ Use \Verb+transform shape+ and apply your own transformation.
\end{tikzpicture}
%\end{example}
-\section{Version 1.0}
+\section{Version 1: Nodes via a Style File}
\tikzset{tqft/use nodes=true}
+As mentioned in the introduction, this is the original method of drawing cobordism diagrams using nodes and is no longer updated (though I will fix bugs if I can).
+If drawing a new diagram, use the pic method from Section~\ref{sec:pic}.
+
\subsection{The Node Shapes}
There are only two shapes, \Verb+tqft cobordism+ and \Verb+tqft boundary circle+.
@@ -940,9 +955,7 @@ This shouldn't happen, or should happen by design not by accident.
{(0,-8)}/{fill=orange,fill opacity=.5,tqft/boundary lower style={draw,blue,ultra thin,dashed},tqft/boundary upper style={draw,green},tqft/cobordism style={draw,purple},tqft/boundary style={fill=yellow}},
{(5,-8)}/{fill=orange,fill opacity=.5,tqft/cobordism style={draw,purple},tqft/boundary style={fill=yellow,draw=green}}
} {
-\begin{scope}
-\edef\styleit{\noexpand\tikzset{every node/.style={\style}}}
-\styleit
+\begin{scope}[every node/.style/.expand once=\style]
\node[tqft/cap] (h) at \coord {};
\node[tqft/pair of pants,anchor=incoming boundary 1] (a) at (h.outgoing boundary 1) {};
\node[tqft/cylinder to next,anchor=incoming boundary 1] (d) at (a.incoming boundary 2) {};
diff --git a/Master/texmf-dist/doc/latex/tqft/tqft_code.pdf b/Master/texmf-dist/doc/latex/tqft/tqft_code.pdf
index cd380f75470..9cdd9ca1d1f 100644
--- a/Master/texmf-dist/doc/latex/tqft/tqft_code.pdf
+++ b/Master/texmf-dist/doc/latex/tqft/tqft_code.pdf
Binary files differ