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

I want to produce a some kind of lattice diagram, such as a Hasse diagram. How can I do so? I tried using matrix with letters and slashes but it seems ugly. Do I need any additional packages?

EDIT: I mean graph like this one (for zessenhaous lemma):enter image description here

share|improve this question
what is a lattice, hasse graph? – percusse Aug 22 '13 at 15:10
there are several packages that are intended to create such diagrams. someone will probably recommend tikz. xypic and pstricks also provide such capabilities. – barbara beeton Aug 22 '13 at 16:56
In LyX, go to File > Open then go to examples, then click on "xypic.lyx". Similarly, you could try Help > Specific Manuals > XY-pic Manual (although this might have been added only in a recent version, I forget). Both documents are the same. – scottkosty Aug 22 '13 at 22:53
Paul Taylor's diagrams package will also work. I'm not sure which is easiest. – isomorphismes Mar 17 '15 at 17:33
up vote 9 down vote accepted

According to @barbarabeeton, here comes a possible PSTricks solution for the example you gave:

\newpsstyle{DblDash}{linestyle=dashed, dash=1pt 1.5pt, doubleline}
[name=11] $A_1$ & & & & [name=12] $B_2$\\
& [name=21] $A(A_1\cap B_1)$ & & [name=22] $B(A_1\cap B_1)$ \\
& [name=31] $A(A_1\cap B)$ & [name=32] $A_1\cap B_1$ & [name=33] $B(A\cap B_1)$ \\
[name=41] $A$ & & [name=42] $D$ & & [name=43] $B$\\
& [name=51] $A\cap B_1$ & & [name=52] $A_1 \cap B$ \\
& & [name=61] $A\cap B$

This gives the output:

enter image description here

share|improve this answer

It's quite easy with tikz-cd, with a very natural syntax. I tried [double,densely dotted], but the result is not really nice.



\begin{tikzcd}[tips=false,column sep=1em,row sep=1.5em]
A_1 \ar{dr} &&&& B_1 \ar{dl} \\
& A(A_1\cap B_1) \ar{dr}
  \ar[densely dotted,shift left=.2ex]{d}
  \ar[densely dotted,shift right=.2ex]{d} &&
  B(A_1\cap B_1) \ar{dl}
  \ar[densely dotted,shift left=.2ex]{d}
  \ar[densely dotted,shift right=.2ex]{d} \\
& A(A_1\cap B_1) \ar{dl} \ar{dr} & A_1\cap B_1 \ar{d} &
  B(A_1\cap B_1) \ar{dl} \ar{dr} \\
A \ar{dr} && D \ar{dl} \ar{dr}  && B \ar{dl} \\
& A\cap B_1 \ar{dr} && A_1\cap B \ar{dl} \\
&& A\cap B


enter image description here

share|improve this answer

Just for fun, with TikZ and borrowing some code from Christoph answer



\matrix (a) [matrix of math nodes, column sep=0.6cm, row sep=0.5cm]{
A_1 & & & & B_2\\
& A(A_1\cap B_1) & & B(A_1\cap B_1) \\
& A(A_1\cap B) & A_1\cap B_1 & B(A\cap B_1) \\
A & & D & & B\\
& A\cap B_1 & & A_1 \cap B \\
& & A\cap B \\};

\foreach \i/\j in {1-1/2-2, 1-5/2-4,  2-2/3-3, 2-4/3-3,%
         3-2/4-1, 3-2/4-3, 3-3/4-3, 3-4/4-3, 3-4/4-5,%
         4-1/5-2, 4-3/5-2, 4-3/5-4, 4-5/5-4, 5-2/6-3,5-4/6-3}
    \draw (a-\i) -- (a-\j);

\draw[double,densely dotted] (a-2-2)--(a-3-2) (a-2-4)--(a-3-4);

enter image description here

share|improve this answer

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.