Skip to content

Instantly share code, notes, and snippets.

@tetsuok
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save tetsuok/13862ae0f8e80e85d23e to your computer and use it in GitHub Desktop.

Select an option

Save tetsuok/13862ae0f8e80e85d23e to your computer and use it in GitHub Desktop.
Const pointer rules

const pointer rules

alt

\documentclass{standalone}
\usepackage{tikz-dependency}
\begin{document}
\begin{dependency}[theme = simple, edge style={<-,thick,blue}]
\begin{scope}
\begin{deptext}[column sep=1em]
{\tt const} \& {\tt char} \& {\tt *} \& {\tt p} \& {\tt ;} \\
\end{deptext}
\depedge{2}{1}{}
\end{scope}
%%
\begin{scope}[yshift=-20mm]
\begin{deptext}[column sep=1em]
{\tt char} \& {\tt const} \& {\tt *} \& {\tt p} \& {\tt ;} \\
\end{deptext}
\depedge{1}{2}{}
\end{scope}
%%
\begin{scope}[yshift=-40mm]
\begin{deptext}[column sep=1em]
{\tt char} \& {\tt *} \& {\tt const} \& {\tt p} \& {\tt ;} \\
\end{deptext}
\depedge{2}{3}{}
\end{scope}
%%
\begin{scope}[yshift=-60mm]
\begin{deptext}[column sep=1em]
{\tt const} \& {\tt char} \& {\tt *} \& {\tt const} \& {\tt p} \& {\tt ;} \\
\end{deptext}
\depedge{2}{1}{}
\depedge{3}{4}{}
\end{scope}
\end{dependency}%
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment