# Graphs of Lie algebras in Latex

For example, I have this

\documentclass[12pt,reqno]{book}
\usepackage{dynkin-diagrams}
\begin{document}
$\begin{array}{cc} A_1 \times A_1 & \dynkin{A}{1}\dynkin{A}{1} \\ A_2 & \dynkin{A}{2} \\ B_2 & \dynkin{B}{2} \\ G_2 & \dynkin{G}{2} \end{array}$
\end{document}


I would like to have a larger graph, and also I would like to give names to vertices like in chapter 13 page 145 of the book cited in a related question.

• The formatting is unreadable (please format code as a block of code) and the question is not specific enough for me to know what you would like. Can you provide an example of the output you want? – Davislor Aug 24 '19 at 16:59
• Welcome to TeX.SX! He might know when you properly format the code. select the code block and use the '{}' on top of the edit window. To address someone please use @... this regarding your "Answer" – albert Aug 24 '19 at 17:28

First an unrelated comment: use $...$, not $$...$$ for display math, see Why is $...$ preferable to $$...$$?.

As mentioned in section 2 of the dynkin-diagrams manual, you can set global options for how the diagrams should look. For example with

\pgfkeys{
Dynkin diagram,
edge length=1cm,
}


you get 1cm between the dots in your diagrams, and the dots get a radius of 2pt.

For labels, the package has options for this. I don't have the book you are referring to (so a description, or sketch, would be more helpful), but for example with \dynkin[labels={a,b}]{A}{2} the two vertices get the labels a and b below them.

\documentclass[12pt,reqno]{book}
\usepackage{dynkin-diagrams}
\pgfkeys{
Dynkin diagram,
edge length=1cm,
$\begin{array}{cc} A_1 \times A_1 & \dynkin{A}{1}\dynkin{A}{1} \\ A_2 & \dynkin[labels={a,b}]{A}{2} \\ B_2 & \dynkin{B}{2} \\ G_2 & \dynkin{G}{2} \end{array}$