# Little graphs of groups [closed]

I am writing a little document about graphs of groups, and I would like to illustrate the theory with the simple examples of graphs with only one edge:

Unfortunately, I do not know how to write such vertex and loop. Is there a simple way to to do this?

• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
– user31729
Jul 5, 2014 at 10:33
• My question is rather general, so in fact I do not know what I could add. If it can help, I use \documentclass{article} and I would like to insert the expressions inside a text. Jul 5, 2014 at 11:23
• @Seirios The idea behind MWEs is that we like TeX users to try things on their own and show what the result it. It is ok to fail, and if a wizard answers you, it will probably be much nicer than what you can achieve, but it is always a good thing to try. There may be several ways to achieve what you want (symbols, graphics, whatever), so you need to try something and show us the way. Jul 5, 2014 at 13:00

This macro should give you a start. I make a TikZ node and a looped edge.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark,positioning}
\newcommand*{\simplegraph}[1]{%
\tikz[baseline = (vertex.base)]
\draw node (vertex) {$#1$}
(vertex.south) edge [out=-60, in=60, distance=4em] (vertex.north);
}
\begin{document}
$D_1 \bigg( \simplegraph{A} \bigg)$
\end{document}


The following example defines \xrelbar in the same way as \xrightarrow of package amsmath. The circle is drawn by tikz and the background of A is made white to overprint the arc of the circle in the area of the A:

\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{stackrel}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}

\makeatletter
\newcommand*{\xrelbar}[2][]{%
\ext@arrow 0055\relbarfill@{#1}{#2}%
}
\newcommand*{\relbarfill@}{%
\arrowfill@\relbar\relbar\relbar
}
\makeatother

\begin{document}

$D_1 \big( A \xrelbar[\subset]{} B \big) \simeq A \stackbin[\subset]{}{*} B$
$D_1 \big( D_1 \big( \tikz[baseline=(A.base), inner sep=1pt] \draw node[ellipse, fill=white] (A) {\kern-2ptA\kern-2pt} (A) ++(2ex,0) circle[radius=2ex] ; \,\vcenter{\hbox{\scriptstyle\subset}} \big) \simeq \stackbin[\subset]{}{*} A$

\end{document}