Skip to main content
Share Your Experience: Take the 2024 Developer Survey
24 votes

How to put a square inside a commutative diagram?

The right way with tikz-cd is to use a "phantom" arrow as in \arrow[dr, phantom, "\square"] MWE (I've used some code to reproduce the picture and not yours): \documentclass{article} \usepackage{...
karlkoeller's user avatar
18 votes
Accepted

Line is not perfectly horizontal in Commutative Diagram in Tikz

The \mathbb{B}_j on the right is deeper than the \mathbb{B} on the left, that is why the line is lower on the right. You can just add a \vphantom{_j} to the node on the left to compensate for this. \...
AboAmmar's user avatar
  • 46.5k
15 votes
Accepted

Want to draw this commutative diagram

We use the tikz-cd-package for this. If you are a beginner, you probably should have a look at this online-editor. \documentclass[a4paper]{article} \usepackage{tikz-cd} \begin{document} \begin{...
Jan's user avatar
  • 619
15 votes
Accepted

Paul Taylor's diagrams.sty NEVER HAPPEN error

It should be reported to the package author (also the version on ctan does not run at all as it fails a date self-check). It is missing an \unskip for current latex, this patches it to run without ...
David Carlisle's user avatar
14 votes

Arrow fat at one end, narrowing at the other end

Well, it's not perfect but maybe this can get you started: Basically I just made an arrow tip with Latex followed by Triangle, and then used it as a decoration on the arrow line (which is drawn in ...
Sandy G's user avatar
  • 44.4k
11 votes

Line is not perfectly horizontal in Commutative Diagram in Tikz

I suggest using tikz-cd: \documentclass{article} \usepackage{amsmath,amssymb,tikz-cd} \begin{document} \[ \begin{tikzcd} \mathbb{B} \arrow[r,"h_j"] \arrow[dr,swap,"h_i"] & \mathbb{B}_j \arrow[...
egreg's user avatar
  • 1.1m
11 votes
Accepted

Centering diagrams made with tikz-cd

The reason for this is that the curved arrows define helper coordinates that are placed far outside the drawn parts of the diagram, so the diagram contains a lot of whitespace, and its width is ...
Torbjørn T.'s user avatar
11 votes
Accepted

Drawing rectangular commutative diagrams

Same principle really. See the diagram as a 4×3 matrix. In the first row you have KF' in the second column, nothing in the first and third col. In the second row you have K and F' in the first and ...
Torbjørn T.'s user avatar
11 votes
Accepted

Problem with a commutative diagram

You need three columns. But also to vertically align \pi and \pi'. With \setheight{x}{y} we typeset x, but as if its vertical dimensions were those of y. \documentclass{article} \usepackage{amsmath} ...
egreg's user avatar
  • 1.1m
11 votes

Arrow fat at one end, narrowing at the other end

You second sketch is much easier to implement, I believe. Idea: Get the length of the path. (This only permits one segment, i.e. one line-to or one curve-to.) Use that length to set the length of the ...
Qrrbrbirlbel's user avatar
10 votes
Accepted

LaTeX code for commutative diagram

Just make a matrix with four rows, and empty cells where appropriate. \documentclass{article} \usepackage[all]{xy} \begin{document} \xymatrixrowsep{2mm} % I modified this \xymatrixcolsep{10mm} \...
Torbjørn T.'s user avatar
10 votes
Accepted

How to put a square inside a commutative diagram?

Two solutions: one with pstricks and a psmatrix environment, the other with tikz-cd, in which I use the short syntax for arrows: \documentclass{article} \usepackage{mathtools, amssymb} \usepackage{...
Bernard's user avatar
  • 272k
10 votes
Accepted

How to make a commutative diagram using {tikz-cd}?

Think to a matrix and add the arrows: \documentclass{article} \usepackage{amsmath,amssymb,tikz-cd} \begin{document} \begin{equation*} \begin{tikzcd}[row sep=huge] A \arrow[r,"\phi_n"] \arrow[d,swap,...
egreg's user avatar
  • 1.1m
10 votes
Accepted

tikz Commutative Diagrams - Compiling and Best Practice

Here there is my version with tikz-cd. It is very easy to create simple and complex commutative diagrams. Advice: do not worry about the background because It does not appear. Your initial code it ...
Sebastiano's user avatar
  • 55.6k
10 votes

Drawing a commutative diagram

with slightly different code syntax as is in nice Sebastiano answer:-) \documentclass[border=3mm]{standalone} \usepackage{tikz-cd} \begin{document} %--------------------------------------------------...
Zarko's user avatar
  • 298k
10 votes
Accepted

Labelling arrows drawn to paths in tikz-cd

You can add a node at the second segment of the path. \begin{tikzcd} & K^n \arrow[r, "L^A_B(F)"] \arrow[dd, rounded corners, to path={ -- ([xshift=-10ex]\tikztostart.west) ...
Sigur's user avatar
  • 37.4k
10 votes
Accepted

Text above isomorphism symbol

Like this? \documentclass[a4paper,12pt]{article} \usepackage{amsmath,amssymb} \begin{document} $A\overset{a}{\cong}B, c\underset{b}{\cong}D$ \end{document} It is possible to use \text from ...
Sebastiano's user avatar
  • 55.6k
9 votes

How to draw an Auslander-Reiten quiver?

I have used the advice of the excellent user @egreg. You can change the tip of the vectors by looking at this link: Is it possible to change the size of an arrowhead in TikZ/PGF?. I believe that the ...
Sebastiano's user avatar
  • 55.6k
9 votes
Accepted

Draw dephased exact sequence diagram

Well, my code isn't pretty but I think it gets the job done. I feel more comfortable with plain tikz for tweaking all the positions (the key for legibility, I think), so I prefer this method to tikz-...
Juan Castaño's user avatar
9 votes

Arrow fat at one end, narrowing at the other end

You can create your own custom decoration. With the following, you can use options to customize the appearance of the arrow as described in the picture below. \documentclass[border=10pt]{standalone} \...
Jasper Habicht's user avatar
8 votes
Accepted

Arrows for morphisms of exact sequences

If you like a TikZ solution (with also the diagonal arrow): \documentclass{article} \usepackage{tikz-cd} \begin{document} \begin{tikzcd}% 0 \arrow[r] & M' \arrow[r] \arrow[d] \arrow[...
CarLaTeX's user avatar
  • 64.3k
8 votes

LaTeX code for commutative diagram

Here is a solution using the package tikz-cd. \documentclass[border=1mm,varwidth]{standalone} \usepackage{tikz-cd} \usepackage{mathrsfs} \begin{document} \paragraph{Step 1:} Position the nodes in a ...
gernot's user avatar
  • 49.7k
8 votes
Accepted

How to draw a commutative cube diagram with colored faces with a small upper-right corner x-y-z axis

A "pure" tikz-cd attempt: \documentclass{article} \usepackage{tikz-cd} \usetikzlibrary{patterns} \definecolor{grey1}{RGB}{71,71,71} \definecolor{grey2}{RGB}{100,100,100} \begin{document} \begin{...
karlkoeller's user avatar
8 votes
Accepted

Drawing a commutative diagram

\documentclass[a4paper,12pt]{article} \usepackage{tikz-cd} \begin{document} \begin{tikzcd} L \arrow[dd, "\forall \delta"'] \arrow[rr, "\varepsilon"] & & U(L) \arrow[lldd, "\exists ! f"] \\ &...
Sebastiano's user avatar
  • 55.6k
8 votes

How to arrange commutative diagrams in displayed form

I'd use an aligned: \documentclass{article} \usepackage{amsmath,amssymb,tikz-cd} \begin{document} \[ \begin{tikzcd}[row sep=huge] \mathbb{E}\arrow[d, "p"]\\ \mathbb{B} \end{tikzcd} \qquad\qquad ...
egreg's user avatar
  • 1.1m
8 votes

How to define multiple functions in the same diagram?

You can use tabstackengine to get the proper math spacings and align the operators. \documentclass{article} \usepackage{amsmath} % \xleftarrow, \xrightarrow \usepackage{stmaryrd} % \mapsfrom \...
Steven B. Segletes's user avatar
8 votes
Accepted

label a part of commutative diagram

Is this what you mean? You can add the labels to your diagram with no arrows: \[\begin{tikzcd} \underline{V} \arrow[rrrrdd, bend left] \arrow[rrdddd, bend right] \arrow[rrdd, dotted] & &&...
Sandy G's user avatar
  • 44.4k

Only top scored, non community-wiki answers of a minimum length are eligible