I am looking for a very simple way to write a command for drawing (undirected or direct) graphs in Latex. I am aware of tikz, but it is an overkill for what I want, especially since I want the .tex file to have easy to understand logical form.

All I want is to specify a set of nodes (or just the number of nodes), a possible label for some of the nodes, and the set of edges. $G=(V,E)$ in the usual sense with labelings for $V$.

I don't mind too much what the graph looks like as long as it is logically correct.

EDIT: For example, I would specify a graph using:

```
\begin{undirectedgraph}
\Nodes[5]{a,b,c,d,e}
\Edge{1,5}
\Edge{4,3}
\end{undirectedgraph}
```

and that would draw a graph with 5 nodes, labeled a-e with edges between vertex 1 and 5 and 4 and 3.

## Best Answer

Not sure why TikZ is considered overkill. The following looks quite straight forward, although it requires LuaLaTeX: