From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/89059 Path: news.gmane.org!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Package {tikz-cd} with ConTeXt Date: Wed, 29 Oct 2014 00:37:01 +0100 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1260114127==" X-Trace: ger.gmane.org 1414539472 6528 80.91.229.3 (28 Oct 2014 23:37:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Oct 2014 23:37:52 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Oct 29 00:37:48 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XjGKh-0003qB-8V for gctc-ntg-context-518@m.gmane.org; Wed, 29 Oct 2014 00:37:47 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9FB8110233 for ; Wed, 29 Oct 2014 00:37:46 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id fbbyKeP-0bfV for ; Wed, 29 Oct 2014 00:37:45 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 8681710239 for ; Wed, 29 Oct 2014 00:37:14 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5C12B101E8 for ; Wed, 29 Oct 2014 00:37:10 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id uvEM2wyDFcT2 for ; Wed, 29 Oct 2014 00:37:08 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id B4E90101E4 for ; Wed, 29 Oct 2014 00:37:03 +0100 (CET) Original-Received: from mail-ig0-x231.google.com (mail-ig0-x231.google.com [IPv6:2607:f8b0:4001:c05::231]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s9SNb17C019168 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Wed, 29 Oct 2014 00:37:02 +0100 Original-Received: by mail-ig0-f177.google.com with SMTP id hl2so1147804igb.4 for ; Tue, 28 Oct 2014 16:37:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=NnL5TS3bHD7Nfs/Vf3/jpSAXRRTcMnFRdIIPllMtvt4=; b=wZksMe2GDrRADy413wyKvU6G9SL+9zEc2s4d5rFqQZ8FwWTaA/vu+rnKLonvXpkz2s yXDLQrKr/j7jmp/TebW9Ksk9yFiyx6vschtjaBpZu8JhDp95TyIHVR4l65/uq31W5yu8 v/pH/3DXKeCkNovEMDwTjpqB0+ECTP9fu0QTTFkuqtfq5mivkrpHosz26JXMJxW9w4sa mnjTJnPPO3kFTFvAtuYTXEYNJ3CO+igfqYyUig3l+EOXu4I+Pq2zMJ/W7g/QTG/dylvY H17Llx3Wlo4IZENStVxtgMBlI4tD6d3+SfwauBr36Q6KrqkYEael1SuapZIbacWLkB6+ 3vyA== X-Received: by 10.107.169.32 with SMTP id s32mr6671989ioe.68.1414539421156; Tue, 28 Oct 2014 16:37:01 -0700 (PDT) Original-Received: by 10.50.233.46 with HTTP; Tue, 28 Oct 2014 16:37:01 -0700 (PDT) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2607:f8b0:4001:c05::231; country=US X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03N8LB2JD - 59f7d00fee6c - 20141029 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:89059 Archived-At: --===============1260114127== Content-Type: multipart/alternative; boundary=001a11421c44b80c350506841fc7 --001a11421c44b80c350506841fc7 Content-Type: text/plain; charset=UTF-8 Hi, The following code compiles with pdflatex : \documentclass{article} \usepackage{tikz} \usepackage{tikz-cd} \usetikzlibrary{3d,shapes} \begin{document} \tikzset{xzplane/.style={canvas is xz plane at y=#1, thick,shading=ball,ball color=red,draw=black}} \tikzset{yzplane/.style={canvas is yz plane at x=#1,thick,shading=ball, ball color=red,draw=black}} \tikzset{xyplane/.style={canvas is xy plane at z=#1,thick,shading=ball,ball color=red,draw=black}} \tikzcdset{ arrow style=tikz, diagrams={>=stealth}} \[\begin{tikzcd} \tikz{\draw[xzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle; \draw[yzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle; \draw[xyplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle; \draw[xyplane=2] node[white] at (1,1){\Large 7}; \draw[xyplane=2] node[below=0.25cm] at (1,0){\Large X};} \arrow[thick, bend left, start anchor = north, end anchor = north, shorten >=1mm]{r}[scale=2]{\times 2} &\tikz{\draw[xzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle; \draw[yzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle; \draw[xyplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle; \draw[xyplane=2] node[white] at (1,1){\Large 14}; \draw[xyplane=2] node[below=0.25cm] at (1,0) {\Large X};} \arrow[thick, bend left, start anchor = north, end anchor = north, shorten <= 1mm]{r}[scale=2]{+ 3} &\tikz{\draw[xzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle; \draw[yzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle; \draw[xyplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle; \draw[xyplane=2] node[white] at (1,1){\Large 17}; \draw[xyplane=2] node[below=0.25cm] at (1,0){\Large X};} \end{tikzcd}\] \begin{tikzpicture} \tikzstyle {bulle}=[circle,draw,thick] \tikzstyle{fleche}=[thick,>=stealth,->] \node(debut1) at (0,0) {$7$}; \node(debut3) at (4,0) {$14$}; \draw [fleche](debut1.north) to [bend left] (debut3.north); \node [bulle,fill=white] (debut6) at (2,0.75) {$\times 2$}; \end{tikzpicture} \end{document} I tried with Context, but it does not work : \usemodule[tikz] \usetikzlibrary[calc] \usetikzlibrary[cd] \usetikzlibrary[3d] \usetikzlibrary[arrows] \usetikzlibrary[positioning] \starttext \tikzset{xzplane/.style={canvas is xz plane at y=#1, thick,shading=ball,ball color=red,draw=black}} \tikzset{yzplane/.style={canvas is yz plane at x=#1,thick,shading=ball, ball color=red,draw=black}} \tikzset{xyplane/.style={canvas is xy plane at z=#1,thick,shading=ball,ball color=red,draw=black}} \tikzcdset{ arrow style=tikz, diagrams={>=stealth}} \starttikzcd \tikz{\draw[xzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle; \draw[yzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle; \draw[xyplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle; \draw[xyplane=2] node[white] at (1,1){ 7}; \draw[xyplane=2] node[below=0.25cm] at (1,0){X};} \arrow[thick, bend left, start anchor = north, end anchor = north, shorten >=1mm]{r}[scale=2]{$\times 2$} &\tikz{\draw[xzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle; \draw[yzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle; \draw[xyplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle; \draw[xyplane=2] node[white] at (1,1){ 14}; \draw[xyplane=2] node[below=0.25cm] at (1,0) {X};} \arrow[thick, bend left, start anchor = north, end anchor = north, shorten <= 1mm]{r}[scale=2]{+ 3} &\tikz{\draw[xzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle; \draw[yzplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle; \draw[xyplane=2] (0,0)--(2,0)--(2,2)--(0,2) --cycle; \draw[xyplane=2] node[white] at (1,1){ 17}; \draw[xyplane=2] node[below=0.25cm] at (1,0){X};} \stoptikzcd \stoptext Best regards, Fabrice --001a11421c44b80c350506841fc7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
<= span class=3D"">Hi,
The following code compiles with <= span class=3D"">pdflatex :

\documentclass{article}
\= usepackage{tikz}
\usepackage{tikz-cd}
\usetikzlibrary{3d,shapes}
<= br>\begin{document}
\tikzset{xzplane/.style=3D{canvas is xz plane at y= =3D#1, thick,shading=3Dball,ball color=3Dred,draw=3Dblack}}
\tikzset{yzp= lane/.style=3D{canvas is yz plane at x=3D#1,thick,shading=3Dball, ball colo= r=3Dred,draw=3Dblack}}
\tikzset{xyplane/.style=3D{canvas is xy plane at = z=3D#1,thick,shading=3Dball,ball color=3Dred,draw=3Dblack}}
\tikzcdset{<= br>arrow style=3Dtikz,
diagrams=3D{>=3Dstealth}}
\[\begin{tikzcd}<= br>\tikz{\draw[xzplane=3D2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[yz= plane=3D2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[xyplane=3D2] (0,0)-= -(2,0)--(2,2)--(0,2) --cycle;
\draw[xyplane=3D2] node[white] at (1,1){\L= arge 7};
\draw[xyplane=3D2] node[below=3D0.25cm] at (1,0){\Large X};}\arrow[thick, bend left, start anchor =3D north, end anchor =3D north, sho= rten >=3D1mm]{r}[scale=3D2]{\times 2}
&\tikz{\draw[xzplane=3D2] (= 0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[yzplane=3D2] (0,0)--(2,0)--(2,2= )--(0,2) --cycle;
\draw[xyplane=3D2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;=
\draw[xyplane=3D2] node[white] at (1,1){\Large 14};
\draw[xyplane=3D= 2] node[below=3D0.25cm] at (1,0) {\Large X};}
\arrow[thick, bend left, s= tart anchor =3D north, end anchor =3D north, shorten <=3D 1mm]{r}[scale= =3D2]{+ 3}
&\tikz{\draw[xzplane=3D2] (0,0)--(2,0)--(2,2)--(0,2) --cy= cle;
\draw[yzplane=3D2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[xyp= lane=3D2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[xyplane=3D2] node[wh= ite] at (1,1){\Large 17};
\draw[xyplane=3D2] node[below=3D0.25cm] at (1,= 0){\Large X};}
\end{tikzcd}\]

\begin{tikzpicture}
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 \tikzstyle {bulle}=3D[circle,draw,thick]
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 \tikzstyle{fleche}=3D[thick,>=3Dstealth,->]
=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 \node(debut1) at (0,0) {$7$};
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 \node(debut3) at (4,0) {$14$};
=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 \draw [fleche](debut1.north) to [bend left] (debut3.north);
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \node [bulle,fill=3Dwhite] (debut6) at (2,0.= 75) {$\times 2$};
=C2=A0=C2=A0=C2=A0 \end{tikzpicture}
\end{document}=

I tried with Context, but = it does not work :

\usemodule[tikz]
\uset= ikzlibrary[calc]
\usetikzlibrary[cd]
\usetikzlibrary[3d]
\usetikzl= ibrary[arrows]
\usetikzlibrary[positioning]
\starttext
\tikzset{xz= plane/.style=3D{canvas is xz plane at y=3D#1, thick,shading=3Dball,ball col= or=3Dred,draw=3Dblack}}
\tikzset{yzplane/.style=3D{canvas is yz plane at= x=3D#1,thick,shading=3Dball, ball color=3Dred,draw=3Dblack}}
\tikzset{x= yplane/.style=3D{canvas is xy plane at z=3D#1,thick,shading=3Dball,ball col= or=3Dred,draw=3Dblack}}
\tikzcdset{
arrow style=3Dtikz,
diagrams= =3D{>=3Dstealth}}
\starttikzcd
\tikz{\draw[xzplane=3D2] (0,0)--(2,= 0)--(2,2)--(0,2) --cycle;
\draw[yzplane=3D2] (0,0)--(2,0)--(2,2)--(0,2) = --cycle;
\draw[xyplane=3D2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw= [xyplane=3D2] node[white] at (1,1){ 7};
\draw[xyplane=3D2] node[below=3D= 0.25cm] at (1,0){X};}
\arrow[thick, bend left, start anchor =3D north, e= nd anchor =3D north, shorten >=3D1mm]{r}[scale=3D2]{$\times 2$}
&= \tikz{\draw[xzplane=3D2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[yzpla= ne=3D2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[xyplane=3D2] (0,0)--(2= ,0)--(2,2)--(0,2) --cycle;
\draw[xyplane=3D2] node[white] at (1,1){ 14};=
\draw[xyplane=3D2] node[below=3D0.25cm] at (1,0) {X};}
\arrow[thick,= bend left, start anchor =3D north, end anchor =3D north, shorten <=3D 1= mm]{r}[scale=3D2]{+ 3}
&\tikz{\draw[xzplane=3D2] (0,0)--(2,0)--(2,2)= --(0,2) --cycle;
\draw[yzplane=3D2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;<= br>\draw[xyplane=3D2] (0,0)--(2,0)--(2,2)--(0,2) --cycle;
\draw[xyplane= =3D2] node[white] at (1,1){ 17};
\draw[xyplane=3D2] node[below=3D0.25cm]= at (1,0){X};}
\stoptikzcd
\stoptext

Best regards,
Fabrice
--001a11421c44b80c350506841fc7-- --===============1260114127== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============1260114127==--