ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Hans Åberg" <haberg-1@telia.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
Subject: Re: Communative diagrams with TikZ & ConTeXt
Date: Thu, 6 Oct 2016 23:45:24 +0200	[thread overview]
Message-ID: <87C60BA7-E17C-4FF0-AB32-1F3229A7CE82@telia.com> (raw)
In-Reply-To: <CALBOmsZBhscvCbG=T8yB8mS-VDQ_a3Te20vCzqtj8J4hcsdYPw@mail.gmail.com>


> On 6 Oct 2016, at 15:52, Mojca Miklavec <mojca.miklavec.lists@gmail.com> wrote:
> 
> I don't have the file tikzlibrarycommute.code.tex on my machine
> either. Anywhere. Not in the ConTeXt distribution nor in TeX Live.
> That file was only posted to the mailing list by Idris and apparently
> nobody ever looked at it or added it anywhere.

There is a tikz-cd package at CTAN:
  https://www.ctan.org/tex-archive/graphics/pgf/contrib/tikz-cd?lang=en

One makes sure to have the file tikzlibrarycd.code.tex, and follows the translation rules in the manual for ConTeXt. In addition to that, one seems to have to replace the apostrophe with "below".

The first few examples in the manual, which compiled with latest ConTeXt:

\usemodule[tikz]
\usetikzlibrary[cd]


\starttext

\starttikzcd
  A \arrow{rd} \arrow{r}{𝜑} \NC B \NR
                                 \NC C
\stoptikzcd

\starttikzcd
  A \arrow[r, "\phi"] \arrow[d, red]
    \NC B \arrow[d, "\psi" red] \NR
  C \arrow[r, red, "\eta" blue]
  \NC D
\stoptikzcd

\starttikzcd
  A \arrow[r, "\phi" near start, "\psi" below, "\eta" near end] \NC B
\stoptikzcd

\starttikzcd
  T
  \arrow[drr, bend left, "x"]
  \arrow[ddr, bend right, "y"]
  \arrow[dr, dotted, "{(x,y)}" description] \NC \NC \NR
    \NC X \times_Z Y \arrow[r, "p"] \arrow[d, "q"]
    \NC X \arrow[d, "f"] \NR
  \NC Y \arrow[r, "g"] \NC Z
\stoptikzcd

\starttikzcd[column sep=tiny]
  \NC \pi_1(U_1) \ar[dr] \ar[drr, "j_1", bend left=20]
    \NC
      \NC[1.5em] \NR
  \pi_1(U_1\cap U_2) \ar[ur, "i_1"] \ar[dr, "i_2" below]
    \NC
      \NC \pi_1(U_1) \ast_{ \pi_1(U_1\cap U_2)} \pi_1(U_2) \ar[r, dashed, "\simeq"]
        \NC \pi_1(X) \NR
  \NC \pi_1(U_2) \ar[ur]\ar[urr, "j_2" below, bend right=20]
    \NC
      \NC
\stoptikzcd

\stoptext


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2016-10-06 21:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-06 13:52 Mojca Miklavec
2016-10-06 15:54 ` Hans Åberg
2016-10-06 16:19 ` Hans Åberg
2016-10-06 21:45 ` Hans Åberg [this message]
2016-10-11 16:26   ` Alan Braslau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87C60BA7-E17C-4FF0-AB32-1F3229A7CE82@telia.com \
    --to=haberg-1@telia.com \
    --cc=mojca.miklavec.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).