Skip to content

Instantly share code, notes, and snippets.

@drvinceknight
Created August 24, 2015 09:09
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 drvinceknight/cd03ddd9de089ff659ae to your computer and use it in GitHub Desktop.
Save drvinceknight/cd03ddd9de089ff659ae to your computer and use it in GitHub Desktop.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\draw (0,0) -- (2,2);
\node (first_node) at (2,1) [draw, fill=red!20] {\(x^2\)};
\node (second_node) at ($(first_node) + (4, -4)$) [draw, fill=blue!20] {This is a sentence};
\draw [->, green!67] (first_node) edge [out=0, in=90] (second_node);
\end{tikzpicture}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment