Skip to content

Instantly share code, notes, and snippets.

@DanielTakeshi
Last active January 10, 2017 01:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DanielTakeshi/565887b3b6b1b443f17b7ff434da9c62 to your computer and use it in GitHub Desktop.
Save DanielTakeshi/565887b3b6b1b443f17b7ff434da9c62 to your computer and use it in GitHub Desktop.
An example of using tikz to generate a figure. Use `pdflatex file_name.tex` to compile, where `file_name.tex` is the name of this file. It should create an image directly in the text. Note that the package assumptions are minimal.
\documentclass[11pt]{article}
\usepackage{amsmath,amssymb,tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{center}
\begin{tikzpicture}
\node (1) [align=center] {$\mathsf{EXPSPACE}$};
\node (2) [align=center, below=3mm of 1] {$\mathsf{MA}_{\mathsf{EXP}}$};
\node (3) [align=center, below=3mm of 2] {$\mathsf{NEXP}$};
\node (4) [align=center, below=3mm of 3] {$\mathsf{EXP}$};
\node (5) [align=center, below=3mm of 4] {$\mathsf{PSPACE}$};
\node (6) [align=center, below=3mm of 5] {$\mathsf{P}^{\mathsf{\#P}}$};
\node (7) [align=center, below=3mm of 6] {$\mathsf{PH}$};
\node (8) [align=center, below=3mm of 7] {$\mathsf{NP}^{\mathsf{NP}}$};
\node (9) [align=center, below=3mm of 8] {$\mathsf{MA}$};
\node (10) [align=center, below=3mm of 9] {$\mathsf{NP}$};
\node (11) [align=center, below=3mm of 10] {$\mathsf{P}$};
\node (12) [align=center, below=3mm of 11] {$\mathsf{NLOGSPACE}$};
\node (13) [align=center, below=3mm of 12] {$\mathsf{LOGSPACE}$};
\node (14) [align=center, right=20mm of 7] {$\mathsf{PP}$};
\node (15) [align=center, below=6mm of 14] {$\mathsf{BQP}$};
\node (16) [align=center, below=6mm of 15] {$\mathsf{BPP}$};
\node (17) [align=center, right=20mm of 14] {$\mathsf{P/poly}$};
\node (18) [align=center, below=3mm of 17] {$\mathsf{NC}^{1}$};
\node (19) [align=center, below=3mm of 18] {$\mathsf{TC}^{0}$};
\node (20) [align=center, below=3mm of 19] {$\mathsf{ACC}$};
\node (21) [align=center, below=3mm of 20] {$\mathsf{AC}^{0}\left[\mathsf{p}\right]$};
\node (22) [align=center, below=3mm of 21] {$\mathsf{AC}^{0}$};
\draw [line width=1.0pt] (1) edge (2);
\draw [line width=1.0pt] (2) edge (3);
\draw [line width=1.0pt] (3) edge (4);
\draw [line width=1.0pt] (4) edge (5);
\draw [line width=1.0pt] (5) edge (6);
\draw [line width=1.0pt] (6) edge (7);
\draw [line width=1.0pt] (7) edge (8);
\draw [line width=1.0pt] (8) edge (9);
\draw [line width=1.0pt] (9) edge (10);
\draw [line width=1.0pt] (10) edge (11);
\draw [line width=1.0pt] (11) edge (12);
\draw [line width=1.0pt] (12) edge (13);
\draw [line width=1.0pt] (6) edge (14);
\draw [line width=1.0pt] (9) edge (14);
\draw [line width=1.0pt] (9) edge (16);
\draw [line width=1.0pt] (11) edge (16);
\draw [line width=1.0pt] (14) edge (15);
\draw [line width=1.0pt] (15) edge (16);
\draw [line width=1.0pt] (16) edge (17);
\draw [line width=1.0pt] (17) edge (18);
\draw [line width=1.0pt] (18) edge (19);
\draw [line width=1.0pt] (19) edge (20);
\draw [line width=1.0pt] (20) edge (21);
\draw [line width=1.0pt] (21) edge (22);
\end{tikzpicture}
\end{center}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment