Skip to content

Instantly share code, notes, and snippets.

@wilbowma
Created June 19, 2019 03:45
Show Gist options
  • Save wilbowma/543362014efab4c3f1a555d36847f240 to your computer and use it in GitHub Desktop.
Save wilbowma/543362014efab4c3f1a555d36847f240 to your computer and use it in GitHub Desktop.
\documentclass{article}
\usepackage{mathpartir}
\usepackage{tikz}
% Play with xshift and yshift if it looks funny
\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture,xshift=-3pt,yshift=1pt] \node (#1) {};}
\begin{document}
\[
\inferrule
{e_1 : \Pi x:A.B \\
e_2\tikzmark{d} : A}
{e_1 ~ e_2\tikzmark{a} : B[e_2\tikzmark{b}/x]
\tikz[overlay,remember picture,bend left=30, -latex] {\draw[->] (a.north) to (b.north);}
\tikz[overlay,remember picture,bend right=50, -latex] {\draw[thick,dotted] (a.south) to (d.south);}
}
\]
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment