mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-26 06:48:04 +02:00
36 lines
1.1 KiB
TeX
36 lines
1.1 KiB
TeX
% A complete graph
|
|
% Author: Quintin Jean-Noël
|
|
% <http://moais.imag.fr/membres/jean-noel.quintin/>
|
|
\documentclass[varwidth=true, border=2pt]{standalone}
|
|
\usepackage[nomessages]{fp}% http://ctan.org/pkg/fp
|
|
\usepackage{tikz}
|
|
\usetikzlibrary[topaths]
|
|
|
|
|
|
\begin{document}
|
|
\newcommand\n{5}
|
|
\begin{tikzpicture}
|
|
\node[vertex] (a) at (3,6) {};
|
|
\node[vertex] (b) at (2,4) {};
|
|
\node[vertex] (c) at (4,4) {};
|
|
\node[vertex] (d) at (1,2) {};
|
|
\node[vertex] (e) at (2,2) {};
|
|
\node[vertex] (f) at (3,2) {};
|
|
\node[vertex] (g) at (4,2) {};
|
|
\node[vertex] (h) at (0,0) {};
|
|
\node[vertex] (i) at (2,0) {};
|
|
\node[vertex] (j) at (3,0) {};
|
|
\node[vertex] (k) at (5,0) {};
|
|
|
|
\draw[red] (a) -- (b);
|
|
\draw[red] (a) -- (c);
|
|
\draw[red] (b) -- (d);
|
|
\draw[red] (b) -- (e);
|
|
\draw[red] (b) -- (f);
|
|
\draw[red] (d) -- (h);
|
|
\draw[red] (d) -- (i);
|
|
\draw[red] (c) -- (g);
|
|
\draw (g) -- (j);
|
|
\draw (g) -- (k);
|
|
\end{tikzpicture}
|
|
\end{document}
|