From: "Idris Samawi Hamid ادريس سماوي حامد" <ishamid@colostate.edu>
To: ntg-context@ntg.nl
Cc: "Florêncio Neves" <florencioneves@gmail.com>,
"Mojca Miklavec" <mojca.miklavec.lists@gmail.com>
Subject: Commutative diagrams in tikz-cd: for wiki
Date: Sat, 25 May 2013 16:40:37 -0600 [thread overview]
Message-ID: <op.wxnvxt0kpw6hmh@ishamid-pc> (raw)
[-- Attachment #1: Type: text/plain, Size: 1650 bytes --]
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
[-- Attachment #2: tikzlibrarycommute.code.tex --]
[-- Type: application/x-tex, Size: 28580 bytes --]
[-- Attachment #3: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
next reply other threads:[~2013-05-25 22:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-25 22:40 Idris Samawi Hamid ادريس سماوي حامد [this message]
2014-02-28 20:06 ` Florêncio Neves
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=op.wxnvxt0kpw6hmh@ishamid-pc \
--to=ishamid@colostate.edu \
--cc=florencioneves@gmail.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).