[NTG-context] Commutative diagrams in tikz-cd: for wiki

FlorĂȘncio Neves florencioneves at gmail.com
Fri Feb 28 21:06:04 CET 2014


I have added ConTeXt support in the the newest version of tikz-cd
(which I just submitted to CTAN and should be available within the
next few days).

I didn't test it very extensively.  Let me know if there is any problems.

On 5/25/13, Idris Samawi Hamid ادريس   سماوي حامد <ishamid at colostate.edu> wrote:
> Dear gang,
>
> With a couple of modifications I got tikz-cd (a package to make
> commutative diagrams for categories and toposes etc. by Florêncio Neves)
> working in mkiv:
>
> http://texdoc.net/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.pdf
>
> It depends on the tikz module, already supported in mkiv.
>
> The tikz-cd module is attached, and here is a sample file:
>
> ===============
> \usemodule[tikz]
> \usetikzlibrary{commute}
>
> \starttext
> \starttikzcd %[ampersand replacement=\&]
> A \arrow{rd} \arrow[yshift=0.5ex]{r}{\phi} \& B \\
> \& C
> \stoptikzcd
>
> \starttikzcd %[ampersand replacement=\&]
> A
> \arrow[yshift=1.5ex]{r}
> \arrow[yshift=0.0ex]{r}
> \& B \arrow[xshift=0.7ex]{d} \arrow[xshift=-0.7ex]{d} \\
> \& C
> \stoptikzcd
> \stoptext
> ===============
>
> A couple of things:
>
> 1 I had to comment out line 396 of pgfsys-pdftex.def in the tikz module,
> or else I'd get an undefined control sequence. It's not needed anyway
> since that's pdftex.
>
> 2 In tikzlibrarycommute.code.tex, line 395 I had to add the option
>
> ampersand replacement=\&
>
> to avoid a TeX error. So you'll have to use '\&' instead of '&' for matrix
>
> arrays.
>
> 3 Some LaTeX-specific stuff is commented, and support is added for
>
> \starttikzcd \stoptikzcd
>
> so we get a ConTeXt environment.
>
>
> I'm hoping someone can volunteer to place this on the wiki, perhaps even
> set it up on the modules page, with an indication of its proper place in
> the texmf-modules tree etc.
>
> Any other improvements will also be appreciated. Enjoy!
>
> Best wishes
> Idris
> --
> Professor Idris Samawi Hamid
> Department of Philosophy
> Colorado State University
> Fort Collins, CO 80523


More information about the ntg-context mailing list