TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


\node (A) at (1,0) {$0$};
\node (B) at (2,0) {$H^1(G/H,M^H$};
\node (C) at (3,0) {$H^1(G,M)$};
\node (D) at (4,0) {$H^1(H,M)$};
\path[->,font=\scriptsize,>=angle 90]
(A) edge node[above]{} (B)
(B) edge node[above]{$\textnormal{Inf}$} (C)
(C) edge node[above]{$\textnormal{Res}$} (D);


I'm writing a LaTeX document with this code and while the diagram has appeared in the right order, they are squeezed together because of the length of the elements in the sequence. How can I fix this?

share|improve this question
Welcome to TeX.SX! – egreg Jun 10 '14 at 20:34

You want to use tikz-cd:


0 \arrow{r} &
H^1(G/H,M^H) \arrow{r}{\Inf} &
H^1(G,M) \arrow{r}{\Res} &

enter image description here

share|improve this answer
Thanks for the quick response! – Haikal Yeo Jun 10 '14 at 20:36
I'm not a specialist in group cohomology, but I've used several diagrams and exact sequences. ;-) – egreg Jun 10 '14 at 20:39
I got this error when I typed the code into my latex document in SAGE: <inserted text> \cr l.231 ! Misplaced \cr. <inserted text> \cr Do you know what's wrong? – Haikal Yeo Jun 10 '14 at 21:02
@HaikalYeo Sorry, but I don't know about SAGE. Are you sure you have an up-to-date TeX distribution? – egreg Jun 10 '14 at 21:03
Have a look at the Sage tutorial where there are instructions about how to include latex packages. – Andrew Swann Jun 11 '14 at 6:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.