summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/tikz-cd
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-11-02 21:51:42 +0000
committerKarl Berry <karl@freefriends.org>2014-11-02 21:51:42 +0000
commitd6fa8fbf780ce1b3309f807ada2fd5eec16e26ae (patch)
tree36d428db8010d8db384203e5194ef28eb53ef8ec /Master/texmf-dist/tex/generic/tikz-cd
parentda3fae7e9a9a162897542972b7c2bac81abc26af (diff)
tikz-cd (2nov14)
git-svn-id: svn://tug.org/texlive/trunk@35485 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/tikz-cd')
-rw-r--r--Master/texmf-dist/tex/generic/tikz-cd/tikzlibrarycd.code.tex32
1 files changed, 20 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/generic/tikz-cd/tikzlibrarycd.code.tex b/Master/texmf-dist/tex/generic/tikz-cd/tikzlibrarycd.code.tex
index ddd2312b89e..b5ab8c2d10a 100644
--- a/Master/texmf-dist/tex/generic/tikz-cd/tikzlibrarycd.code.tex
+++ b/Master/texmf-dist/tex/generic/tikz-cd/tikzlibrarycd.code.tex
@@ -1,4 +1,4 @@
-% tikzlibrarycd.code.tex [2014/10/26 v0.9d Commutative diagrams with tikz]
+% tikzlibrarycd.code.tex [2014/10/30 v0.9e Commutative diagrams with tikz]
%
% Copyright 2011, 2012, 2014 by FlorĂȘncio Neves <florencioneves@gmail.com>
%
@@ -42,8 +42,12 @@
/tikz/draw=\pgfkeysvalueof{/tikz/commutative diagrams/background color},
/tikz/arrows=-,
/tikz/line width=\pgfkeysvalueof{/tikz/commutative diagrams/crossing over clearance}}},
+ cramped/.code={\tikzcdset{
+ every matrix/.append style={inner sep=+-0.3em},
+ every cell/.append style={inner sep=+0.3em}}},
row sep/.code={\tikzcd@sep{row}{#1}},
column sep/.code={\tikzcd@sep{column}{#1}},
+ sep/.code={\tikzcdset{row sep={#1},column sep={#1}}},
math mode/.is if=tikzcd@mathmode,
arrow style/.is choice}
@@ -102,18 +106,17 @@
% The `tikzcd' environment
\def\tikzcd{%
\iffalse{\fi\ifnum0=`}\fi% standard trick to allow nesting of tabular-like environments (cf. the tabularx manual)
- \ifx\arrow\tikzcd@arrow%
- \pgfutil@packageerror{tikz-cd}{Diagrams cannot be nested}{}
- \fi%
- \tikzpicture%
\pgfutil@ifnextchar&% if we get an & here, it will be returned with the wrong catcode to the input stream
{\expandafter\tikzcd@@\expandafter\pgfmatrixnextcell\pgfutil@gobble}%
{\tikzcd@@}}
-\def\tikzcd@@{\pgfutil@ifnextchar[{\tikzcd@}{\tikzcd@[]}}
+\def\tikzcd@@{\pgfutil@ifnextchar[{\tikzcd@handle@shortcuts@next\tikzcd@}{\tikzcd@[]}}
\def\tikzcd@[#1]{%
- \tikzcdset{every diagram,#1}%
+ \tikzpicture[/tikz/commutative diagrams/.cd,every diagram,#1]%
+ \ifx\arrow\tikzcd@arrow%
+ \pgfutil@packageerror{tikz-cd}{Diagrams cannot be nested}{}%
+ \fi%
\let\arrow\tikzcd@arrow%
\let\ar\tikzcd@arrow%
\def\rar{\tikzcd@xar{r}}%
@@ -350,11 +353,6 @@
}%
}%
-% ConTeXt-specific stuff
-\pgfutil@IfUndefined{starttikzpicture}{}{%
- \def\starttikzcd{\tikzcd}%
- \def\stoptikzcd{\endtikzcd}}
-
% Computer modern arrow tips
\pgfkeys{
cm to/.tip={Computer Modern Rightarrow[length=+0pt 6.2]},
@@ -551,4 +549,14 @@
shift right/.default=1,
background color/.initial=white}
+% ConTeXt-specific stuff
+\pgfutil@IfUndefined{starttikzpicture}{}{%
+ \def\starttikzcd{\tikzcd}
+ \def\stoptikzcd{\endtikzcd}
+ \tikzcdset{
+ every matrix/.append code={%
+ \def\NC{\pgfmatrixnextcell}%
+ \def\NR{\pgfmatrixendrow}}}
+}
+
\endinput