summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-09-13 22:55:30 +0000
committerKarl Berry <karl@freefriends.org>2011-09-13 22:55:30 +0000
commit1993bf742a4a04e823f0bbe5d8b90a6d103709f2 (patch)
tree8031a6fcbae38b06cb5624e1a3103b55386fbe76 /Master
parent737df2d11a464a5d565da5ac24076a08944d4221 (diff)
new tikz package tikz-cd (13sep11)
git-svn-id: svn://tug.org/texlive/trunk@23938 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/tikz-cd/README10
-rw-r--r--Master/texmf-dist/doc/latex/tikz-cd/pgfmanualstyle.sty238
-rw-r--r--Master/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.pdfbin0 -> 199688 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.tex219
-rw-r--r--Master/texmf-dist/tex/latex/tikz-cd/tikz-cd.sty329
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check3
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds1
-rw-r--r--Master/tlpkg/tlpsrc/collection-pictures.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/tikz-cd.tlpsrc0
9 files changed, 800 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/tikz-cd/README b/Master/texmf-dist/doc/latex/tikz-cd/README
new file mode 100644
index 00000000000..7d45e3acce1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tikz-cd/README
@@ -0,0 +1,10 @@
+Package Name: tikz-cd
+
+Author Name: Florêncio Neves
+
+License: LaTeX Project Public License and/or GNU Public License.
+
+Description: This package provides a set of macros to create
+commutative diagrams and other kinds of mathematical pictures using
+tikz. It also provides a set of arrow tips that match closely those
+of Computer Modern's mathematical symbols. \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/tikz-cd/pgfmanualstyle.sty b/Master/texmf-dist/doc/latex/tikz-cd/pgfmanualstyle.sty
new file mode 100644
index 00000000000..ff73284411d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tikz-cd/pgfmanualstyle.sty
@@ -0,0 +1,238 @@
+%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
+%
+% Copyright 2010 by Jakob Voss
+%
+% This file is based on works by Till Tantau. It contains additions and/or
+% modifications by Jakob Voss and Rouben Rostamian. It may be distributed
+% and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Free Documentation License.
+%
+% See the file LICENSE for more details.
+
+%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{pgfmanualstyle}[2010/01/24 v0.1 pgfmanualstyle]
+\RequirePackage{tikz}[2009/09/04]
+
+%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
+% code from pgfmanual-en-macros.tex
+%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
+\definecolor{graphicbackground}{rgb}{0.96,0.96,0.8}
+\definecolor{codebackground}{rgb}{0.8,0.8,1}
+
+\makeatletter
+
+\begingroup
+\catcode`|=0
+\catcode`[= 1
+\catcode`]=2
+\catcode`\{=12
+\catcode `\}=12
+\catcode`\\=12 |gdef|find@example#1\end{codeexample}[|endofcodeexample[#1]]
+|endgroup
+%
+\begingroup
+\catcode`\^=7
+\catcode`\^^M=13
+\catcode`\ =13%
+\gdef\returntospace{\catcode`\ =13\def {\space}\catcode`\^^M=13\def^^M{}}%
+\endgroup
+%
+\begingroup
+\catcode`\%=13
+\catcode`\^^M=13
+\gdef\commenthandler{\catcode`\%=13\def%{\@gobble@till@return}}
+\gdef\@gobble@till@return#1^^M{}
+\gdef\typesetcomment{\catcode`\%=13\def%{\@typeset@till@return}}
+\gdef\@typeset@till@return#1^^M{{\def%{\char`\%}\textsl{\char`\%#1}}\par}
+\endgroup
+%
+\define@key{codeexample}{width}{\setlength\codeexamplewidth{#1}}
+\define@key{codeexample}{graphic}{\colorlet{graphicbackground}{#1}}
+\define@key{codeexample}{code}{\colorlet{codebackground}{#1}}
+\define@key{codeexample}{execute code}{\csname code@execute#1\endcsname}
+\define@key{codeexample}{code only}[]{\code@executefalse}
+\define@key{codeexample}{pre}{\def\code@pre{#1}}
+\define@key{codeexample}{post}{\def\code@post{#1}}
+%
+\def\code@pre{}
+\def\code@post{}
+%
+\newdimen\finalcodeexamplewidth % XXX
+\newdimen\codeexamplewidth
+\newif\ifcode@execute
+\newbox\codeexamplebox
+\def\codeexample[#1]{%
+ \code@executetrue
+ \setlength\codeexamplewidth{4cm}%
+ \addtolength\codeexamplewidth{7pt}%
+ \setkeys{codeexample}{#1}%
+ \parindent0pt
+ \begingroup%
+ \par%
+ \medskip%
+ \let\do\@makeother%
+ \dospecials%
+ \obeylines%
+ \@vobeyspaces%
+ \catcode`\%=13%
+ \catcode`\^^M=13%
+ \find@example}
+\def\endofcodeexample#1{%
+ \endgroup%
+ \ifcode@execute%
+ \setbox\codeexamplebox=\hbox{%
+ {%
+ {%
+ \returntospace%
+ \commenthandler%
+ \xdef\code@temp{#1}% removes returns and comments
+ }%
+ \colorbox{graphicbackground}{\color{black}\ignorespaces%
+ \code@pre\expandafter\scantokens\expandafter{\code@temp\ignorespaces}\code@post\ignorespaces}%
+ }%
+ }%
+ \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}% XXX
+ \setlength\finalcodeexamplewidth{\linewidth} % XXX
+ \addtolength\finalcodeexamplewidth{-6pt} % XXX
+ \def\code@end{}%
+ \else%
+ \def\code@start{%
+ \linewidth=\textwidth%
+ \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}% XXX
+ \setlength\finalcodeexamplewidth{\linewidth} % XXX
+ \addtolength\finalcodeexamplewidth{-12pt} % XXX
+ \addtolength\finalcodeexamplewidth{-\codeexamplewidth} % XXX
+ \def\code@end{\egroup}%
+ \fi%
+ \code@start%
+ \noindent%
+ \begin{minipage}[t]{\codeexamplewidth}\raggedright
+ \hrule width0pt%
+ \footnotesize\vskip-1em%
+ \code@flushstart\box\codeexamplebox\code@flushend%
+ \vskip-1ex
+ \leavevmode%
+ \end{minipage}%
+ \else%
+ \def\code@mid{\par}
+ %\def\code@width{\linewidth-6pt}% XXX
+ \setlength\finalcodeexamplewidth{\linewidth} % XXX
+ \addtolength\finalcodeexamplewidth{-6pt} % XXX
+ \def\code@end{}
+ \fi%
+ \code@mid%
+ \colorbox{codebackground}{%
+% \begin{minipage}[t]{\code@width}% XXX
+ \begin{minipage}[t]{\the\finalcodeexamplewidth}%
+ {%
+ \let\do\@makeother
+ \dospecials
+ \frenchspacing\@vobeyspaces
+ \normalfont\ttfamily\footnotesize
+ \typesetcomment%
+ \@tempswafalse
+ \def\par{%
+ \if@tempswa
+ \leavevmode \null \@@par\penalty\interlinepenalty
+ \else
+ \@tempswatrue
+ \ifhmode\@@par\penalty\interlinepenalty\fi
+ \fi}%
+ \obeylines
+ \everypar \expandafter{\the\everypar \unpenalty}%
+ #1}
+ \end{minipage}}%
+ \code@end%
+ \par%
+ \medskip
+ \end{codeexample}
+}
+
+\def\endcodeexample{}
+
+
+%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
+% code from various pgf/tikz source files and own modifications or additions
+%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
+
+\newenvironment{pgfmanualentry}{\list{}{\leftmargin=2em\itemindent-\leftmargin\def\makelabel##1{\hss##1}}}{\endlist}
+\newcommand\pgfmanualentryheadline[1]{\itemsep=0pt\parskip=0pt\item\strut{#1}\par\topsep=0pt}
+\newcommand\pgfmanualbody{\parskip3pt}
+
+\definecolor{darkred}{rgb}{0.75,0,0}
+\definecolor{green}{rgb}{0,.75,0}
+
+\def\bschar{{\char`\\}}
+
+\newcommand{\stylekeyheadline}[2][\pgfutil@empty]{%
+ \pgfmanualentryheadline{\texttt{\color{darkred}/tikz/#2}%
+ \def\pgf@test{#1}%
+ \ifx\pgf@test\pgfutil@empty%
+ \else%
+ \texttt{=}#1%
+ \fi%
+ \index{#2@\texttt{#2} key}}%
+}
+
+\newenvironment{stylekey}[2][]{
+ \begin{pgfmanualentry}
+ \stylekeyheadline[#1]{#2}
+ \pgfmanualbody
+}{
+ \end{pgfmanualentry}
+}
+\newcommand{\commandentry}[2][]{%
+ \texttt{\color{darkred}\textbackslash #2}#1%
+ \index{#2@\texttt{\textbackslash #2}}
+}
+\newenvironment{command}[2][]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{\commandentry{#2}{#1}}
+ \pgfmanualbody
+}{
+ \end{pgfmanualentry}
+}
+\newcommand\arrowtip[1]{
+ \texttt{#1}\index{Arrow tips!mandatory@\protect\texttt{mandatory}}%
+}
+
+\newcommand{\opt}[1]{\color{green}#1}
+\newcommand{\meta}[1]{$\langle$\textit{#1}$\rangle$}
+\newcommand{\marg}[1]{\texttt{\textbraceleft}\meta{#1}\texttt{\textbraceright}}
+\newcommand{\oarg}[1]{\texttt{\textbraceleft} \texttt{\textbraceright}}
+
+% Global styles:
+\tikzset{
+ shape example/.style={
+ color=black!30,
+ draw,
+ fill=yellow!30,
+ line width=.25cm, % .5
+ inner xsep=1.25cm, % 2.5
+ inner ysep=0.25cm} % 0.5
+}
+
+\def\tikzname{Ti\emph{k}Z}
+
+\makeatother
+
+%%% Enable '|' to type verbatim
+
+\usepackage{fancyvrb}
+\DefineShortVerb{\|}
+
+%<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
+\endinput
diff --git a/Master/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.pdf b/Master/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.pdf
new file mode 100644
index 00000000000..f61f2bd0bcd
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.tex b/Master/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.tex
new file mode 100644
index 00000000000..3d929a2c55c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.tex
@@ -0,0 +1,219 @@
+\documentclass{article}
+\usepackage[utf8]{inputenc}
+\usepackage{amsmath,tikz-cd}
+\usepackage{pgfmanualstyle}
+\usepackage{hyperref}
+
+\hypersetup{pdftitle={The tikz-cd package},
+ pdfauthor={Florêncio Neves},
+ pdfkeywords={commutative diagrams, latex, tikz, pgf},
+ colorlinks
+ }
+
+\title{The \texttt{tikz-cd} package}
+\author{\normalsize Florêncio Neves\footnote{\emph{E-mail:} \href{mailto:florencioneves@gmail.com}{\texttt{florencioneves@gmail.com}}}}
+\date{\normalsize Version 0.1\footnote{\color{red}This is a preliminary version. Future versions may not be backwards-compatible. Comments are welcome.}}
+
+\makeatletter
+\definecolor{graphicbackground}{rgb}{0.96,0.96,0.8}
+\def\tikzcd@bgcolor{graphicbackground}
+\makeatother
+
+\newcommand{\displayarrow}[2][]{\texttt{#2} & yelds \tikz[baseline=-2.5pt] \draw[#2-#2, line width=0.44pt, #1] (0,0) -- (1,0);}
+\newcommand{\displayarrowstyle}[2][]{\texttt{#2} & yelds \tikz[baseline=-2.5pt] \draw[/commutative diagrams/current arrows, #2, #1] (0,0) -- (0.4,0);}
+
+\begin{document}
+\maketitle
+
+The general-purpose drawing package \tikzname{} can be used to typeset
+commutative diagrams and other kinds of mathematical pictures,
+generating high-quality results (see for example \cite{lenders} or
+\cite{milne}). The purpose of this package is to make the process of
+creation of such diagrams easier by providing a convenient set of
+macros and reasonable default settings. This package also includes an
+arrow tip library that match closely the arrows present in the
+Computer Modern typeface.
+
+PGF version 2.10 is required.
+
+\tableofcontents
+
+\section{Basic usage}
+\label{sec:basic-usage}
+
+Commutative diagrams are created with the |tikzcd| environment. Its
+content describes a matrix, like the |\matrix| command in \tikzname{}
+or the |align| environment in \LaTeX. Everything is typeset in math
+mode, but you will probably want use \texttt{tikzcd} inside an
+|equation| environment or inside |\[ \]|, so that the diagram will be
+placed on a new line and centered.
+
+\subsection{Inserting arrows}
+\label{sec:inserting-arrows}
+
+Inside the |tikzcd| environment, the command |\arrow| is provided to
+allow insertion of arrows. In its simplest form, it takes one
+argument, a string containing the characters |l|, |r|, |u| or |d|,
+standing for left, right, up and down, that determine the arrow
+target. A label can be placed on this arrow by providing a second
+argument.
+\begin{codeexample}[]
+ \begin{tikzcd}
+ A \arrow{ld} \arrow{l}{\phi} & B \\
+ & C
+ \end{tikzcd}
+\end{codeexample}
+
+You can control the behavior of the arrow by placing an argument
+inside square braces before the direction parameter. It may contain
+anything that can be passed as an argument to a \tikzname{}'s |edge|
+operator. Similarly, the label can be modified by an argument in
+square braces right before it. It may contain anything that can be
+passed to a |node| operator.
+\begin{codeexample}[]
+\begin{tikzcd}
+ A \arrow{l}{\psi} \arrow[color=red]{d}
+ & B \arrow{d}[color=red]{\psi} \\
+ C \arrow[color=red]{l}[color=blue]{\eta}
+ & D
+\end{tikzcd}
+\end{codeexample}
+
+If you want to save typing, the command |\ar| is provided as a
+shortcut to |\arrow|. There are also commands |\lar|, |\rar|, |\uar|
+and |\dar|, that act like |\arrow{l}|, |\arrow{r}| and so forth. They
+can take up to three optional argument:\ one in square braces to
+control the arrow, one in square braces to control the label, and one
+in curly braces to specify a label. Thus, the previous diagram can be
+rewritten as follows.
+\begin{codeexample}[]
+\begin{tikzcd}
+ A \lar{\psi} \dar[color=red]
+ & B \dar[color=red]{\psi} \\
+ C \lar[color=red][color=blue]{\eta}
+ & D
+\end{tikzcd}
+\end{codeexample}
+
+\subsection{Changing arrow tips}
+\label{sec:changing-arrow-tips}
+
+If you are familiar with \tikzname, you certainly noticed that you can
+produce different kids of arrows by passing arguments like |right hook->|
+to the |\arrow| command. This package provides an alternative
+way of doing this. Namely, there are styles named after \LaTeX{}
+arrow producing commands for this purpose. Thus, instead of
+|\arrow[right hook->]{l}|, you can use |\arrow[hookrightarrow]{l}|, as
+in the example below.
+\begin{codeexample}[]
+ \begin{tikzcd}
+ X \arrow[hookrightarrow]{l} \arrow[dashed]{ld}
+ & \bar{X} \arrow{d}\\
+ & Y
+ \end{tikzcd}
+\end{codeexample}
+
+The complete list of arrow types available so far is given below. It
+will be made comprehensive in the future.
+
+\begin{tabular}{ll}
+ \displayarrowstyle{rightarrow}\\
+ \displayarrowstyle{leftarrow}\\
+ \displayarrowstyle{hookrightarrow}\\
+ \displayarrowstyle{hookleftarrow}\\
+ \displayarrowstyle{hookrightarrow}\\
+ \displayarrowstyle{rightharpoonup}\\
+ \displayarrowstyle{rightharpoondown}\\
+ \displayarrowstyle{leftharpoonup}\\
+ \displayarrowstyle{leftharpoondown}\\
+\end{tabular}
+
+\section{Changing the appearance of diagrams}
+\label{sec:chang-appe-diagr}
+
+In the future, a customization scheme using |pgfkeys| will be implemented. For now, you can change the appearance of diagrams by understanding some of |tikz-cd|'s internals. The |tikzcd| environment generates codes with the following basic structure:
+\begin{codeexample}[code only]
+ \begin{tikzpicture}[ ... ]
+ \matrix (m) [ ... ] {
+ & ... & \\
+ & ... & \\};
+ \path[ ... ] ...;
+ \end{tikzpicture}
+\end{codeexample}
+There are styles
+\begin{quote}
+|/commutative diagrams/picture style|,\\
+|/commutative diagrams/matrix style|, and\\
+|/commutative diagrams/path style|\\
+\end{quote}
+that are applied at the relevant places. By appending things to these styles, you can control the behavior of diagrams quite arbitrarily. The arrow tip styles are stored in |/commutative diagrams/current arrows|.
+
+
+\section{Computer Modern arrow tips}
+\label{sec:comp-modern-arrow}
+
+By using the mechanism explained in \S\ref{sec:changing-arrow-tips}, it is not necessary to know the technical details in this section.
+
+The naming scheme of the Computer Modern-like arrow tips provided by this package follows that of |pgf|'s |arrows| library, as described in Section 23 of the |pgf| manual. You can of course use these arrow tips outside the |tikzcd| environment; in this case, you will probably want to know that in order to match the Computer Modern font at size $10\,\mathrm{pt}$, it is necessary to set \texttt{line width} to $0.4\,\mathrm{pt}$; for larger font sizes, scale this parameter accordingly.
+
+
+\begin{description}
+\item[Basic arrow tips]\ \\
+\begin{tabular}{ll}
+ \displayarrow{cm to}\\
+ \displayarrow{cm to reversed}\\
+ \displayarrow[line width=0.66pt]{cm bold to} (with a line 50\% thicker)\\
+ \texttt{cm \char`\|} & yelds \tikz[baseline=-2.5pt] \draw[cm |-cm |, line width=0.44pt] (0,0) -- (1,0);\\
+ \displayarrow{cm o}\\
+ \displayarrow{cm *}\\
+ \displayarrow{cm cap}\\
+\end{tabular}
+
+\item[Hooks]\ \\
+\begin{tabular}{ll}
+ \displayarrow{cm left hook}\\
+ \displayarrow{cm right hook}\\
+\end{tabular}
+
+
+\item[Double arrow tips]\ \\
+\begin{tabular}{ll}
+ \displayarrow{cm double to}\\
+ \displayarrow{cm double to reversed}\\
+\end{tabular}
+
+\item[Partial arrow tips]\ \\
+\begin{tabular}{ll}
+ \displayarrow{cm left to}\\
+ \displayarrow{cm left to reversed}\\
+ \displayarrow{cm right to}\\
+ \displayarrow{cm right to reversed}\\
+\end{tabular}
+\end{description}
+
+\section{Some examples}
+\label{sec:some-examples}
+
+The following example is taken from \cite{milne}.
+\begin{codeexample}[]
+\begin{tikzcd}
+ T
+ \arrow[bend left]{dll}{x}
+ \arrow[bend right]{ddl}{y}
+ \arrow[dotted]{dl}[description]{(x,y)} & & \\
+ & X \times_Z Y \arrow{l}{p} \arrow{d}{q} & X \arrow{d}{f} \\
+ & Y \arrow{l}{g} & Z
+\end{tikzcd}
+\end{codeexample}
+
+\begin{thebibliography}{9}
+\bibitem{lenders}
+ Felix Lenders,
+ \emph{Commutative diagrams using TikZ}.
+ Available at \url{http://www.felixl.de/commu.pdf}.
+\bibitem{milne}
+ James Milne,
+ \emph{Guide to commutative diagrams}.
+ Available at \url{http://www.jmilne.org/not/CDGuide.html}.
+\end{thebibliography}
+\end{document}
diff --git a/Master/texmf-dist/tex/latex/tikz-cd/tikz-cd.sty b/Master/texmf-dist/tex/latex/tikz-cd/tikz-cd.sty
new file mode 100644
index 00000000000..e0d8d1546de
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/tikz-cd/tikz-cd.sty
@@ -0,0 +1,329 @@
+% Copyright 2011 by Florêncio Neves
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+\ProvidesPackage{tikz-cd}[2011/09/12 v0.1 Macros for creation of commutative diagrams with tikz.]
+\RequirePackage{tikz}
+
+\usepgfmodule{parser}
+\usetikzlibrary{matrix}
+\usepgflibrary{arrows}
+
+\pgfkeys{%
+ /commutative diagrams/picture style/.style={
+ baseline=(current bounding box.base)},
+ /commutative diagrams/matrix style/.style={
+ matrix of math nodes,
+ row sep=6ex,
+ column sep=6ex,
+ text height=1.5ex,
+ text depth=0.25ex},
+ /commutative diagrams/path style/.style={
+ font=\scriptsize,
+ auto,
+ description/.style={
+ anchor=center,fill=\tikzcd@bgcolor,inner sep=2pt}},
+ /commutative diagrams/current arrows/.style={
+ rightarrow/.style={cm cap-cm to},
+ leftarrow/.style={cm to-cm cap},
+ mapsto/.style={cm |-cm to},
+ hookrightarrow/.style={cm right hook-cm to},
+ hookleftarrow/.style={cm to-cm left hook},
+ rightharpoonup/.style={cm cap-cm left to},
+ rightharpoondown/.style={cm cap-cm right to},
+ leftharpoonup/.style={cm right to-cm cap},
+ leftharpoondown/.style={cm left to-cm cap},
+ line width=0.09285ex,
+ rightarrow}}
+
+\def\tikzcd@bgcolor{white}
+
+\makeatletter
+
+\newcount\tikzcd@currcol
+\newcount\tikzcd@currrow
+\newcount\tikzcd@destrow
+\newcount\tikzcd@destcol
+
+%The arrow commands and its parser
+\def\tikzcd@arrow{%
+ \let\tikzcd@ar@edgeopt\empty%
+ \let\tikzcd@ar@node\empty%
+ \let\tikzcd@ar@nodeopt\empty%
+ \tikzcd@destcol\tikzcd@currcol%
+ \tikzcd@destrow\tikzcd@currrow%
+ \global\edef\tikzcd@patharg{\tikzcd@patharg %
+ (m-\the\tikzcd@currrow-\the\tikzcd@currcol) }%
+ \futurelet\next\tikzcd@arrowb}
+\def\tikzcd@arrowb{%
+ \ifx[\next\expandafter\tikzcd@arrowi\else%
+ \expandafter\tikzcd@arrowii\fi}
+\def\tikzcd@arrowi[#1]{%
+ \def\tikzcd@ar@edgeopt{[#1]}%
+ \tikzcd@arrowii}
+\def\tikzcd@arrowii#1{%
+ \pgfparserparse{tikzmd@parser}#1*%
+ \futurelet\next\tikzcd@arrowiii}
+\def\tikzcd@arrowiii{%
+ \ifx[\next\expandafter\tikzcd@arrowiv%
+ \else\expandafter\tikzcd@arrowv\fi}
+\def\tikzcd@arrowiv[#1]{%
+ \def\tikzcd@ar@nodeopt{[#1]}%
+ \futurelet\next\tikzcd@arrowv}
+\def\tikzcd@arrowv{%
+ \ifx\next\bgroup\expandafter\tikzcd@arrowvi%
+ \else\tikzcd@arrowvii\fi}
+\def\tikzcd@arrowvi#1{%
+ \def\tikzcd@ar@node{ node\tikzcd@ar@nodeopt{$#1$}}%
+ \tikzcd@arrowvii}
+\def\tikzcd@arrowvii{
+ \global\edef\tikzcd@patharg{\tikzcd@patharg %
+ edge\tikzcd@ar@edgeopt \tikzcd@ar@node %
+ (m-\the\tikzcd@destrow-\the\tikzcd@destcol)}%
+}
+
+\def\tikzcd@lar{%
+ \tikzcd@destcol\tikzcd@currcol%
+ \tikzcd@destrow\tikzcd@currrow%
+ \advance\tikzcd@destcol by1\relax%
+ \futurelet\next\tikzcd@xar}
+\def\tikzcd@rar{%
+ \tikzcd@destcol\tikzcd@currcol%
+ \tikzcd@destrow\tikzcd@currrow%
+ \advance\tikzcd@destcol by-1\relax%
+ \futurelet\next\tikzcd@xar}
+\def\tikzcd@dar{%
+ \tikzcd@destcol\tikzcd@currcol%
+ \tikzcd@destrow\tikzcd@currrow%
+ \advance\tikzcd@destrow by1\relax%
+ \futurelet\next\tikzcd@xar}
+\def\tikzcd@uar{%
+ \tikzcd@destcol\tikzcd@currcol%
+ \tikzcd@destrow\tikzcd@currrow%
+ \advance\tikzcd@destrow by-1\relax%
+ \futurelet\next\tikzcd@xar}
+\def\tikzcd@xar{%
+ \let\tikzcd@ar@edgeopt\empty%
+ \let\tikzcd@ar@node\empty%
+ \let\tikzcd@ar@nodeopt\empty%
+ \global\edef\tikzcd@patharg{\tikzcd@patharg %
+ (m-\the\tikzcd@currrow-\the\tikzcd@currcol) }%
+ \ifx[\next\expandafter\tikzcd@xari%
+ \else\expandafter\tikzcd@xarii\fi}
+\def\tikzcd@xari[#1]{%
+ \def\tikzcd@ar@edgeopt{[#1]}%
+ \futurelet\next\tikzcd@xarii}
+\def\tikzcd@xarii{%
+ \ifx\next\bgroup\expandafter\tikzcd@arrowvi%
+ \else\expandafter\tikzcd@xariii\fi}
+\def\tikzcd@xariii{%
+ \ifx[\next\expandafter\tikzcd@arrowiv%
+ \else\tikzcd@arrowvii\fi}
+
+\pgfparserdef{tikzmd@parser}{initial}{the letter l}
+{\advance\tikzcd@destcol by1\relax}
+\pgfparserdef{tikzmd@parser}{initial}{the letter r}
+{\advance\tikzcd@destcol by-1\relax}
+\pgfparserdef{tikzmd@parser}{initial}{the letter d}
+{\advance\tikzcd@destrow by1\relax}
+\pgfparserdef{tikzmd@parser}{initial}{the letter u}
+{\advance\tikzcd@destrow by-1\relax}
+\pgfparserdef{tikzmd@parser}{initial}{the character *}
+{\pgfparserswitch{final}}
+
+%Diagram environment
+\def\tikzcd{%
+ \tikzpicture[/commutative diagrams/picture style]%
+ \let\tikzcd@patharg\empty%
+ \let\arrow\tikzcd@arrow%
+ \let\ar\tikzcd@arrow%
+ \let\lar\tikzcd@lar%
+ \let\rar\tikzcd@rar%
+ \let\dar\tikzcd@dar%
+ \let\uar\tikzcd@uar%
+ \matrix (m) [/commutative diagrams/matrix style,%
+ execute at begin cell=%
+ \tikzcd@currcol\pgfmatrixcurrentcolumn%
+ \tikzcd@currrow\pgfmatrixcurrentrow]\bgroup%
+}
+
+\def\endtikzcd{%
+ \\\egroup;%
+ \path[/commutative diagrams/path style,%
+ /commutative diagrams/current arrows]%
+ \tikzcd@patharg ;%
+ %\typeout{\tikzcd@patharg}
+ \endtikzpicture%
+}
+
+%Computer modern arrow tips
+\pgfarrowsdeclare{cm to}{cm to}
+{
+ \pgfarrowsleftextend{-5.833\pgflinewidth}
+ \pgfarrowsrightextend{0.5\pgflinewidth}
+}
+{
+ \pgfutil@tempdima=\pgflinewidth
+ \pgfsetdash{}{+0pt}
+ \pgfsetroundcap
+ \pgfsetroundjoin
+ \pgfpathmoveto{\pgfqpoint{-5.333\pgfutil@tempdima}{6\pgfutil@tempdima}}
+ \pgfpathcurveto
+ {\pgfqpoint{-4.2\pgfutil@tempdima}{2.5\pgfutil@tempdima}}
+ {\pgfqpoint{-2.133\pgfutil@tempdima}{0.6\pgfutil@tempdima}}
+ {\pgfpointorigin}
+ \pgfpathcurveto
+ {\pgfqpoint{-2.133\pgfutil@tempdima}{-0.6\pgfutil@tempdima}}
+ {\pgfqpoint{-4.2\pgfutil@tempdima}{-2.5\pgfutil@tempdima}}
+ {\pgfqpoint{-5.333\pgfutil@tempdima}{-6\pgfutil@tempdima}}
+ \pgfusepathqstroke
+}
+
+\pgfarrowsdeclare{cm bold to}{cm bold to}
+{
+ \pgfarrowsleftextend{-4.055\pgflinewidth}
+ \pgfarrowsrightextend{0.5\pgflinewidth}
+}
+{
+ \pgfutil@tempdima=0.667\pgflinewidth
+ \pgfsetdash{}{+0pt}
+ \pgfsetroundcap
+ \pgfsetroundjoin
+ \pgfpathmoveto{\pgfqpoint{-5.333\pgfutil@tempdima}{6\pgfutil@tempdima}}
+ \pgfpathcurveto
+ {\pgfqpoint{-4.2\pgfutil@tempdima}{2.5\pgfutil@tempdima}}
+ {\pgfqpoint{-2.133\pgfutil@tempdima}{0.6\pgfutil@tempdima}}
+ {\pgfpointorigin}
+ \pgfpathcurveto
+ {\pgfqpoint{-2.133\pgfutil@tempdima}{-0.6\pgfutil@tempdima}}
+ {\pgfqpoint{-4.2\pgfutil@tempdima}{-2.5\pgfutil@tempdima}}
+ {\pgfqpoint{-5.333\pgfutil@tempdima}{-6\pgfutil@tempdima}}
+ \pgfusepathqstroke
+}
+
+\pgfarrowsdeclare{cm left to}{cm left to}
+{
+ \pgfarrowsleftextend{-5.833\pgflinewidth}
+ \pgfarrowsrightextend{0.5\pgflinewidth}
+}
+{
+ \pgfutil@tempdima=\pgflinewidth
+ \pgfsetdash{}{+0pt}
+ \pgfsetroundcap
+ \pgfsetroundjoin
+ \pgfpathmoveto{\pgfqpoint{-5.333\pgfutil@tempdima}{6\pgfutil@tempdima}}
+ \pgfpathcurveto
+ {\pgfqpoint{-4.2\pgfutil@tempdima}{2.5\pgfutil@tempdima}}
+ {\pgfqpoint{-2.133\pgfutil@tempdima}{0.6\pgfutil@tempdima}}
+ {\pgfpointorigin}
+ \pgfusepathqstroke
+}
+
+\pgfarrowsdeclare{cm right to}{cm right to}
+{
+ \pgfarrowsleftextend{-5.833\pgflinewidth}
+ \pgfarrowsrightextend{0.5\pgflinewidth}
+}
+{
+ \pgfutil@tempdima=\pgflinewidth
+ \pgfsetdash{}{+0pt}
+ \pgfsetroundcap
+ \pgfsetroundjoin
+ \pgfpathmoveto{\pgfpointorigin}
+ \pgfpathcurveto
+ {\pgfqpoint{-2.133\pgfutil@tempdima}{-0.6\pgfutil@tempdima}}
+ {\pgfqpoint{-4.2\pgfutil@tempdima}{-2.5\pgfutil@tempdima}}
+ {\pgfqpoint{-5.333\pgfutil@tempdima}{-6\pgfutil@tempdima}}
+ \pgfusepathqstroke
+}
+
+\pgfarrowsdeclare{cm |}{cm |}
+{
+ \pgfarrowsleftextend{-0.5\pgflinewidth}
+ \pgfarrowsrightextend{0.5\pgflinewidth}
+}
+{
+ \pgfsetdash{}{+0pt}
+ \pgfsetroundcap
+ \pgfpathmoveto{\pgfqpoint{0pt}{-4\pgflinewidth}}
+ \pgfpathlineto{\pgfqpoint{0pt}{4\pgflinewidth}}
+ \pgfusepathqstroke
+}
+
+\pgfarrowsdeclare{cm left hook}{cm left hook}
+{
+ \pgfarrowsleftextend{-0.5\pgflinewidth}
+ \pgfarrowsrightextend{3.5\pgflinewidth}
+}
+{
+ \pgfsetdash{}{+0pt}
+ \pgfsetroundcap
+ \pgfpathmoveto{\pgfqpoint{0pt}{4.667\pgflinewidth}}
+ \pgfpathcurveto
+ {\pgfqpoint{4\pgflinewidth}{4.667\pgflinewidth}}
+ {\pgfqpoint{4\pgflinewidth}{0pt}}
+ {\pgfpointorigin}
+ \pgfusepathqstroke
+}
+
+\pgfarrowsdeclare{cm right hook}{cm right hook}
+{
+ \pgfarrowsleftextend{-0.5\pgflinewidth}
+ \pgfarrowsrightextend{3.5\pgflinewidth}
+}
+{
+ \pgfsetdash{}{+0pt}
+ \pgfsetroundcap
+ \pgfpathmoveto{\pgfqpoint{0pt}{-4.667\pgflinewidth}}
+ \pgfpathcurveto
+ {\pgfqpoint{4\pgflinewidth}{-4.667\pgflinewidth}}
+ {\pgfqpoint{4\pgflinewidth}{0pt}}
+ {\pgfpointorigin}
+ \pgfusepathqstroke
+}
+
+\pgfarrowsdeclare{cm o}{cm o}
+{
+ \pgfarrowsleftextend{+-.5\pgflinewidth}
+ \pgfarrowsrightextend{7.167\pgflinewidth}
+}
+{
+ \pgfpathcircle{\pgfqpoint{3.333\pgflinewidth}{0pt}}{3.333\pgflinewidth}
+ \pgfusepathqstroke
+}
+
+\pgfarrowsdeclare{cm *}{cm *}
+{
+ \pgfarrowsleftextend{+-.5\pgflinewidth}
+ \pgfarrowsrightextend{7.167\pgflinewidth}
+}
+{
+ \pgfpathcircle{\pgfqpoint{3.333\pgflinewidth}{0pt}}{3.333\pgflinewidth}
+ \pgfusepathqfillstroke
+}
+
+\pgfarrowsdeclare{cm cap}{cm cap}
+{
+ \pgfarrowsleftextend{+0pt}
+ \pgfarrowsrightextend{+\pgflinewidth}
+}
+{
+ \pgfsetdash{}{+0pt}
+ \pgfsetroundcap
+ \pgfpathmoveto{\pgfpointorigin}
+ \pgfpathlineto{\pgfqpoint{0.5\pgflinewidth}{0pt}}
+ \pgfusepathqstroke
+}
+
+\pgfarrowsdeclarereversed{cm to reversed}{cm to reversed}{cm to}{cm to}
+\pgfarrowsdeclarereversed{cm left to reversed}{cm left to reversed}{cm left to}{cm left to}
+\pgfarrowsdeclarereversed{cm right to reversed}{cm right to reversed}{cm right to}{cm right to}
+
+\pgfarrowsdeclaredouble{cm double to}{cm double to}{cm to}{cm to}
+\pgfarrowsdeclaredouble{cm double to reversed}{cm double to reversed}{cm to reversed}{cm to reversed}
+
+\makeatother
+\endinput \ No newline at end of file
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 35f8240e646..eb13ca2883c 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -368,7 +368,8 @@ my @TLP_working = qw(
thailatex theoremref thesis-titlepage-fhac
thinsp thmbox thmtools threeddice threeparttable threeparttablex
thumb thumbpdf thumbs thumby thuthesis
- ticket tikz-3dplot tikz-inet tikz-qtree tikz-timing timetable tipa tipa-de
+ ticket tikz-cd tikz-3dplot tikz-inet tikz-qtree tikz-timing
+ timetable tipa tipa-de
titlefoot titlepages titlepic titleref titlesec titling
tkz-base tkz-berge tkz-doc tkz-euclide tkz-fct tkz-graph
tkz-linknodes tkz-orm tkz-tab
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index 74b81e6a2ab..53b441b5ab7 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -1255,6 +1255,7 @@ $standardtex='\.(.bx|cfg|sty|clo|ldf|cls|def|fd|cmap|4ht)$';
'thesis-titlepage-fhac', 'LOGO.*|' . $standardtex,
'threeparttable', '^..[^s].*\.sty', # not miscdoc.sty
'ticket', '\.tdf|' . $standardtex,
+ 'tikz-cd', 'tikz-cd.sty', # not pgfmanual.sty
'tikz-qtree', '(pgf|tikz-)(subpic|q?tree(-compat)?)\.(tex|sty)',
'tipa-de', 'NULL', # doc package
'titleref', '^..[^s].*\.sty', # not miscdoc.sty
diff --git a/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc b/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
index c0926a96b64..12b5f7f5ebf 100644
--- a/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
@@ -65,6 +65,7 @@ depend rviewport
depend schemabloc
depend swimgraf
depend texdraw
+depend tikz-cd
depend tikz-3dplot
depend tikz-inet
depend tikz-qtree
diff --git a/Master/tlpkg/tlpsrc/tikz-cd.tlpsrc b/Master/tlpkg/tlpsrc/tikz-cd.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/tikz-cd.tlpsrc