0

This question already has an answer here:

\documentclass[a4paper, 12pt]{article}
\usepackage{amsfonts}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}

\begin{document}

    \begin{tikzpicture}[scale=0.90,
acteur/.style = {circle, fill=black, thick,
                 inner sep=0.5pt, outer sep=0pt, minimum size=1.3mm},
   decoration = {markings, mark=at position 0.5cm with {\arrowreversed[semithick]{>}}},
every label/.append style = {font=\scriptsize},
     ]
\node (v2) at (0,0) [acteur,label=below:$v_2$]{};
\node (v1) at (0,1)[acteur,label=above:$v_1$]{};
\node (v3) at (1,0) [acteur,label=below:$v_3$]{};
\node (v4) at (2,0) [acteur,label=below:$v_4$]{};
\node (v5) at (2,1) [acteur,label=above:$v_5$]{};
\node (v6) at (1,1) [acteur,label=above:$v_6$]{};
%
\draw (v1) -- (v2);
\draw (v3) -- (v6);
\draw (v5) -- (v4);
\draw (v1) -- (v6);
\draw (v2) -- (v3);
\draw (v6) -- (v5);
\draw (v3) -- (v4);
%
\node at (-2.5,1) {\textit{$G_1$}};
\end{tikzpicture}





\begin{tikzpicture}[scale=0.90,
acteur/.style = {circle, fill=black, thick,
                 inner sep=0.5pt, outer sep=0pt, minimum size=1.3mm},
   decoration = {markings, mark=at position 0.5cm with {\arrowreversed[semithick]{>}}},
every label/.append style = {font=\scriptsize},
     ]
\node (v2) at (0,0) [acteur,label=left:$v_2$]{};
\node (v3) at (1,0)[acteur,label=right:$v_3$]{};
\node (v1) at (0.5,1) [acteur,label=above:$v_1$]{};

%
\draw (v1) -- (v2);
\draw (v2) -- (v3);
\draw (v3) -- (v1);

%
\node at (-2.5,1) {\textit{$G_2$}};
\end{tikzpicture}
\end{document}
How I can put the following two figure side by side?

















































marked as duplicate by John Kormylo tikz-pgf Jun 13 at 15:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Note that the blank line between the two tikzpictures starts a new paragraph. – John Kormylo Jun 13 at 15:21
1

One way is adding \hfill between them:

\documentclass[a4paper, 12pt]{article}
\usepackage{amsfonts}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}

\begin{document}

    \begin{tikzpicture}[scale=0.90,
    acteur/.style = {circle, fill=black, thick,
        inner sep=0.5pt, outer sep=0pt, minimum size=1.3mm},
    decoration = {markings, mark=at position 0.5cm with {\arrowreversed[semithick]{>}}},
    every label/.append style = {font=\scriptsize},
    ]
    \node (v2) at (0,0) [acteur,label=below:$v_2$]{};
    \node (v1) at (0,1)[acteur,label=above:$v_1$]{};
    \node (v3) at (1,0) [acteur,label=below:$v_3$]{};
    \node (v4) at (2,0) [acteur,label=below:$v_4$]{};
    \node (v5) at (2,1) [acteur,label=above:$v_5$]{};
    \node (v6) at (1,1) [acteur,label=above:$v_6$]{};
    %
    \draw (v1) -- (v2);
    \draw (v3) -- (v6);
    \draw (v5) -- (v4);
    \draw (v1) -- (v6);
    \draw (v2) -- (v3);
    \draw (v6) -- (v5);
    \draw (v3) -- (v4);
    %
    \node at (-2.5,1) {\textit{$G_1$}};
    \end{tikzpicture}
\hfill
    \begin{tikzpicture}[scale=0.90,
    acteur/.style = {circle, fill=black, thick,
        inner sep=0.5pt, outer sep=0pt, minimum size=1.3mm},
    decoration = {markings, mark=at position 0.5cm with {\arrowreversed[semithick]{>}}},
    every label/.append style = {font=\scriptsize},
    ]
    \node (v2) at (0,0) [acteur,label=left:$v_2$]{};
    \node (v3) at (1,0)[acteur,label=right:$v_3$]{};
    \node (v1) at (0.5,1) [acteur,label=above:$v_1$]{};

    %
    \draw (v1) -- (v2);
    \draw (v2) -- (v3);
    \draw (v3) -- (v1);

    %
    \node at (-2.5,1) {\textit{$G_2$}};
    \end{tikzpicture}
\end{document}

enter image description here

  • @J.Doe, \hspace{<len>t} with <len> a length, for instance, 5pt inserts a space of 5pt between them. If you wan to come closer you can add the option overlay to the tikzpictures and then adjust the desired length. For example, begin{tikzpicture}[overlay] and \hspace{130pt} – Ñako Jun 13 at 13:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.