# How to make side by side items using tikz

I wanted to write something wherein i need all confirmations of a graph side by side and argue something. How could I do that using Latex and Tikz.

Like i want all graph configurations with 3 edges and pick the one which I wanted how can i do it?

• and what you try so far? do you like to have two figures side by side? Oct 25, 2016 at 17:54

Draw the graphs as tikzpictures and use the baseline option to indicate on which node the pictures should get aligned.

\documentclass{article}
\usepackage{tikz}
\begin{document}
\tikzset{vertex/.style={circle,draw,minimum width=3mm}}
\begin{tikzpicture}[auto,baseline=(c)]
\node[vertex] (a) at (0,0) {};
\node[vertex] (b) at (1,0) {};
\node[vertex] (c) at (2,0) {};
\node[vertex] (d) at (3,0) {};
\draw (a) -- node{1} (b)
-- node{2} (c)
-- node{3} (d);
\end{tikzpicture}
\begin{tikzpicture}[auto,baseline=(c)]
\node[vertex] (a) at (0, 0.5) {};
\node[vertex] (b) at (0,-0.5) {};
\node[vertex] (c) at (1, 0  ) {};
\node[vertex] (d) at (2, 0  ) {};
\draw (a) -- node{1} (c)
-- node{2} (d)
(b) -- node[swap]{3} (c);
\end{tikzpicture}
\end{document}


• how can label the edges in the process of making the edges. Oct 25, 2016 at 20:29
• @Jaugust I have modified the answer to show how to label the edges. Oct 25, 2016 at 21:56