I wanted to draw a simple protocol flow using the tikz package. However, I got some errors and really don't know how to deal with them.
Here's the code in LaTeX:
\documentclass[12pt]{article}
\usepackage{tikz}
\usepackage{tkz-base,tkz-fct}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{psfrag}
\usepackage{amsmath}
\usepackage{msc}
\begin{document}
\begin{figure*}[!h]
\center
\resizebox{12cm}{!} {
\begin{msc}{$IJS_{NK, dec/enc}$}
\small
\setlength{\instwidth}{1.7 cm}
\setlength{\instdist}{2.3 cm}
\setlength{\bottomfootdist}{0.2 cm}
%\setlength{\instwidth}{2 cm}
%\setlength{\instdist}{3.75 cm}
\setlength{\envinstdist}{1.2 cm}
\setlength{\topheaddist}{0.5 cm}
\instfoot
\declinst{I}{\scriptsize new node}{$I$}
\declinst{R}{\scriptsize neighbour node}{$R$}
\declinst{J1k-1}{\scriptsize intermediate nodes}{$J_{1:k-1}$}
\declinst{Jk}{\scriptsize \:\: intermediate node}{$J_{k}$}
\declinst{S}{\scriptsize Sink}{$S$}
% left to right messages
\mess{$m_1 = \{n_I, I, R\}_{K_{DH}(I,S)}$}{I}{R}
\nextlevel
\mess{$\{n_R, m_1\}_{NK}$}{R}{J1k-1}
\nextlevel
\mess{$\{n_{J_{k-1}}, ..., n_{J_1}, n_R, m_1\}_{NK}$}{J1k-1}{Jk}
\nextlevel
\mess{$\{n_{J_k}, ..., n_{J_1}, n_R, m_1\}_{NK}$}{Jk}{S}
\nextlevel
% right to left messages
\nextlevel
\mess{$\{n_{J_k}, ..., n_{J_1}, n_R, m_2\}_{NK}$}{S}{Jk}
\nextlevel
\mess{$\{n_{J_{k-1}}, ..., n_{J_1}, n_R, m_2\}_{NK}$}{Jk}{J1k-1}
\nextlevel
\mess{$\{n_R, m_2\}_{NK}$}{J1k-1}{R}
\nextlevel
\mess{$m_3$}{R}{I}
%\nextlevel
\end{msc}
}
\fbox{
\begin{minipage}{11.5 cm}
$m_2 = \{pk(I), \{n_I, I, R, S\}_{K_{DH}(I,S)}\}_{K_{DH}(R,S)}$\\
$m_3 = \{K(R,I), \{n_I, I, R, S\}_{K_{DH}(I,S)} \}_{pk(I)}$
\end{minipage}
}
\caption{$IJS_{NK, dec/enc}$: Proof by Induction.}
\label{figure : IJS-NK-dec-enc Induction}
\end{figure*}
\end{document}
I compile it in console using: pdflatex -synctex=1 -interaction=nonstopmode toc.tex.
My pdflatex version is:
pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)
kpathsea version 6.1.1
Copyright 2013 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.2.49; using libpng 1.2.50
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with poppler version 0.24.5
However, I'm using it "inside" TeXMaker on Kubuntu 14.04.
pdflatex -synctex=1 -interaction=nonstopmode toc.tex > errors.txt:
Here's the *.log file: https://gist.github.com/anonymous/29dc1550a6cd56d8aa34c193ed86154b, and the errors https://gist.github.com/anonymous/4bbb648cc2ee48468dfc071318e09380.
xelatex toc.tex > xelatexerrors.txt:
https://gist.github.com/anonymous/c609d4f3d784ee47635814f7b88f578a
latex toc.tex > latexerrors.txt:
https://gist.github.com/anonymous/8994caae091854df757d6bc6c6dcff33
Adding \usepackage[pdf]{pstricks} produced an empty pdf (I did pdflatex -synctex=1 -interaction=nonstopmode toc.tex > errors.txt), here're the erros: https://gist.github.com/anonymous/6f85b7732a1acb5dc3ab31707edc8400

latex+dvips+ps2pdf) route and all is fine bar\instfootbeing undefined, which does not prevent production of output. – Joseph Wright Oct 22 '16 at 12:26latex toc.tex(Enter),dvips toc.dvi,pstopdf toc.psbut the image does not look very good: https://s15.postimg.org/vcheufbuz/shoot2.png – yak Oct 22 '16 at 12:39