diff options
author | Karl Berry <karl@freefriends.org> | 2024-06-01 20:21:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-06-01 20:21:17 +0000 |
commit | eda932687dfa5c83236058b02a152ae315001d5e (patch) | |
tree | 57cac1bd86bdb2a755568f455ba476581a375dd3 /Master/texmf-dist | |
parent | 2f361f1349fe289dc6ec3276b81c36cd6bee5b54 (diff) |
tqft (1jun24)
git-svn-id: svn://tug.org/texlive/trunk@71401 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/tqft/README | 9 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tqft/README.txt | 13 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tqft/tqft.pdf | bin | 460464 -> 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.pdf | bin | 281351 -> 292287 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/tqft/tqft_code.dtx (renamed from Master/texmf-dist/source/latex/tqft/tqft.dtx) | 120 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/tqft/tqft_code.ins (renamed from Master/texmf-dist/source/latex/tqft/tqft.ins) | 34 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tqft/tikzlibrarytqft.code.tex | 77 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tqft/tqft.sty | 14 |
9 files changed, 203 insertions, 121 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 Binary files differindex 7b5ab55652b..d7648343428 100644 --- a/Master/texmf-dist/doc/latex/tqft/tqft.pdf +++ b/Master/texmf-dist/doc/latex/tqft/tqft.pdf 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 Binary files differindex cd380f75470..9cdd9ca1d1f 100644 --- a/Master/texmf-dist/doc/latex/tqft/tqft_code.pdf +++ b/Master/texmf-dist/doc/latex/tqft/tqft_code.pdf diff --git a/Master/texmf-dist/source/latex/tqft/tqft.dtx b/Master/texmf-dist/source/latex/tqft/tqft_code.dtx index dc471eed3d8..67d4afe458a 100644 --- a/Master/texmf-dist/source/latex/tqft/tqft.dtx +++ b/Master/texmf-dist/source/latex/tqft/tqft_code.dtx @@ -4,13 +4,17 @@ %</internal> %<*readme> ---------------------------------------------------------------- -tqft --- a library for drawing TQFT diagrams with TikZ/PGF -E-mail: stacey@math.ntnu.no +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. %</readme> %<*internal> \fi @@ -25,7 +29,7 @@ This package defines some shapes useful for drawing TQFT diagrams with TikZ/PGF. \askforoverwritefalse \preamble ---------------------------------------------------------------- -tqft --- a library for drawing TQFT diagrams with TikZ/PGF +tqft --- a TikZ library for drawing TQFT diagrams E-mail: loopspace@mathforge.org Released under the LaTeX Project Public License v1.3c or later See http://www.latex-project.org/lppl.txt @@ -34,7 +38,7 @@ See http://www.latex-project.org/lppl.txt \endpreamble \postamble -Copyright (C) 2011 by Andrew Stacey <loopspace@mathforge.org> +Copyright (C) 2011-2024 by Andrew Stacey <loopspace@mathforge.org> This work may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either @@ -46,29 +50,29 @@ http://www.latex-project.org/lppl.txt This work is "maintained" (as per LPPL maintenance status) by Andrew Stacey. -This work consists of the files tqft.dtx, - tqft_doc.tex, -and the derived files tqft.ins, +This work consists of the files tqft_code.dtx, + tqft.tex, +and the derived files tqft_code.ins, + tqft_code.pdf, tqft.pdf, - tqft_doc.pdf, tqft.sty, and tikzlibrarytqft.code.tex. \endpostamble \usedir{tex/latex/tqft} \generate{ - \file{\jobname.sty}{\from{\jobname.dtx}{package}} + \file{tqft.sty}{\from{\jobname.dtx}{package}} } \usedir{tex/latex/tqft} \generate{ - \file{tikzlibrary\jobname.code.tex}{\from{\jobname.dtx}{library}} + \file{tikzlibrarytqft.code.tex}{\from{\jobname.dtx}{library}} } %</install> %<install>\endbatchfile %<*internal> \usedir{source/latex/tqft} \generate{ - \file{\jobname.ins}{\from{\jobname.dtx}{install}} + \file{tqft_code.ins}{\from{\jobname.dtx}{install}} } \nopreamble\nopostamble \usedir{doc/latex/demopkg} @@ -91,7 +95,7 @@ and the derived files tqft.ins, \usepackage{lmodern} %\usepackage{morefloats} \usepackage{tikz} -\usepackage{\jobname} +\usepackage{tqft} \usepackage[numbered]{hypdoc} \definecolor{lstbgcolor}{rgb}{0.9,0.9,0.9} @@ -109,7 +113,7 @@ and the derived files tqft.ins, %</driver> % \fi % -% \CheckSum{2577} +% \CheckSum{2623} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -131,13 +135,20 @@ and the derived files tqft.ins, % \changes{1.0}{2011/05/03}{Converted to DTX file} % \changes{2.0}{2014/04/07}{Converted nodes to pics} % \changes{2.1}{2017/06/01}{Can skip boundary components} +% \changes{2.2}{2022/08/24}{Twisted shapes} +% \changes{2.3}{2022/08/24}{File incorrectly named} % % \DoNotIndex{\newcommand,\newenvironment} +% \pdfstringdefDisableCommands{% +% \def\\{}% +% \def\url#1{<#1>}% +% } % % \providecommand*{\url}{\texttt} -% \GetFileInfo{tqft.dtx} +% \GetFileInfo{tikzlibrarytqft.code.tex} % \title{The \textsf{tqft} package: codebase} % \author{Andrew Stacey \\ \url{loopspace@mathforge.org}} +% \date{\fileversion~from \filedate} % % \maketitle % @@ -1247,6 +1258,7 @@ and the derived files tqft.ins, % % \iffalse %<*library> +\ProvidesFile{tikzlibrarytqft.code.tex}[2024/05/31 v2.3 Tikz/PGF commands for drawing TQFT diagrams] % \fi % % Issue a warning if the pic syntax is not available. @@ -1268,6 +1280,10 @@ and the derived files tqft.ins, \let\pgf@tqft@upper\@empty \let\pgf@tqft@lower\pgf@tqft@minus % \end{macrocode} +% Should we twist the cobordism? +% \begin{macrocode} +\newif\iftqft@twisted +% \end{macrocode} % Split an anchoring coordinate. % The \(y\)--value is simply multiplied by the cobordism height (but pointing downwards, so that \(1\) is level with the outgoing boundary). % The \(x\)--value is multiplied by the boundary separation, but is shifted so that at the incoming boundary level, or above, then it is in line with the incoming boundaries and similarly at the outgoing boundary level, or below, it is in line with the outgoing boundaries. @@ -1347,6 +1363,10 @@ and the derived files tqft.ins, \let\pgf@tqft@upper\@empty }, % \end{macrocode} +% Should we twist the cobordism? +% \begin{macrocode} + twisted/.is if=tqft@twisted, +% \end{macrocode} % We simulate node placement using the following key. % \begin{macrocode} anchor/.initial = none, @@ -1451,7 +1471,7 @@ and the derived files tqft.ins, % \begin{macrocode} \global\let\tqft@alist\pgfutil@gobble % \end{macrocode} -% These will be lists of the boundary components, divided into sets as to whether or not they are rendered. For the outgoing ones, we need too lists because they are rendered in the opposite order to how they are labelled. +% These will be lists of the boundary components, divided into sets as to whether or not they are rendered. For the outgoing ones, we need two lists because they are rendered in the opposite order to how they are labelled. % \begin{macrocode} \global\let\tqft@ibdrylist=\pgfutil@gobble \global\let\tqft@cibdrylist=\pgfutil@gobble @@ -1460,6 +1480,17 @@ and the derived files tqft.ins, \global\let\tqft@robdrylist=\pgfutil@gobble \global\let\tqft@rcobdrylist=\pgfutil@gobble % \end{macrocode} +% Is the cobordism twisted? If so, we need to reverse the order of the +% outgoing boundary components. +% \begin{macrocode} + \iftqft@twisted + \pgfmathsetmacro\tqft@outgoing@end{0}% + \pgfmathsetmacro\tqft@outgoing@dir{-1}% + \else + \pgfmathsetmacro\tqft@outgoing@end{1}% + \pgfmathsetmacro\tqft@outgoing@dir{1}% + \fi +% \end{macrocode} % The first stage is to iterate over the incoming boundary components (if there are any), building up the various paths. % \begin{macrocode} \ifnum\tqft@val{incoming boundary components}>0\relax @@ -1533,9 +1564,14 @@ and the derived files tqft.ins, % \begin{macrocode} \ifnum\tqft@val{outgoing boundary components}>0\relax % \end{macrocode} -% There are, so we add a curve from the end of the last incoming to the last outgoing component to the full path, +% There are. +% +% We start by adding a curve from the end of the last incoming to the last outgoing component to the full path, % \begin{macrocode} - \pgfmathsetmacro\xppos{(\tqft@val{outgoing boundary components} -1+\tqft@val{offset}) * \tqft@val{boundary separation} +\tqft@val{circle x radius}}% + \pgfmathsetmacro\xppos{% + (\tqft@outgoing@end * (\tqft@val{outgoing boundary components} -1) + + \tqft@val{offset}) * \tqft@val{boundary separation} + + \tqft@outgoing@dir * \tqft@val{circle x radius}}% \pgfmathsetmacro\tqft@ht{abs(\tqft@val{incoming boundary components} - \tqft@val{outgoing boundary components} - \tqft@val{offset})}% \pgfmathsetmacro\tqft@ht{1/3 + 2/3*\tqft@ht/(\tqft@ht + 1)}% \xdef\tqft@fullpath{% @@ -1571,7 +1607,7 @@ and the derived files tqft.ins, % Same for the edge path. % \begin{macrocode} \xdef\tqft@blist{% - \tqft@blist,between first incoming and last incoming/incoming and outgoing/{% + \tqft@blist,between first and last incoming/incoming and outgoing/{% (\tqft@val{incoming boundary components} * \tqft@val{boundary separation} + \tqft@val{circle x radius} - \tqft@val{boundary separation},0pt) .. controls +(0,-\tqft@ht*\tqft@val{cobordism height}) and +(0,-\tqft@ht*\tqft@val{cobordism height}) .. (-\tqft@val{circle x radius},0)} }% @@ -1580,7 +1616,7 @@ and the derived files tqft.ins, % \begin{macrocode} \pgfmathsetmacro\xppos{(\tqft@val{incoming boundary components} -1) * \tqft@val{boundary separation}/2}% \xdef\tqft@clist{% - \tqft@clist,-between first incoming and last incoming/{(\xppos pt,-\tqft@ht*\tqft@val{cobordism height}*3/4)}% + \tqft@clist,-between first and last incoming/{(\xppos pt,-\tqft@ht*\tqft@val{cobordism height}*3/4)},-between first incoming and last incoming/{(\xppos pt,-\tqft@ht*\tqft@val{cobordism height}*3/4)}% }% \fi \else @@ -1588,7 +1624,7 @@ and the derived files tqft.ins, % There weren't any incoming boundary components, so we test to see if there were any outgoing ones and move to the start of them. % \begin{macrocode} \ifnum\tqft@val{outgoing boundary components}>0\relax - \pgfmathsetmacro\xppos{(\tqft@val{outgoing boundary components} -1+\tqft@val{offset}) * \tqft@val{boundary separation} +\tqft@val{circle x radius}} + \pgfmathsetmacro\xppos{( \tqft@outgoing@end * (\tqft@val{outgoing boundary components} -1)+\tqft@val{offset}) * \tqft@val{boundary separation} + \tqft@outgoing@dir * \tqft@val{circle x radius}} % \end{macrocode} % Add a move to the full path, % \begin{macrocode} @@ -1600,22 +1636,25 @@ and the derived files tqft.ins, \fi % \end{macrocode} % We're done with the incoming boundary components, now we're set up for the outgoing ones. -% However we got there, if we have outgoing boundary components then we're now located at the start of them, although we're counting backwards. +% However we got there, if we have outgoing boundary components then we're now located at the start of them, although we might be counting backwards . % \begin{macrocode} - \ifnum\tqft@val{outgoing boundary components}>0\relax - \pgfmathsetmacro\xppos{(\tqft@val{outgoing boundary components} -1+\tqft@val{offset}) * \tqft@val{boundary separation} -\tqft@val{circle x radius}}% + \ifnum\tqft@val{outgoing boundary components}>0\relax + \pgfmathsetmacro\xppos{% + ( \tqft@outgoing@end * (\tqft@val{outgoing boundary components} -1) + + \tqft@val{offset}) * \tqft@val{boundary separation} + - \tqft@outgoing@dir * \tqft@val{circle x radius}}% % \end{macrocode} % Draw the arc for the first (well, last actually) boundary component. % \begin{macrocode} \xdef\tqft@fullpath{% \tqft@fullpath - arc[end angle=\pgf@tqft@upper180, start angle=0, x radius=\tqft@val{circle x radius}, y radius=\tqft@val{circle y radius}] + arc[end angle=\pgf@tqft@upper180, start angle=0, x radius=\tqft@outgoing@dir * \tqft@val{circle x radius}, y radius=\tqft@val{circle y radius}] }% % \end{macrocode} % And add the centre to the list for available shifts. % \begin{macrocode} \xdef\tqft@alist{% - \tqft@alist,-outgoing boundary \tqft@val{outgoing boundary components}/{(\xppos pt + \tqft@val{circle x radius},-\tqft@val{cobordism height})},-outgoing boundary/{(\tqft@val{offset}*\tqft@val{boundary separation},-\tqft@val{cobordism height})}% + \tqft@alist,-outgoing boundary \tqft@val{outgoing boundary components}/{(\xppos pt + \tqft@outgoing@dir * \tqft@val{circle x radius},-\tqft@val{cobordism height})},-outgoing boundary/{(\tqft@val{offset}*\tqft@val{boundary separation},-\tqft@val{cobordism height})}% }% % \end{macrocode} % Do we have more than one boundary component? @@ -1624,7 +1663,7 @@ and the derived files tqft.ins, % \end{macrocode} % Yes, so add a curve and arc for each. % \begin{macrocode} - \foreach \k [evaluate=\k as \ok using int(\tqft@val{outgoing boundary components} - \k + 1)] in {2,...,\tqft@val{outgoing boundary components}} { + \foreach \k [evaluate=\k as \ok using int(\tqft@outgoing@end * (\tqft@val{outgoing boundary components} + 1) - \tqft@outgoing@dir * \k)] in {2,...,\tqft@val{outgoing boundary components}} { \edef\tqft@temp{\noexpand\pgfutil@in@{,\ok,}{,\tqft@val{skip outgoing boundary components},}} \tqft@temp \ifpgfutil@in@ @@ -1637,9 +1676,9 @@ and the derived files tqft.ins, \else \foreach \k [ remember=\k as \kmo (initially 1), - evaluate=\k as \xpos using (\tqft@val{outgoing boundary components} - \k + \tqft@val{offset})*\tqft@val{boundary separation} + \tqft@val{circle x radius}, + evaluate=\k as \xpos using ( \tqft@outgoing@end * (\tqft@val{outgoing boundary components} + 1) - 1 - \tqft@outgoing@dir * \k + \tqft@val{offset})*\tqft@val{boundary separation} + \tqft@outgoing@dir * \tqft@val{circle x radius}, ] in \tqft@obdrylist { - \pgfmathsetmacro\xppos{(\tqft@val{outgoing boundary components} - \kmo + \tqft@val{offset})*\tqft@val{boundary separation} - \tqft@val{circle x radius}} + \pgfmathsetmacro\xppos{(\tqft@outgoing@end * (\tqft@val{outgoing boundary components} + 1) - 1 - \tqft@outgoing@dir * \kmo + \tqft@val{offset})*\tqft@val{boundary separation} - \tqft@outgoing@dir * \tqft@val{circle x radius}} \pgfmathsetmacro\cpos{(\xpos + \xppos)/2} \pgfmathsetmacro\nk{int(\tqft@val{outgoing boundary components} - \k + 1)} \pgfmathsetmacro\nkpo{int(\tqft@val{outgoing boundary components} - \kmo + 1)} @@ -1648,7 +1687,7 @@ and the derived files tqft.ins, % \begin{macrocode} \xdef\tqft@fullpath{% \tqft@fullpath - .. controls +(0,\tqft@val{cobordism height}/3) and +(0,\tqft@val{cobordism height}/3) .. (\xpos pt,-\tqft@val{cobordism height}) arc[end angle=\pgf@tqft@upper180, start angle=0, x radius=\tqft@val{circle x radius}, y radius=\tqft@val{circle y radius}] + .. controls +(0,\tqft@val{cobordism height}/3) and +(0,\tqft@val{cobordism height}/3) .. (\xpos pt,-\tqft@val{cobordism height}) arc[end angle=\pgf@tqft@upper180, start angle=0, x radius=\tqft@outgoing@dir * \tqft@val{circle x radius}, y radius=\tqft@val{circle y radius}] }% % \end{macrocode} % Just the arc for the edge paths. @@ -1691,14 +1730,14 @@ and the derived files tqft.ins, % \begin{macrocode} \xdef\tqft@blist{% \tqft@blist,between first incoming and first outgoing/incoming and outgoing/{% - (\tqft@val{offset} * \tqft@val{boundary separation} - \tqft@val{circle x radius},-\tqft@val{cobordism height}) + ({ ( (1 - \tqft@outgoing@end) * (\tqft@val{outgoing boundary components} - 1) + \tqft@val{offset}) * \tqft@val{boundary separation} - \tqft@outgoing@dir * \tqft@val{circle x radius}},-\tqft@val{cobordism height}) .. controls +(0,\tqft@ht*\tqft@val{cobordism height}) and +(0,-\tqft@ht*\tqft@val{cobordism height}) .. (-\tqft@val{circle x radius},0)}% }% % \end{macrocode} % Add a coordinate at the midpoint. % \begin{macrocode} \xdef\tqft@clist{% - \tqft@clist,-between first incoming and first outgoing/{(\tqft@val{offset}*\tqft@val{boundary separation}/2-\tqft@val{circle x radius},-\tqft@val{cobordism height}/2)}% + \tqft@clist,-between first incoming and first outgoing/{({ ( (1 - \tqft@outgoing@end) * (\tqft@val{outgoing boundary components} - 1) +\tqft@val{offset})*\tqft@val{boundary separation}/2- \tqft@outgoing@end * \tqft@val{circle x radius}},-\tqft@val{cobordism height}/2)}% }% \else % \end{macrocode} @@ -1727,7 +1766,7 @@ and the derived files tqft.ins, \pgfmathsetmacro\xppos{(\tqft@val{outgoing boundary components}/2 + \tqft@val{offset} -1/2) * \tqft@val{boundary separation}}% \pgfmathsetmacro\tqft@ht{1 -\tqft@ht*3/4}% \xdef\tqft@clist{% - \tqft@clist,-between first and last outgoing/{(\xppos pt,-\tqft@ht*\tqft@val{cobordism height})}% + \tqft@clist,-between first and last outgoing/{(\xppos pt,-\tqft@ht*\tqft@val{cobordism height})},-between first outgoing and last outgoing/{(\xppos pt,-\tqft@ht*\tqft@val{cobordism height})}% }% \fi \fi @@ -1924,7 +1963,8 @@ and the derived files tqft.ins, \xdef\tqft@ibdrylist{1,\tqft@ibdrylist} \fi \foreach[evaluate=\k as \xpos using (\k-1)*\tqft@val{boundary separation}] \k in \tqft@ibdrylist { - \node[ + \node[ + transform shape, node contents={}, ellipse, inner sep=0pt, @@ -1941,7 +1981,8 @@ and the derived files tqft.ins, \ifx\tqft@cibdrylist\pgfutil@gobble \else \foreach[evaluate=\k as \xpos using (\k-1)*\tqft@val{boundary separation}] \k in \tqft@cibdrylist { - \node[ + \node[ + transform shape, node contents={}, ellipse, inner sep=0pt, @@ -1970,13 +2011,14 @@ and the derived files tqft.ins, \else \xdef\tqft@obdrylist{1,\tqft@obdrylist} \fi -\foreach \k [evaluate=\k as \ok using int(\tqft@val{outgoing boundary components} - \k + 1)] in \tqft@obdrylist { +\foreach \k [evaluate=\k as \ok using int(\tqft@outgoing@end * (\tqft@val{outgoing boundary components} + 1) - \tqft@outgoing@dir * \k)] in \tqft@obdrylist { \xdef\tqft@robdrylist{\tqft@robdrylist,\ok} } \foreach[ evaluate=\k as \xpos using (\k-1+\tqft@val{offset})*\tqft@val{boundary separation} ] \k in \tqft@robdrylist { - \node[ + \node[ + transform shape, node contents={}, ellipse, inner sep=0pt, @@ -1992,13 +2034,15 @@ and the derived files tqft.ins, }% \ifx\tqft@cobdrylist\pgfutil@gobble \else -\foreach \k [evaluate=\k as \ok using int(\tqft@val{outgoing boundary components} - \k + 1)] in \tqft@cobdrylist { +\foreach \k[evaluate=\k as \ok using int(\tqft@outgoing@end * (\tqft@val{outgoing boundary components} + 1) - \tqft@outgoing@dir * \k)] + in \tqft@cobdrylist { \xdef\tqft@rcobdrylist{\tqft@rcobdrylist,\ok} } \foreach[ evaluate=\k as \xpos using (\k-1+\tqft@val{offset})*\tqft@val{boundary separation} ] \k in \tqft@rcobdrylist { - \node[ + \node[ + transform shape, node contents={}, ellipse, inner sep=0pt, diff --git a/Master/texmf-dist/source/latex/tqft/tqft.ins b/Master/texmf-dist/source/latex/tqft/tqft_code.ins index 2eb5352bf85..6f49b661e35 100644 --- a/Master/texmf-dist/source/latex/tqft/tqft.ins +++ b/Master/texmf-dist/source/latex/tqft/tqft_code.ins @@ -1,12 +1,12 @@ %% -%% This is file `tqft.ins', +%% This is file `tqft_code.ins', %% generated with the docstrip utility. %% %% The original source files were: %% -%% tqft.dtx (with options: `install') +%% tqft_code.dtx (with options: `install') %% ---------------------------------------------------------------- -%% tqft --- a library for drawing TQFT diagrams with TikZ/PGF +%% tqft --- a TikZ library for drawing TQFT diagrams %% E-mail: loopspace@mathforge.org %% Released under the LaTeX Project Public License v1.3c or later %% See http://www.latex-project.org/lppl.txt @@ -17,7 +17,7 @@ \askforoverwritefalse \preamble ---------------------------------------------------------------- -tqft --- a library for drawing TQFT diagrams with TikZ/PGF +tqft --- a TikZ library for drawing TQFT diagrams E-mail: loopspace@mathforge.org Released under the LaTeX Project Public License v1.3c or later See http://www.latex-project.org/lppl.txt @@ -26,7 +26,7 @@ See http://www.latex-project.org/lppl.txt \endpreamble \postamble -Copyright (C) 2011 by Andrew Stacey <loopspace@mathforge.org> +Copyright (C) 2011-2024 by Andrew Stacey <loopspace@mathforge.org> This work may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either @@ -38,27 +38,27 @@ http://www.latex-project.org/lppl.txt This work is "maintained" (as per LPPL maintenance status) by Andrew Stacey. -This work consists of the files tqft.dtx, - tqft_doc.tex, -and the derived files tqft.ins, +This work consists of the files tqft_code.dtx, + tqft.tex, +and the derived files tqft_code.ins, + tqft_code.pdf, tqft.pdf, - tqft_doc.pdf, tqft.sty, and tikzlibrarytqft.code.tex. \endpostamble \usedir{tex/latex/tqft} \generate{ - \file{\jobname.sty}{\from{\jobname.dtx}{package}} + \file{tqft.sty}{\from{\jobname.dtx}{package}} } \usedir{tex/latex/tqft} \generate{ - \file{tikzlibrary\jobname.code.tex}{\from{\jobname.dtx}{library}} + \file{tikzlibrarytqft.code.tex}{\from{\jobname.dtx}{library}} } \endbatchfile %% -%% Copyright (C) 2011 by Andrew Stacey <loopspace@mathforge.org> +%% Copyright (C) 2011-2024 by Andrew Stacey <loopspace@mathforge.org> %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License (LPPL), either @@ -70,13 +70,13 @@ and the derived files tqft.ins, %% This work is "maintained" (as per LPPL maintenance status) by %% Andrew Stacey. %% -%% This work consists of the files tqft.dtx, -%% tqft_doc.tex, -%% and the derived files tqft.ins, +%% This work consists of the files tqft_code.dtx, +%% tqft.tex, +%% and the derived files tqft_code.ins, +%% tqft_code.pdf, %% tqft.pdf, -%% tqft_doc.pdf, %% tqft.sty, and %% tikzlibrarytqft.code.tex. %% %% -%% End of file `tqft.ins'. +%% End of file `tqft_code.ins'. diff --git a/Master/texmf-dist/tex/latex/tqft/tikzlibrarytqft.code.tex b/Master/texmf-dist/tex/latex/tqft/tikzlibrarytqft.code.tex index 8eb6cdae31b..e97880fece0 100644 --- a/Master/texmf-dist/tex/latex/tqft/tikzlibrarytqft.code.tex +++ b/Master/texmf-dist/tex/latex/tqft/tikzlibrarytqft.code.tex @@ -4,14 +4,15 @@ %% %% The original source files were: %% -%% tqft.dtx (with options: `library') +%% tqft_code.dtx (with options: `library') %% ---------------------------------------------------------------- -%% tqft --- a library for drawing TQFT diagrams with TikZ/PGF +%% tqft --- a TikZ library for drawing TQFT diagrams %% E-mail: loopspace@mathforge.org %% Released under the LaTeX Project Public License v1.3c or later %% See http://www.latex-project.org/lppl.txt %% ---------------------------------------------------------------- %% +\ProvidesFile{tikzlibrarytqft.code.tex}[2024/05/31 v2.3 Tikz/PGF commands for drawing TQFT diagrams] \ifcsname pgfk@/handlers/.pic/.@cmd\endcsname \else \pgfwarning{This library only works with TikZ 3.0 or later; for earlier versions of TikZ use the TQFT package} @@ -20,6 +21,7 @@ \def\pgf@tqft@minus{-} \let\pgf@tqft@upper\@empty \let\pgf@tqft@lower\pgf@tqft@minus +\newif\iftqft@twisted \def\tqft@split(#1,#2){% \pgfmathsetmacro\tqft@y{#2 * (-\tqft@val{cobordism height})}% \pgfmathsetmacro\tqft@x{(#1 - 1 + max(min(#2,1),0)*\tqft@val{offset}) * \tqft@val{boundary separation}}% @@ -61,6 +63,7 @@ \let\pgf@tqft@lower\pgf@tqft@minus \let\pgf@tqft@upper\@empty }, + twisted/.is if=tqft@twisted, anchor/.initial = none, pair of pants/.style={ /tikz/tqft, @@ -138,6 +141,13 @@ \global\let\tqft@cobdrylist=\pgfutil@gobble \global\let\tqft@robdrylist=\pgfutil@gobble \global\let\tqft@rcobdrylist=\pgfutil@gobble + \iftqft@twisted + \pgfmathsetmacro\tqft@outgoing@end{0}% + \pgfmathsetmacro\tqft@outgoing@dir{-1}% + \else + \pgfmathsetmacro\tqft@outgoing@end{1}% + \pgfmathsetmacro\tqft@outgoing@dir{1}% + \fi \ifnum\tqft@val{incoming boundary components}>0\relax \xdef\tqft@fullpath{% \tqft@fullpath @@ -182,7 +192,10 @@ \fi \fi \ifnum\tqft@val{outgoing boundary components}>0\relax - \pgfmathsetmacro\xppos{(\tqft@val{outgoing boundary components} -1+\tqft@val{offset}) * \tqft@val{boundary separation} +\tqft@val{circle x radius}}% + \pgfmathsetmacro\xppos{% + (\tqft@outgoing@end * (\tqft@val{outgoing boundary components} -1) + + \tqft@val{offset}) * \tqft@val{boundary separation} + + \tqft@outgoing@dir * \tqft@val{circle x radius}}% \pgfmathsetmacro\tqft@ht{abs(\tqft@val{incoming boundary components} - \tqft@val{outgoing boundary components} - \tqft@val{offset})}% \pgfmathsetmacro\tqft@ht{1/3 + 2/3*\tqft@ht/(\tqft@ht + 1)}% \xdef\tqft@fullpath{% @@ -205,35 +218,38 @@ .. controls +(0,-\tqft@ht*\tqft@val{cobordism height}) and +(0,-\tqft@ht*\tqft@val{cobordism height}) .. (-\tqft@val{circle x radius},0) }% \xdef\tqft@blist{% - \tqft@blist,between first incoming and last incoming/incoming and outgoing/{% + \tqft@blist,between first and last incoming/incoming and outgoing/{% (\tqft@val{incoming boundary components} * \tqft@val{boundary separation} + \tqft@val{circle x radius} - \tqft@val{boundary separation},0pt) .. controls +(0,-\tqft@ht*\tqft@val{cobordism height}) and +(0,-\tqft@ht*\tqft@val{cobordism height}) .. (-\tqft@val{circle x radius},0)} }% \pgfmathsetmacro\xppos{(\tqft@val{incoming boundary components} -1) * \tqft@val{boundary separation}/2}% \xdef\tqft@clist{% - \tqft@clist,-between first incoming and last incoming/{(\xppos pt,-\tqft@ht*\tqft@val{cobordism height}*3/4)}% + \tqft@clist,-between first and last incoming/{(\xppos pt,-\tqft@ht*\tqft@val{cobordism height}*3/4)},-between first incoming and last incoming/{(\xppos pt,-\tqft@ht*\tqft@val{cobordism height}*3/4)}% }% \fi \else \ifnum\tqft@val{outgoing boundary components}>0\relax - \pgfmathsetmacro\xppos{(\tqft@val{outgoing boundary components} -1+\tqft@val{offset}) * \tqft@val{boundary separation} +\tqft@val{circle x radius}} + \pgfmathsetmacro\xppos{( \tqft@outgoing@end * (\tqft@val{outgoing boundary components} -1)+\tqft@val{offset}) * \tqft@val{boundary separation} + \tqft@outgoing@dir * \tqft@val{circle x radius}} \xdef\tqft@fullpath{% \tqft@fullpath (\xppos pt, -\tqft@val{cobordism height}) }% \fi \fi - \ifnum\tqft@val{outgoing boundary components}>0\relax - \pgfmathsetmacro\xppos{(\tqft@val{outgoing boundary components} -1+\tqft@val{offset}) * \tqft@val{boundary separation} -\tqft@val{circle x radius}}% + \ifnum\tqft@val{outgoing boundary components}>0\relax + \pgfmathsetmacro\xppos{% + ( \tqft@outgoing@end * (\tqft@val{outgoing boundary components} -1) + + \tqft@val{offset}) * \tqft@val{boundary separation} + - \tqft@outgoing@dir * \tqft@val{circle x radius}}% \xdef\tqft@fullpath{% \tqft@fullpath - arc[end angle=\pgf@tqft@upper180, start angle=0, x radius=\tqft@val{circle x radius}, y radius=\tqft@val{circle y radius}] + arc[end angle=\pgf@tqft@upper180, start angle=0, x radius=\tqft@outgoing@dir * \tqft@val{circle x radius}, y radius=\tqft@val{circle y radius}] }% \xdef\tqft@alist{% - \tqft@alist,-outgoing boundary \tqft@val{outgoing boundary components}/{(\xppos pt + \tqft@val{circle x radius},-\tqft@val{cobordism height})},-outgoing boundary/{(\tqft@val{offset}*\tqft@val{boundary separation},-\tqft@val{cobordism height})}% + \tqft@alist,-outgoing boundary \tqft@val{outgoing boundary components}/{(\xppos pt + \tqft@outgoing@dir * \tqft@val{circle x radius},-\tqft@val{cobordism height})},-outgoing boundary/{(\tqft@val{offset}*\tqft@val{boundary separation},-\tqft@val{cobordism height})}% }% \ifnum\tqft@val{outgoing boundary components}>1\relax - \foreach \k [evaluate=\k as \ok using int(\tqft@val{outgoing boundary components} - \k + 1)] in {2,...,\tqft@val{outgoing boundary components}} { + \foreach \k [evaluate=\k as \ok using int(\tqft@outgoing@end * (\tqft@val{outgoing boundary components} + 1) - \tqft@outgoing@dir * \k)] in {2,...,\tqft@val{outgoing boundary components}} { \edef\tqft@temp{\noexpand\pgfutil@in@{,\ok,}{,\tqft@val{skip outgoing boundary components},}} \tqft@temp \ifpgfutil@in@ @@ -246,15 +262,15 @@ \else \foreach \k [ remember=\k as \kmo (initially 1), - evaluate=\k as \xpos using (\tqft@val{outgoing boundary components} - \k + \tqft@val{offset})*\tqft@val{boundary separation} + \tqft@val{circle x radius}, + evaluate=\k as \xpos using ( \tqft@outgoing@end * (\tqft@val{outgoing boundary components} + 1) - 1 - \tqft@outgoing@dir * \k + \tqft@val{offset})*\tqft@val{boundary separation} + \tqft@outgoing@dir * \tqft@val{circle x radius}, ] in \tqft@obdrylist { - \pgfmathsetmacro\xppos{(\tqft@val{outgoing boundary components} - \kmo + \tqft@val{offset})*\tqft@val{boundary separation} - \tqft@val{circle x radius}} + \pgfmathsetmacro\xppos{(\tqft@outgoing@end * (\tqft@val{outgoing boundary components} + 1) - 1 - \tqft@outgoing@dir * \kmo + \tqft@val{offset})*\tqft@val{boundary separation} - \tqft@outgoing@dir * \tqft@val{circle x radius}} \pgfmathsetmacro\cpos{(\xpos + \xppos)/2} \pgfmathsetmacro\nk{int(\tqft@val{outgoing boundary components} - \k + 1)} \pgfmathsetmacro\nkpo{int(\tqft@val{outgoing boundary components} - \kmo + 1)} \xdef\tqft@fullpath{% \tqft@fullpath - .. controls +(0,\tqft@val{cobordism height}/3) and +(0,\tqft@val{cobordism height}/3) .. (\xpos pt,-\tqft@val{cobordism height}) arc[end angle=\pgf@tqft@upper180, start angle=0, x radius=\tqft@val{circle x radius}, y radius=\tqft@val{circle y radius}] + .. controls +(0,\tqft@val{cobordism height}/3) and +(0,\tqft@val{cobordism height}/3) .. (\xpos pt,-\tqft@val{cobordism height}) arc[end angle=\pgf@tqft@upper180, start angle=0, x radius=\tqft@outgoing@dir * \tqft@val{circle x radius}, y radius=\tqft@val{circle y radius}] }% \xdef\tqft@blist{% \tqft@blist,between outgoing \nk\space and \nkpo/outgoing/{% @@ -278,11 +294,11 @@ }% \xdef\tqft@blist{% \tqft@blist,between first incoming and first outgoing/incoming and outgoing/{% - (\tqft@val{offset} * \tqft@val{boundary separation} - \tqft@val{circle x radius},-\tqft@val{cobordism height}) + ({ ( (1 - \tqft@outgoing@end) * (\tqft@val{outgoing boundary components} - 1) + \tqft@val{offset}) * \tqft@val{boundary separation} - \tqft@outgoing@dir * \tqft@val{circle x radius}},-\tqft@val{cobordism height}) .. controls +(0,\tqft@ht*\tqft@val{cobordism height}) and +(0,-\tqft@ht*\tqft@val{cobordism height}) .. (-\tqft@val{circle x radius},0)}% }% \xdef\tqft@clist{% - \tqft@clist,-between first incoming and first outgoing/{(\tqft@val{offset}*\tqft@val{boundary separation}/2-\tqft@val{circle x radius},-\tqft@val{cobordism height}/2)}% + \tqft@clist,-between first incoming and first outgoing/{({ ( (1 - \tqft@outgoing@end) * (\tqft@val{outgoing boundary components} - 1) +\tqft@val{offset})*\tqft@val{boundary separation}/2- \tqft@outgoing@end * \tqft@val{circle x radius}},-\tqft@val{cobordism height}/2)}% }% \else \pgfmathsetmacro\xppos{(\tqft@val{outgoing boundary components} -1+\tqft@val{offset}) * \tqft@val{boundary separation} +\tqft@val{circle x radius}}% @@ -299,7 +315,7 @@ \pgfmathsetmacro\xppos{(\tqft@val{outgoing boundary components}/2 + \tqft@val{offset} -1/2) * \tqft@val{boundary separation}}% \pgfmathsetmacro\tqft@ht{1 -\tqft@ht*3/4}% \xdef\tqft@clist{% - \tqft@clist,-between first and last outgoing/{(\xppos pt,-\tqft@ht*\tqft@val{cobordism height})}% + \tqft@clist,-between first and last outgoing/{(\xppos pt,-\tqft@ht*\tqft@val{cobordism height})},-between first outgoing and last outgoing/{(\xppos pt,-\tqft@ht*\tqft@val{cobordism height})}% }% \fi \fi @@ -415,7 +431,8 @@ \xdef\tqft@ibdrylist{1,\tqft@ibdrylist} \fi \foreach[evaluate=\k as \xpos using (\k-1)*\tqft@val{boundary separation}] \k in \tqft@ibdrylist { - \node[ + \node[ + transform shape, node contents={}, ellipse, inner sep=0pt, @@ -432,7 +449,8 @@ \ifx\tqft@cibdrylist\pgfutil@gobble \else \foreach[evaluate=\k as \xpos using (\k-1)*\tqft@val{boundary separation}] \k in \tqft@cibdrylist { - \node[ + \node[ + transform shape, node contents={}, ellipse, inner sep=0pt, @@ -455,13 +473,14 @@ \else \xdef\tqft@obdrylist{1,\tqft@obdrylist} \fi -\foreach \k [evaluate=\k as \ok using int(\tqft@val{outgoing boundary components} - \k + 1)] in \tqft@obdrylist { +\foreach \k [evaluate=\k as \ok using int(\tqft@outgoing@end * (\tqft@val{outgoing boundary components} + 1) - \tqft@outgoing@dir * \k)] in \tqft@obdrylist { \xdef\tqft@robdrylist{\tqft@robdrylist,\ok} } \foreach[ evaluate=\k as \xpos using (\k-1+\tqft@val{offset})*\tqft@val{boundary separation} ] \k in \tqft@robdrylist { - \node[ + \node[ + transform shape, node contents={}, ellipse, inner sep=0pt, @@ -477,13 +496,15 @@ }% \ifx\tqft@cobdrylist\pgfutil@gobble \else -\foreach \k [evaluate=\k as \ok using int(\tqft@val{outgoing boundary components} - \k + 1)] in \tqft@cobdrylist { +\foreach \k[evaluate=\k as \ok using int(\tqft@outgoing@end * (\tqft@val{outgoing boundary components} + 1) - \tqft@outgoing@dir * \k)] + in \tqft@cobdrylist { \xdef\tqft@rcobdrylist{\tqft@rcobdrylist,\ok} } \foreach[ evaluate=\k as \xpos using (\k-1+\tqft@val{offset})*\tqft@val{boundary separation} ] \k in \tqft@rcobdrylist { - \node[ + \node[ + transform shape, node contents={}, ellipse, inner sep=0pt, @@ -586,7 +607,7 @@ } %% -%% Copyright (C) 2011 by Andrew Stacey <loopspace@mathforge.org> +%% Copyright (C) 2011-2024 by Andrew Stacey <loopspace@mathforge.org> %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License (LPPL), either @@ -598,11 +619,11 @@ %% This work is "maintained" (as per LPPL maintenance status) by %% Andrew Stacey. %% -%% This work consists of the files tqft.dtx, -%% tqft_doc.tex, -%% and the derived files tqft.ins, +%% This work consists of the files tqft_code.dtx, +%% tqft.tex, +%% and the derived files tqft_code.ins, +%% tqft_code.pdf, %% tqft.pdf, -%% tqft_doc.pdf, %% tqft.sty, and %% tikzlibrarytqft.code.tex. %% diff --git a/Master/texmf-dist/tex/latex/tqft/tqft.sty b/Master/texmf-dist/tex/latex/tqft/tqft.sty index 48d46c33b24..d665f1da33d 100644 --- a/Master/texmf-dist/tex/latex/tqft/tqft.sty +++ b/Master/texmf-dist/tex/latex/tqft/tqft.sty @@ -4,9 +4,9 @@ %% %% The original source files were: %% -%% tqft.dtx (with options: `package') +%% tqft_code.dtx (with options: `package') %% ---------------------------------------------------------------- -%% tqft --- a library for drawing TQFT diagrams with TikZ/PGF +%% tqft --- a TikZ library for drawing TQFT diagrams %% E-mail: loopspace@mathforge.org %% Released under the LaTeX Project Public License v1.3c or later %% See http://www.latex-project.org/lppl.txt @@ -752,7 +752,7 @@ } %% -%% Copyright (C) 2011 by Andrew Stacey <loopspace@mathforge.org> +%% Copyright (C) 2011-2024 by Andrew Stacey <loopspace@mathforge.org> %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License (LPPL), either @@ -764,11 +764,11 @@ %% This work is "maintained" (as per LPPL maintenance status) by %% Andrew Stacey. %% -%% This work consists of the files tqft.dtx, -%% tqft_doc.tex, -%% and the derived files tqft.ins, +%% This work consists of the files tqft_code.dtx, +%% tqft.tex, +%% and the derived files tqft_code.ins, +%% tqft_code.pdf, %% tqft.pdf, -%% tqft_doc.pdf, %% tqft.sty, and %% tikzlibrarytqft.code.tex. %% |