summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/tikz-cd/tikz-cd.sty372
1 files changed, 254 insertions, 118 deletions
diff --git a/Master/texmf-dist/tex/latex/tikz-cd/tikz-cd.sty b/Master/texmf-dist/tex/latex/tikz-cd/tikz-cd.sty
index bd5202c82d4..ff9eeabdbd4 100644
--- a/Master/texmf-dist/tex/latex/tikz-cd/tikz-cd.sty
+++ b/Master/texmf-dist/tex/latex/tikz-cd/tikz-cd.sty
@@ -5,21 +5,16 @@
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
-\ProvidesPackage{tikz-cd}[2012/03/18 v0.2b Commutative diagrams with tikz.]
+\ProvidesPackage{tikz-cd}[2012/07/17 v0.2c Commutative diagrams with tikz.]
\RequirePackage{tikz}
+\AtBeginDocument{% \fontdimen's can't be read reliably inside a tikzpicture
+ \setbox\pgfutil@tempboxa\hbox{$ $}%
+ \pgfmathparse{\the\fontdimen8\textfont3/1ex}\edef\tikzcdrulethickness{\pgfmathresult ex}%
+ \pgfmathparse{\the\fontdimen22\textfont2/1ex}\edef\tikzcdaxisheight{\pgfmathresult ex}}
\usetikzlibrary{matrix}
-\usepgflibrary{arrows}
-\usetikzlibrary{decorations.pathmorphing}
-
-\newtoks\tikzcd@temptoksa
-\newtoks\tikzcd@temptoksb
-\newtoks\tikzcd@temptoksc
\newif\iftikzcd@mathmode
-
-\newcount\tikzcd@currcol
-\newcount\tikzcd@currrow
\newcount\tikzcd@targetrow
\newcount\tikzcd@targetcol
@@ -58,13 +53,36 @@
\else\def\tikzcd@targetanchor{.#1}\fi},
arrow style/.is choice}
+% generic arrow tip selection styles
+\pgfqkeys{/tikz/commutative diagrams}{
+ dashrightarrow/.style={/tikz/commutative diagrams/.cd,rightarrow,dashed},
+ dashleftarrow/.style={/tikz/commutative diagrams/.cd,leftarrow,dashed},
+ rightsquigarrow/.style={
+ /tikz/commutative diagrams/.cd,rightarrow,squiggly},
+ leftsquigarrow/.style={/tikz/commutative diagrams/.cd,leftarrow,squiggly},
+ leftrightsquigarrow/.style={
+ /tikz/commutative diagrams/.cd,leftrightarrow,squiggly},
+ squiggly/.code={%
+ \expandafter\ifx\csname tikz@library@decorations.pathmorphing@loaded\endcsname\pgfutil@empty%
+ \else\PackageError{tikz-cd}{To use squiggly arrows, include %
+ \protect\usetikzlibrary{decorations.pathmorphing} in the document preamble}{}\fi},
+ squiggly/.append style={
+ decorate,
+ decoration={
+ zigzag,
+ segment length=4,
+ amplitude=.9,
+ post=lineto, post length=2pt,
+ pre=lineto, pre length=2pt}}}
+
% The Computer Modern arrow style
-\pgfkeys{/tikz/commutative diagrams/arrow style/computer modern/.style={
+\pgfqkeys{/tikz/commutative diagrams/arrow style}{
+ computer modern/.style={
/tikz/commutative diagrams/.cd,
default arrow/.style={
/tikz/line join=round,
/tikz/arrows=cm cap-cm to,
- /tikz/line width=0.0929ex},
+ /tikz/line width=\tikzcdrulethickness},
rightarrow/.style={/tikz/arrows=cm cap-cm to},
Rightarrow/.style={
/tikz/arrows=cm implies cap-cm implies,
@@ -84,17 +102,10 @@
rightharpoondown/.style={/tikz/arrows=cm cap-cm right to},
leftharpoonup/.style={/tikz/arrows=cm right to-cm cap},
leftharpoondown/.style={/tikz/arrows=cm left to-cm cap},
- dashrightarrow/.style={/tikz/commutative diagrams/.cd,rightarrow,dashed},
- dashleftarrow/.style={/tikz/commutative diagrams/.cd,leftarrow,dashed},
rightarrowtail/.style={/tikz/arrows=cm to reversed-cm to},
leftarrowtail/.style={/tikz/arrows=cm to-cm to reversed},
twoheadrightarrow/.style={/tikz/arrows=cm cap-cm double to},
twoheadleftarrow/.style={/tikz/arrows=cm double to-cm cap},
- rightsquigarrow/.style={
- /tikz/commutative diagrams/.cd,rightarrow,squiggly},
- leftsquigarrow/.style={/tikz/commutative diagrams/.cd,leftarrow,squiggly},
- leftrightsquigarrow/.style={
- /tikz/commutative diagrams/.cd,leftrightarrow,squiggly},
equals/.style={
/tikz/arrows=cm implies cap-cm implies cap,
/tikz/commutative diagrams/double line},
@@ -102,22 +113,18 @@
hook/.code={\pgfsetarrowsstart{cm right hook}},
two heads/.code={\pgfsetarrowsend{cm double to}},
tail/.code={\pgfsetarrowsstart{cm to reversed}},
- squiggly/.style={
- %http://tex.stackexchange.com/questions/12678/
- decorate,
- decoration={
- zigzag,
- segment length=4,
- amplitude=.9,
- post=lineto, post length=2pt,
- pre=lineto, pre length=2pt}},
double line/.style={
/tikz/double=\pgfkeysvalueof{/tikz/commutative diagrams/background color},
/tikz/double distance=3.643\pgflinewidth},
dashed/.style={/tikz/densely dashed}}}
% The tikz arrow style
-\pgfkeys{/tikz/commutative diagrams/arrow style/tikz/.style={
+\pgfqkeys{/tikz/commutative diagrams/arrow style}{
+ tikz/.code={%
+ \expandafter\ifx\csname tikz@library@arrows@loaded\endcsname\pgfutil@empty%
+ \else\PackageError{tikz-cd}{To use the `tikz' arrow style, include %
+ \protect\usetikzlibrary{arrows} in the document preamble}{}\fi},
+ tikz/.append style={
/tikz/commutative diagrams/.cd,
default arrow/.style={/tikz/arrows=->},
rightarrow/.style={/tikz/arrows=->},
@@ -139,24 +146,10 @@
rightharpoondown/.style={/tikz/arrows=-right to},
leftharpoonup/.style={/tikz/arrows=right to-},
leftharpoondown/.style={/tikz/arrows=left to-},
- dashrightarrow/.style={/tikz/commutative diagrams/.cd,rightarrow,dashed},
- dashleftarrow/.style={/tikz/commutative diagrams/.cd,leftarrow,dashed},
rightarrowtail/.style={/tikz/arrows=>->},
leftarrowtail/.style={/tikz/arrows=<-<},
twoheadrightarrow/.style={/tikz/arrows=->>},
twoheadleftarrow/.style={/tikz/arrows=<<-}, %>>
- rightsquigarrow/.style={
- /tikz/commutative diagrams/.cd,
- rightarrow,
- squiggly},
- leftsquigarrow/.style={
- /tikz/commutative diagrams/.cd,
- leftarrow,
- squiggly},
- leftrightsquigarrow/.style={
- /tikz/commutative diagrams/.cd,
- leftrightarrow,
- squiggly},
equals/.style={
/tikz/arrows=-,
/tikz/commutative diagrams/double line},
@@ -166,20 +159,10 @@
\pgfsetarrowsend{\csname tikz@special@arrow@end>>\endcsname}},
tail/.code={
\pgfsetarrowsstart{\csname tikz@special@arrow@start>\endcsname}},
- squiggly/.style={
- %http://tex.stackexchange.com/questions/12678/
- decorate,
- decoration={
- zigzag,
- segment length=4,
- amplitude=.9,
- post=lineto, post length=2pt,
- pre=lineto, pre length=2pt}},
dashed/.style={/tikz/dashed},
double line/.style={
/tikz/double equal sign distance,
- /tikz/double=%
- \pgfkeysvalueof{/tikz/commutative diagrams/background color}}}}
+ /tikz/double=\pgfkeysvalueof{/tikz/commutative diagrams/background color}}}}
% Default settings
\pgfqkeys{/tikz/commutative diagrams}{
@@ -199,7 +182,7 @@
column sep=normal,
/tikz/baseline=0pt},
math mode=true,
- center shift/.initial=0.575ex,
+ center shift/.initial=\tikzcdaxisheight,
row sep/huge/.initial=10ex,
row sep/large/.initial=7.5ex,
row sep/normal/.initial=5ex,
@@ -276,73 +259,60 @@
\pgf@process{\pgf@marshal}%
\advance\pgf@x by\pgf@xa%
\advance\pgf@y by\pgfutil@tempdima%
- }
-}
+ }%
+}%
% Branch depending on whether the next character is [, { or none of those.
\def\tikzcd@threefold#1#2#3{%
- \def\tikzcd@tempa{#1}%
- \def\tikzcd@tempb{#2}%
- \def\tikzcd@tempc{#3}%
- \futurelet\next\tikzcd@@threefold}
+ \def\tikzcd@tempa{#1}%
+ \def\tikzcd@tempb{#2}%
+ \def\tikzcd@tempc{#3}%
+ \futurelet\next\tikzcd@@threefold}
+
\def\tikzcd@@threefold{%
- \ifx[\next\let\tikzcd@tempd\tikzcd@tempa%
- \else\ifx\bgroup\next\let\tikzcd@tempd\tikzcd@tempb%
- \else\let\tikzcd@tempd\tikzcd@tempc\fi\fi%
- \tikzcd@tempd}
+ \ifx[\next\let\tikzcd@tempc\tikzcd@tempa%
+ \else\ifx\bgroup\next\let\tikzcd@tempc\tikzcd@tempb\fi\fi%
+ \tikzcd@tempc}
%The arrow commands
-\def\tikzcd@arrow{%
- \tikzcd@targetrow\tikzcd@currrow%
- \tikzcd@targetcol\tikzcd@currcol%
- \tikzcd@threefold{\tikzcd@ar@getdir}{\tikzcd@ar@getdir[]}{}}
+\def\tikzcd@arrow{\tikzcd@threefold{\tikzcd@ar@getdir}{\tikzcd@ar@getdir[]}{}}
\def\tikzcd@ar@getdir[#1]#2{%
- \tikzcd@temptoksa{\path[/tikz/commutative diagrams/every arrow,#1]}%
+ \tikzcd@targetrow\pgfmatrixcurrentrow%
+ \tikzcd@targetcol\pgfmatrixcurrentcolumn%
\tikzcd@parse#2\relax%
- \tikzcd@temptoksb{}% this will store the labels
+ \toks@\expandafter{\tikzcd@savedpaths\path[/tikz/commutative diagrams/every arrow,#1]}%
+ \global\edef\tikzcd@savedpaths{\the\toks@%
+ (\tikzmatrixname-\the\pgfmatrixcurrentrow-\the\pgfmatrixcurrentcolumn%
+ \noexpand\tikzcd@sourceanchor) to }%
\tikzcd@threefold{\tikzcd@ar@getlabel}{\tikzcd@ar@getlabel[]}{\tikzcd@ar@final}}
\def\tikzcd@ar@getlabel[#1]#2{%
- \tikzcd@temptoksb\expandafter{\the\tikzcd@temptoksb %
+ \expandafter\def\expandafter\tikzcd@savedpaths\expandafter{\tikzcd@savedpaths%
node[/tikz/commutative diagrams/every label,#1]{\tikzcd@mathmaybe{#2}}}%
\tikzcd@threefold{\tikzcd@ar@getlabel}{\tikzcd@ar@getlabel[]}{\tikzcd@ar@final}}
\def\tikzcd@ar@final{%
- \tikzcd@temptoksc\expandafter{\tikzcd@savedpaths}%
+ \toks@\expandafter{\tikzcd@savedpaths}
\global\edef\tikzcd@savedpaths{%
- \the\tikzcd@temptoksc% the previously saved stuff
- \the\tikzcd@temptoksa% the current arrow
- (\tikzmatrixname-\the\tikzcd@currrow-\the\tikzcd@currcol%
- \noexpand\tikzcd@sourceanchor)%
- to%
- \the\tikzcd@temptoksb% the current labels
+ \the\toks@%
(\tikzmatrixname-\the\tikzcd@targetrow-\the\tikzcd@targetcol%
- \noexpand\tikzcd@targetanchor);}}
-
-\def\tikzcd@xar#1#2{%
- \tikzcd@targetrow\tikzcd@currrow%
- \advance\tikzcd@targetrow by#1%
- \tikzcd@targetcol\tikzcd@currcol%
- \advance\tikzcd@targetcol by#2%
- \tikzcd@threefold{\tikzcd@@xar}{\tikzcd@@xar[]}{\tikzcd@@xar[]}}
-
-\def\tikzcd@@xar[#1]{%
- \tikzcd@temptoksa{\path[/tikz/commutative diagrams/every arrow,#1]}%
- \tikzcd@temptoksb{}% this will store the labels
- \tikzcd@threefold{\tikzcd@ar@getlabel}{\tikzcd@ar@getlabel[]}{\tikzcd@ar@final}}
+ \noexpand\tikzcd@targetanchor); }}
+
+\def\tikzcd@xar#1{\tikzcd@threefold{\tikzcd@@xar{#1}}{\tikzcd@arrow[]{#1}}{\tikzcd@arrow[]{#1}}}
-% Parser for arrow direction argument
-\def\tikzcd@parse#1{%
- \def\tikzcd@tempa{\tikzcd@parse}%
- \ifx#1r\advance\tikzcd@targetcol by1\else%
- \ifx#1d\advance\tikzcd@targetrow by1\else%
- \ifx#1l\advance\tikzcd@targetcol by-1\else%
- \ifx#1u\advance\tikzcd@targetrow by-1\else%
- \ifx#1\relax\let\tikzcd@tempa\empty%
- \else\errmessage{Arrow direction argument must contain %
- only the characters l, r, u or d}\fi\fi\fi\fi\fi%
- \tikzcd@tempa}
+\def\tikzcd@@xar#1[#2]{\tikzcd@arrow[#2]{#1}}
+
+\def\tikzcd@parse#1{% Parser for arrow direction argument
+ \def\tikzcd@tempa{\tikzcd@parse}%
+ \ifx#1r\advance\tikzcd@targetcol by1\else%
+ \ifx#1d\advance\tikzcd@targetrow by1\else%
+ \ifx#1l\advance\tikzcd@targetcol by-1\else%
+ \ifx#1u\advance\tikzcd@targetrow by-1\else%
+ \ifx#1\relax\let\tikzcd@tempa\empty%
+ \else\PackageError{tikz-cd}{Arrow direction argument must contain %
+ only the characters l, r, u or d}{}\fi\fi\fi\fi\fi%
+ \tikzcd@tempa}
%The tikzcd environment
\def\tikzcd{\tikzcd@threefold{\tikzcd@}{\tikzcd@[]}{\tikzcd@[]}}
@@ -350,11 +320,7 @@
\def\tikzcd@[#1]{%
\tikzpicture[/tikz/commutative diagrams/every diagram,#1]%
\tikzcd@initialize%
- \matrix[/tikz/commutative diagrams/matrix of math nodes maybe,%
- /tikz/execute at begin cell=%
- \tikzcd@currcol\pgfmatrixcurrentcolumn%
- \tikzcd@currrow\pgfmatrixcurrentrow]%
- \bgroup}
+ \matrix[/tikz/commutative diagrams/matrix of math nodes maybe]\bgroup}
\def\endtikzcd{%
\pgfmatrixendrow\egroup;%
@@ -364,19 +330,21 @@
\def\tikzcd@initialize{%
\def\arrow{\tikzcd@arrow}%
\def\ar{\tikzcd@arrow}%
- \def\rar{\tikzcd@xar{0}{1}}%
- \def\lar{\tikzcd@xar{0}{-1}}%
- \def\dar{\tikzcd@xar{1}{0}}%
- \def\uar{\tikzcd@xar{-1}{0}}%
- \def\urar{\tikzcd@xar{-1}{1}}%
- \def\ular{\tikzcd@xar{-1}{-1}}%
- \def\drar{\tikzcd@xar{1}{1}}%
- \def\dlar{\tikzcd@xar{1}{-1}}%
+ \def\rar{\tikzcd@xar{r}}%
+ \def\lar{\tikzcd@xar{l}}%
+ \def\dar{\tikzcd@xar{d}}%
+ \def\uar{\tikzcd@xar{u}}%
+ \def\urar{\tikzcd@xar{ur}}%
+ \def\ular{\tikzcd@xar{ul}}%
+ \def\drar{\tikzcd@xar{dr}}%
+ \def\dlar{\tikzcd@xar{dl}}%
+ \def\rowsep##1{\pgfkeysvalueof{/tikz/commutative diagrams/row sep/##1}}%
+ \def\colsep##1{\pgfkeysvalueof{/tikz/commutative diagrams/column sep/##1}}%
\global\let\tikzcd@savedpaths\empty}
\def\tikzcd@finalize{\tikzcd@savedpaths}
-\def\tikzcd@mathmaybe#1{\iftikzcd@mathmode$#1$\else#1\fi}
+\def\tikzcd@mathmaybe#1{\iftikzcd@mathmode$ #1$\else#1\fi}
\def\tikzcd@sep#1#2{
\pgfkeysifdefined{/tikz/commutative diagrams/#1 sep/#2}%
@@ -594,4 +562,172 @@
\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}
-\endinput \ No newline at end of file
+%Font arrows (experimental)
+
+\tikzset{
+ /tikz/commutative diagrams/enable font arrows/.code={%
+ % A little surgery on pgf's arrow selection commands
+ \pgfutil@ifundefined{tikzcd@orig@pgfsetarrowsend}%
+ {\let\tikzcd@orig@pgfsetarrowsend\pgfsetarrowsend
+ \let\tikzcd@orig@pgfsetarrowsstart\pgfsetarrowsstart
+ \def\pgfsetarrowsend##1{%
+ \pgfutil@ifundefined{tikzcd@arrows@cmd@##1}%
+ {\tikzcd@orig@pgfsetarrowsend{##1}}
+ {\tikzcd@arrowset{end}{##1}}}%
+ \def\pgfsetarrowsstart##1{%
+ \pgfutil@ifundefined{tikzcd@arrows@cmd@##1}%
+ {\tikzcd@orig@pgfsetarrowsstart{##1}}
+ {\tikzcd@arrowset{start}{##1}}}%
+ }{}},
+ /tikz/commutative diagrams/font arrows/.cd,
+ double distance/.store in={\tikzcdfontarrowsdoubledistance},
+ declare head/.code n args={4}{\tikzcd@arrowsdeclare{#1}{#2}{#3}{#4}{\iftrue}},
+ declare tail/.code n args={4}{\tikzcd@arrowsdeclare{#1}{#2}{#3}{#4}{\iffalse}},
+}
+
+% #1 = name
+% #2 = command
+% #3 = axis height
+% #4 = width of clip box
+% #5 = \iftrue for head, \iffalse for tail
+\def\tikzcd@arrowsdeclare#1#2#3#4#5{%
+ \expandafter\def\csname tikzcd@arrows@cmd@#1\endcsname{#2}%
+ \expandafter\def\csname tikzcd@arrows@ifhead@#1\endcsname{#5}%
+ \expandafter\def\csname tikzcd@arrows@axheight@#1\endcsname{#3}%
+ \expandafter\def\csname tikzcd@arrows@length@#1\endcsname{#4}}
+
+% Select the pdfTeX or generic backend according to pgf's setting.
+%
+% The generic backend uses a rectangle to clip the font glyph, and the
+% pdfTeX backend uses the font glyph as the clipping path for a big
+% black box. The latter method seems to trick pdf viewers and
+% printers to treat the resulting arrow tip as a graphic element
+% instead of text, making the transition between line and arrow tip
+% less noticeable.
+\def\tikzcd@tempa{pgfsys-pdftex.def}
+\ifx\pgfsysdriver\tikzcd@tempa
+ \def\tikzcd@arrowset{\tikzcd@arrowset@pdftex}
+\else
+ \def\tikzcd@arrowset{\tikzcd@arrowset@generic}
+\fi
+
+% #1 `start' or `end'
+% #2 arrow name
+\def\tikzcd@arrowset@pdftex#1#2{%
+ \expandafter\def\csname pgf@#1arrow\endcsname{%
+ \pgfinterruptpath%
+ \pgf@relevantforpicturesizefalse%
+ \pgftransformreset%
+ \pgfsys@beginscope%
+ \pgfmathsetlengthmacro\tikzcd@len{\csname tikzcd@arrows@length@#2\endcsname}%
+ \setbox\pgfutil@tempboxa=\hbox{\pgfinterruptpicture %
+ \csname tikzcd@arrows@cmd@#2\endcsname\endpgfinterruptpicture}%
+ \csname tikzcd@arrows@ifhead@#2\endcsname%
+ \pgftransformxshift{\tikzcd@len-\wd\pgfutil@tempboxa}%
+ \else%
+ \pgftransformrotate{180}%
+ \pgftransformxshift{-\tikzcd@len}%
+ \fi%
+ \pgftransformyshift{-\csname tikzcd@arrows@axheight@#2\endcsname}%
+ \pdfliteral{7 Tr}%
+ \pgflowlevelsynccm\copy\pgfutil@tempboxa%
+ \csname tikzcd@arrows@ifhead@#2\endcsname\else%
+ \pgftransformxshift{\tikzcd@len-\wd\pgfutil@tempboxa}%
+ \fi%
+ \pgfpathrectangle{\pgfpoint{0pt}{-1ex}}{\pgfpoint{-\tikzcd@len}{3ex}}%
+ \pgfusepathqfill%
+ \pgfsys@endscope%
+ \endpgfinterruptpath}%
+ \expandafter\def\csname pgf@shorten@#1\endcsname{%
+ \pgfmathsetlength\pgf@xa{\csname tikzcd@arrows@length@#2\endcsname}%
+ \advance\pgf@x by\pgf@xa}}%
+
+% #1 `start' or `end'
+% #2 arrow name
+\def\tikzcd@arrowset@generic#1#2{%
+ \expandafter\def\csname pgf@#1arrow\endcsname{%
+ \pgfinterruptpath%
+ \pgf@relevantforpicturesizefalse%
+ \pgftransformreset%
+ \pgfsys@beginscope%
+ \pgfmathsetlengthmacro\tikzcd@len{\csname tikzcd@arrows@length@#2\endcsname}%
+ \pgfpathrectangle{\pgfpoint{0pt}{-1.5ex}}{\pgfpoint{\tikzcd@len}{3ex}}%
+ \pgfusepathqclip%
+ \csname tikzcd@arrows@ifhead@#2\endcsname%
+ \pgftransformxshift{\tikzcd@len}%
+ \else%
+ \pgftransformrotate{180}%
+ \pgftransformxshift{-\tikzcd@len}%
+ \fi%
+ \pgftransformyshift{-\csname tikzcd@arrows@axheight@#2\endcsname}%
+ \pgftext[\csname tikzcd@arrows@ifhead@#2\endcsname right\else left\fi,base]%
+ {\csname tikzcd@arrows@cmd@#2\endcsname}%
+ \pgfsys@endscope%
+ \endpgfinterruptpath}%
+ \expandafter\def\csname pgf@shorten@#1\endcsname{%
+ \pgfmathsetlength\pgf@xa{\csname tikzcd@arrows@length@#2\endcsname}%
+ \advance\pgf@x by\pgf@xa}}%
+
+% The arguments for `declare head' and `declare tail' are 1. name of
+% the arrow tip, 2. TeX command corresponding to an arrow, 3. distance
+% from baseline to arrow stem, 4. width of the clip box, which should
+% be big enough to contain the whole tip.
+\tikzset{/tikz/commutative diagrams/font arrows/.cd,
+ double distance={3.8\pgflinewidth},
+ declare head={math to}{$\to$}{\tikzcdaxisheight}{1ex},
+ declare head={math to reversed}{$\leftarrowtail$}{\tikzcdaxisheight}{1ex},
+ declare tail={math cap}{$\to$}{\tikzcdaxisheight}{1ex},
+ declare tail={math |}{$\mapsto$}{\tikzcdaxisheight}{1ex},
+ declare head={math o}{$\multimap$}{\tikzcdaxisheight}{1.4ex},
+ declare head={math implies}{$\Rightarrow$}{\tikzcdaxisheight}{1.4ex},
+ declare tail={math implies cap}{$\Rightarrow$}{\tikzcdaxisheight}{1ex},
+ declare head={math left hook}{$\hookleftarrow$}{\tikzcdaxisheight}{1ex},
+ declare tail={math right hook}{$\hookrightarrow$}{\tikzcdaxisheight}{1ex},
+ declare head={math double to}{$\twoheadrightarrow$}{\tikzcdaxisheight}{1.4ex},
+ declare head={math left to}{$\rightharpoonup$}{\tikzcdaxisheight}{1ex},
+ declare head={math right to}{$\rightharpoondown$}{\tikzcdaxisheight}{1ex},
+}
+
+% The `math font' arrow style
+\pgfkeys{/tikz/commutative diagrams/arrow style/math font/.style={
+ /tikz/commutative diagrams/.cd,
+ enable font arrows,
+ default arrow/.style={
+ /tikz/arrows=math cap-math to,
+ /tikz/line width=\tikzcdrulethickness},
+ rightarrow/.style={/tikz/arrows=math cap-math to},
+ Rightarrow/.style={
+ /tikz/arrows=math implies cap-math implies,
+ /tikz/commutative diagrams/double line},
+ leftarrow/.style={/tikz/arrows=math to-math cap},
+ Leftarrow/.style={
+ /tikz/arrows=math implies-math implies cap,
+ /tikz/commutative diagrams/double line},
+ leftrightarrow/.style={/tikz/arrows=math to-math to},
+ Leftrightarrow/.style={
+ /tikz/arrows=math implies-math implies,
+ /tikz/commutative diagrams/double line},
+ mapsto/.style={/tikz/arrows=math |-math to},
+ hookrightarrow/.style={/tikz/arrows=math right hook-math to},
+ hookleftarrow/.style={/tikz/arrows=math to-math left hook},
+ rightharpoonup/.style={/tikz/arrows=math cap-math left to},
+ rightharpoondown/.style={/tikz/arrows=math cap-math right to},
+ leftharpoonup/.style={/tikz/arrows=math right to-math cap},
+ leftharpoondown/.style={/tikz/arrows=math left to-math cap},
+ rightarrowtail/.style={/tikz/arrows=math to reversed-math to},
+ leftarrowtail/.style={/tikz/arrows=math to-math to reversed},
+ twoheadrightarrow/.style={/tikz/arrows=math cap-math double to},
+ twoheadleftarrow/.style={/tikz/arrows=math double to-math cap},
+ equals/.style={
+ /tikz/arrows=math implies cap-math implies cap,
+ /tikz/commutative diagrams/double line},
+ maps to/.code={\pgfsetarrowsstart{math |}},
+ hook/.code={\pgfsetarrowsstart{math right hook}},
+ two heads/.code={\pgfsetarrowsend{math double to}},
+ tail/.code={\pgfsetarrowsstart{math to reversed}},
+ double line/.style={
+ /tikz/double=\pgfkeysvalueof{/tikz/commutative diagrams/background color},
+ /tikz/double distance=\tikzcdfontarrowsdoubledistance},
+ dashed/.style={/tikz/densely dashed}}}
+
+\endinput