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

 a ladder diagram

This is a ladder diagram I need help in drawing it using Tikz, please help me.

share|improve this question
People appreciate if you indicate what you have tried. Did you read the manual for the tikz-cd package, for example? – Benjamin McKay Mar 10 at 18:45
The manual you mentioned have just the basic and simple examples – s k Mar 10 at 20:03
An given a little thought those examples should be enough to produce something that looks like this. At the moment this question is more like: please make this for me, a type of question generally disliked here. At least show a bit of effort – daleif Mar 10 at 20:12
@daleif. No, you are wrong it's not like this. – s k Mar 10 at 20:37

You can use a \foreach loop like this:


  \node(h-0)[below right=1cm of g-0]{$h_{j_0}$};
  \foreach \i [count=\j from 0]in {1,...,3}{
    \node [right=2cm of g-\j](g-\i){$G_{i_\i}$}; 
    \node [right=2cm of h-\j](h-\i){$H_{j_\i}$};
    \node [right=2cm of g-\j](g-\i){$G_{i_\i} \dots$}; 
    \node [right=2cm of h-\j](h-\i){$\dots$};
  \path (g-\j) edge[<-,"$\lambda_{i_\j i_\i}$"] (g-\i) edge[<-] (h-\j);
  \path (h-\j) edge[<-] (g-\i) edge[<-,"$\mu_{j_\j j_\i}$"] (h-\i);


enter image description here

share|improve this answer
Thanks AboAmmar, I appreciate your help – s k Mar 10 at 20:12

Here's an implementation with tikz-cd:



\begin{tikzcd}[column sep=small]
G_{i_0} &&
  G_{i_1} \arrow[ll,swap,"\lambda_{i_0,i_1}"] \arrow[dl] &&
  G_{i_2} \arrow[ll,swap,"\lambda_{i_1,i_2}"] \arrow[dl] &&
  G_{i_3}\makebox[0pt][l]{ $\cdots$}
    \arrow[ll,swap,"\lambda_{i_2,i_3}"] \arrow[dl] &&
& H_{j_0} \arrow[ul] &&
  H_{j_1} \arrow[ll,swap,"\mu_{j_0,j_1}"] \arrow[ul] &&
  H_{j_2} \arrow[ll,swap,"\mu_{j_1,j_2}"] \arrow[ul] &&
  \cdots \arrow[ll,swap,"\mu_{j_2,j_3}"]


enter image description here

share|improve this answer

The package xymatrix is also good at this sort of diagram.

A ladder-style diagram

    G_{i_0}\ar@{<-}[rr]^{\lambda_{{i_0},{i_1}}}\ar@{<-}[rd] &&
    G_{i_1}\ar@{<-}[rr]^{\lambda_{{i_1},{i_2}}}\ar@{<-}[rd] && 
    G_{i_2}\ar@{<-}[rr]^{\lambda_{{i_2},{i_3}}}\ar@{<-}[rd] && 
    G_{i_3}\rlap{$\cdots$}\ar@{<-}[rd] \\
  & H_{j_0}\ar@{<-}[rr]^{\mu_{{j_0},{j_1}}}\ar@{<-}[ru] &&
    H_{j_1}\ar@{<-}[rr]^{\mu_{{j_1},{j_2}}}\ar@{<-}[ru] && 
    H_{j_2}\ar@{<-}[rr]^{\mu_{{j_2},{j_3}}}\ar@{<-}[ru] &&
    H_{j_3}\rlap{$\cdots$} \\


  • Options to the xy package: arrow defines the \ar... command; matrix defines the xymatrix environment; and pdf makes the output look better.

  • The syntax of the xymatrix environment is [setup]{rows...}. Here the setup is @C20pt which sets the cell spacing to 20pt.

  • The rows are like a regular tabular - & to delimit cells \\ to mark lines.

  • Each cell consists of some maths mode text, followed by one or more arrows.

  • The \ar syntax is: \ar @{style} [direction] ^{upper label}.

  • Labels and styles are optional.

  • Style @{<-} draws a reverse arrow.

  • Direction [rr] extends the arrow two cells to the right, [ru] one right, one up, and so on...

  • I used \rlap for the dots at the end, in order to get the spacing right.

share|improve this answer

And how about a luamplib version, showing off some Unicode maths?

enter image description here

\setmathfont[math-style=upright]{Neo Euler}
vardef connect(expr a, b) = 
  drawarrow a--b cutbefore fullcircle scaled 22 shifted a
                 cutafter  fullcircle scaled 22 shifted b
c = r = 42;

string upper_node_name, upper_arrow_mark, 
       lower_node_name, lower_arrow_mark; 

pair A,B,C,D;       

ahangle := 25; % slim arrow heads

for i=0 upto 2:

  upper_node_name := "$G_{i_" & decimal i & "}$";
  lower_node_name := "$H_{i_" & decimal i & "}$";
  upper_arrow_mark := "$λ_{i_" & decimal i & ",i_" & decimal (i+1) & "}$";
  lower_arrow_mark := "$μ_{i_" & decimal i & ",i_" & decimal (i+1) & "}$";

  A := (2c*i,0);         B := A shifted (2c,0);
  C := A shifted (c,-r); D := C shifted (2c,0);

  label(upper_node_name, A);
  label(lower_node_name, C);
  label.top(upper_arrow_mark, 1/2[A,B]);
  label.top(lower_arrow_mark, 1/2[C,D]);



label("$G_{i_3}$\rlap{$\cdots$}", B);
label("$\cdots$", D);

share|improve this answer
That's an elegant way of getting some space around the expressions. I typically draw the labels as a pic and then do cutbefore bbox label1 etc. – Aditya Mar 11 at 22:42
@Aditya - thank you - I think a rounded "invisible" boundary often looks nicer but I have hard coded the 22 here. You could use something like fullcircle scaled abs(urcorner label1-llcorner label1) to get a more automatic size. A superellipse shape can also look nice. – Thruston Mar 11 at 23:48

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.