Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % Command line compilation:
- % pdflatex -jobname=output main.tex
- % convert -density 130 -background white -flatten output.pdf pages.png
- \documentclass[tikz]{standalone}
- \usepackage[utf8]{inputenc}
- \usepackage[T1,T5]{fontenc}
- \usepackage{inconsolata}
- \usepackage{mathptmx}
- \begin{document}
- \fontencoding{T1}\selectfont
- \begin{tikzpicture}[>=stealth]
- \node[draw,inner sep=0pt,minimum size=.5cm] (0) at (0,0) {\texttt{C}};
- \foreach \i [count=\j] in {D,A,C,B,D,C,A,D,C,D,B,A,D,C,C,B,A,D} {
- \pgfmathtruncatemacro{\before}{\j-1}
- \node[draw,inner sep=0pt,minimum size=.5cm,right]
- (\j) at (\before.east) {\texttt{\i}};
- }
- \draw[densely dotted] (0.north west) -- ++ (-.3,0) (0.south west) -- ++ (-.3,0);
- \draw[densely dotted] (18.north east) -- ++ (.3,0) (18.south east) -- ++ (.3,0);
- \draw (0.north west) -- (18.north east) (0.south west) -- (18.south east);
- \draw[<-] (16.north) ++ (0,.1) -- ++ (0,.5) node[above] {\texttt{B}};
- \draw[<-] (12.north) ++ (0,.1) -- ++ (0,.5) node[above] {\texttt{A}};
- \draw[<-] (9.north) ++ (0,.1) -- ++ (0,.5) node[above] {\texttt{C}};
- \draw[<-] (8.north) ++ (0,.1) -- ++ (0,.5) node[above] {\texttt{D}};
- \draw[<-] (4.north) ++ (0,.1) -- ++ (0,.5) node[above] {\texttt{B}};
- \draw[<-] (2.north) ++ (0,.1) -- ++ (0,.5) node[above] {\texttt{A}};
- \draw[<-] (1,1.7) -- (8,1.7) node[midway,above]
- {\fontencoding{T5}\selectfont Con trỏ $p$};
- \end{tikzpicture}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement