\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?
Asked
Active
Viewed 63 times
0
vqw7Ad
- 494
-
Note that the blank line between the two tikzpictures starts a new paragraph. – John Kormylo Jun 13 '19 at 15:21
1 Answers
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}
Ñako
- 3,626
-
@J.Doe,
\hspace{<len>t}with<len>a length, for instance,5ptinserts a space of5ptbetween them. If you wan to come closer you can add the optionoverlayto thetikzpicturesand then adjust the desired length. For example,begin{tikzpicture}[overlay]and\hspace{130pt}– Ñako Jun 13 '19 at 13:19
