Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [tikz-cd]

{tikz-cd} concerns commutative diagrams produced by the tikz-cd package.

4
votes
2answers
96 views

draw dynamic circle around node and edges

How do I add the red circle as shown in below image but with dashed line circle. I want it to follow the path structure. So far, this is my code: \begin{forest} [$root : s_0$ [$a: s_*$ [$d: s_*$] [$...
1
vote
1answer
26 views

arrow across two tree Tikz

How do i add the dash line between two tree as in image below, \begin{center} \begin{tabular}{p{4cm}p{4cm}} \tikzset{my dbl/.style={double,double distance=2pt}} \centering \begin{forest} for tree={...
2
votes
0answers
46 views

Commutative diagram not working on tikzcd [closed]

I'm using the \usepackage{tikz-cd} and I'm trying to make a commutative diagram. Why doesn't this simple code work? $$ \begin{tikzcd} A \arrow {rd}{f} \arrow{r}{\phi} & B \\ & C \end{...
5
votes
1answer
119 views

Typsetting diagram chases (with TikZ?)

Background. I recently came across a Youtube video with a bunch of really nicely typeset 'diagram chases' that seem to have been made in TeX (perhaps TikZ?): I'd like to create something similar for ...
3
votes
1answer
98 views

Format single node in tikzcd

Is it possible to format a single node in tikzcd? In the below MWE, I would like the \dots cell to not have an ellipse. MWE \documentclass{article} \usepackage{tikz-cd} \usetikzlibrary{shapes} \...
0
votes
2answers
17 views

rotate wide commutative diagram tikzcd

I have a very large commutative diagram that is too big for the margins. I have shortened the names of the objects as much as possible. I have tried using the option [cramped] and setting the column ...
2
votes
1answer
23 views

Commutative diagram with non-uniform arrows

I wrote following program for a commutative diagram. \begin{tikzcd} 0\arrow[r] & M\arrow[r]\arrow[d] & N\arrow[r]\arrow[d] & K\arrow[d]\\ 0\arrow[r] & M'\arrow[r] & N' \...
0
votes
1answer
26 views

Labeling arrows in commutative diagrams

I draw a commutative diagram by following commands, but I was unable to put labels on maps (Arrows). The diagram commands are as below: \begin{center} \tikzcdset{row sep/normal=2cm} \begin{tikzcd} &...
1
vote
1answer
28 views

Circular orientation arrow

I am trying to create the following image in tikz. But the problem is that I am not able to draw the circular arrows as needed. Instead, my figure looks like this: How can I add the orientation ...
2
votes
1answer
20 views

Use the amsmath \looparrowright in a tikz-cd

I would like to render a commutative diagram involving some topological immersions; these are referred to elsewhere using G\looparrowright B with the arrow coming from amsmath. I've had a heck of a ...
4
votes
2answers
93 views

Mapping arrows in commutative diagrams

In making commutative diagrams in tikz-cd I've been wanting to add in 'mapping' arrows that describe what particular elements map to, parallel to the main diagram arrows. I've been doing it in the ...
1
vote
1answer
27 views

tikz-cd arrows not aligned

For some reason, the arrows in my tikz-cd diagram are not aligned. How do I get them to align? MWE \documentclass{article} \usepackage{tikz-cd} \usetikzlibrary{shapes} \begin{document} \begin{...
2
votes
2answers
68 views

How to draw multiple arrows indicating different nodes using tikz matrix

How to write this diagram using tikz matrix?
4
votes
2answers
47 views

tikz-cd nested tikzpicture wrong center anchor

I want to place a tikzpicture in a node/cell of a tikz-cd diagram and then paint some more stuff in the inner tikzpicture. However, it seems that the nesting messes up the center anchor. Concretely: ...
1
vote
1answer
35 views

tikz-cd doesn't compile examples from the manual [duplicate]

I don't know if this a problem with my local TeX-Distribution (macTeX 2018) or with tikz-cd itself, how ever: I can't compile basic examples from the tikz-cd manual, like this: \documentclass{...
4
votes
2answers
39 views

Having arrows enter and leave from different parts of a node in tikzcd

I am trying to get arrows to enter and leave different parts of a node in a particular diagram I'm writing in tikzcd. So far I have the following: \begin{tikzcd} \makebox[1em][r]{$Long text 1$} \...
1
vote
2answers
39 views

Label inside tikzcd square

I have part of a diagram with tikzcd which looks like this: \begin{tikzcd}[column sep=20mm] A\ar[rd,"a"] & \\ B\ar[rd,"b"]\ar[u,"b"] & C \\ & D\ar[u,"d"] \end{tikzcd} and produces the ...
6
votes
4answers
624 views

Getting extremely large arrows with tikzcd

I have a quite large description of an arrow, and row sep = huge does not make the arrow long enough. Is there a way to format this better? \documentclass{article} \usepackage{amsmath} \usepackage{...
3
votes
1answer
54 views

Tikz diagram - Tag on vertical arrow

Consider the following code for a commutative diagram \begin{tikzcd}[column sep=50pt] A \arrow[swap]{d}{\text{example}}\arrow{r} & B \arrow[leftarrow]{dl}\\ C \end{tikzcd} The tag "example" ...
2
votes
2answers
70 views

How to use tikz in fbox?

I am trying to put a diagram into a box as \fbox{ \begin{tikzcd} A \arrow[rd] \arrow[r, "\phi"] & B \\ & C \end{tikzcd} } The whole code is \documentclass[10pt]{amsart} \usepackage{amssymb} ...
3
votes
2answers
159 views

How to draw lines on a tikz-cd diagram

I am drawing a matrix using tikz-cd. I would like to draw some vertical and horizontal lines on it too to indicate particular submatrices but I don't understand the syntax. This is my M(N)WE: \...
5
votes
2answers
141 views

Improve appearance of matrices as arrow labels in tikz-cd

\documentclass[a4paper,12pt,reqno]{article} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{mathrsfs} \usepackage{amsmath} \usepackage{amsthm} \usepackage{titlesec} \usepackage[top=26mm,bottom=...
6
votes
3answers
316 views

label a part of commutative diagram

\documentclass[12pt,reqno,a4paper]{amsart} \usepackage{extsizes} \usepackage{blindtext} \textheight 9.3in \textwidth 6.5in \calclayout \usepackage{amsmath,amsthm,amsfonts,amssymb} \usepackage{hyperref}...
2
votes
1answer
37 views

tikzcd environment: error in double/parallel arrow?

\documentclass{beamer} \usepackage{tikz-cd} \usetikzlibrary{matrix} \begin{document} \begin{frame}[fragile] \begin{center} \begin{tikzcd}[row sep=2.3cm, column sep = 2.3cm] A\arrow{r}{e}\arrow{d}[...
0
votes
1answer
115 views

I need help to make a correction

The shape of the diagram I want to draw in the following picture: This is what I tried: \[ \begin{tikzcd} & & 1 \\ & 1^{\ast} \...
0
votes
1answer
29 views

Tikzcd in Minipage [duplicate]

My goal is to have two commutative diagrams beside each other (but together centered) and with two captions. I tried the following code: \documentclass[twoside,12pt]{scrartcl} \usepackage{amsmath} ...
2
votes
1answer
65 views

Two labels up and down for same arrow

Starting from \documentclass[a4paper,12pt]{article} \usepackage{tikz-cd} \begin{document} \begin{tikzcd} A \arrow[r, "\alpha"] & B \end{tikzcd} \end{document} reading the guide of tikz-cd I ...
2
votes
0answers
23 views

Tikz-cd natural transformation diagram [duplicate]

I would like to make the diagram \documentclass{article} \usepackage{amsmath,amsfonts} \usepackage{tikz-cd} \begin{document} \[ \begin{tikzcd} A \arrow[r, bend left=40, "H\...
1
vote
1answer
60 views

Add caption for diagram in tikz cd

consider the following code. \documentclass[14pt,reqno,a4paper]{amsart} \usepackage{extsizes} \usepackage{blindtext} \textheight 9.3in \textwidth 6.5in \calclayout \usepackage{amsmath,amsthm,amsfonts,...
2
votes
1answer
45 views

I can't find the error in a tikzcd diagram

The code is \documentclass{article} \usepackage{tikz-cd} \begin{document} \begin{tikzcd} \hom(A, A) \arrow[d, "\hom(A, f)"] \arrow[r, "\hom(h, B)"] & \hom(A', B) \arrow[d, "\hom(A', f)"] \\ ...
6
votes
5answers
465 views

How to define multiple functions in the same diagram?

I want to write something like this: So far I tried with tikzcd, but I did not manage to give the arrows the right placement and length.
3
votes
2answers
109 views

Composition of natural transformations diagram

I'd like to draw a diagram with tikz-cd for a composition of natural transformations between functors that looked like the following The best I could do so far is given by the following code: \...
3
votes
1answer
78 views

Adjoint functors diagram

I'd like to improve the following diagram for a pair of adjoint functors: This is the code: \documentclass{article} \usepackage{amsmath,amssymb,tikz-cd} \begin{document} \[ \begin{...
6
votes
2answers
65 views

How to arrange commutative diagrams in displayed form

I would like to arrange the following three diagrams \[ \begin{tikzcd} Z\arrow[dr, "h", dashed]\arrow[drr, "g", bend left]\\ & X\arrow[r, "f"] & Y \end{tikzcd} ...
0
votes
0answers
22 views

Typing ordered pairs over arrows in a tikz-cd [duplicate]

When I try to type an ordered pair like (x,y) over an arrow in a tikz-cd I get the following error message: Missing \endcsname inserted. The code that works looks like this: \begin{tikzcd} ...
4
votes
3answers
74 views

Is there a way to “shrink” this tikzpicture?

I used a graphical editor to construct a some tikzcd diagrams, but I am looking for a way to "shrink" the diagram if possible, as they are quite wide, and aren't quite fitting on my pages. Any help ...
2
votes
2answers
52 views

equations in tikz commutative diagram

This question had good answers, here: equation label within commutative diagram and I thank everyone again. But the text is very sensitive to changes, so when I try to change what people suggested, ...
3
votes
4answers
111 views

node position in tikz-cd

I'd like to get the appended below commutative diagram by using tikz-cd. The source has been made in TeX, and the positioning of the nodes at the bottom row i.e. coker ker f and ker coker f have been ...
3
votes
1answer
39 views

Correct spacing in tikz-cd with kpfonts

Tikz-cd does not respect spacing correctly when used with kpfonts. Here is a MWE \documentclass{minimal} \usepackage{kpfonts} \usepackage{tikz-cd} \usepackage{amsmath} \begin{document} \begin{tikzcd} ...
0
votes
1answer
40 views

Filling in a square with custom sides

I have the following code which produces the boundary of a square with each side labeled with a certain kind of arrow. I want to fill the interior with a color, but when I add "fill=color" as an ...
3
votes
1answer
45 views

I need help restructuring some Tikz code

I am trying to render the commutative diagram below in such a way that the arrows u and v are reversed, but I'm not sure how to do that. Any help would be appreciated. \documentclass{standalone} \...
3
votes
2answers
72 views

arrow length and text placing to left in tikzcd

I am trying this: \documentclass[10pt]{article} \usepackage{amsmath,amssymb,tikz-cd} \begin{document} \begin{equation*} \begin{tikzcd}[row sep=huge] A \arrow[r, "aaa"] \arrow[d, "xxxx"] & ...
2
votes
2answers
194 views

can you help for diagram for in latex?

\begin{tikzcd} 3 \arrow[dr] & \\ 4 \arrow[r] & 2\arrow[dr] & \\ 1 \end{tikzcd} could you help me? how do yo writting latex?
2
votes
1answer
20 views

Check if mmode Command Doesn't Work in Tikz-cd environment

I have a command that allows me to write \terminal in math mode and it print in its bb-bold style, but also allows me to call it in text mode as \terminal (as opposed to \(terminal\) or whatever). The ...
0
votes
1answer
56 views

Diagram of objects in latex

I'm trying to write a code for some diagram, but it does not work. \begin{tikzcd} Z\arrow[lu]\arrow[lu]\arrow[lu]\\ X \arrow[r]& Z^{"} & \arrow[l] Y \\ Z^{'} \arrow[rd] \arrow[rd] \...
2
votes
1answer
28 views

How to test alignment of tikzcd nodes?

I have the following diagram in tikzcd: Generated by this MWE: \documentclass[border=1cm]{standalone} \usepackage{tikz} \usetikzlibrary{cd} \begin{document} \begin{tikzcd} &&& \...
4
votes
1answer
77 views

Commutative diagram using TikZ

\begin{tikzcd} A \arrow{rr}\arrow{dr} & & B \arrow{rr}\arrow{dl} & & C \\ & D \arrow{dr} \\ ...
4
votes
2answers
101 views

Dashed hook right arrow

I'd like to use a dashed hook right arrow instead of a classic one in my LaTeX document, but I don't know how to create one. MWE: \documentclass[a4paper]{article} \usepackage[T1]{fontenc} \usepackage[...
1
vote
1answer
71 views

Tikz-cd arrow bending and loop for indicating that portion of diagram commutes

I am trying to get the arrow from $R$ to $R[x]$ to cooperate with me and go alongside the LHS of the picture. Here is my MWE: \begin{tikzcd} & R \arrow[d, "f"] \arrow[ld, "\phi"', hook'] \...
5
votes
4answers
155 views

Linebreak inside label - tikzcd package

I am using tikzcd. I want to use line breaks within the label of the arrows. Naively, I thought that \begin{tikzcd} A \arrow[d, "label 1 \\ label 2"] \\ B \end{tikzcd} would work. But it gives ...