diff --git a/src/attacktemplate.tex b/src/attacktemplate.tex new file mode 100644 index 0000000..1390fc0 --- /dev/null +++ b/src/attacktemplate.tex @@ -0,0 +1,9 @@ +\documentclass{article} +\usepackage{a4wide} +\usepackage{msc} + +\begin{document} + +\input{attack} + +\end{document} diff --git a/src/latex.c b/src/latex.c index 52891f6..10bb807 100644 --- a/src/latex.c +++ b/src/latex.c @@ -43,8 +43,6 @@ latexInit (const System sys, int argc, char **argv) { int i; - printf ("\\documentclass{article}\n"); - printf ("\\usepackage{msc}\n"); printf ("%%\n"); printf ("%% LaTeX output generated by %s\n", progname); printf ("%% Input:\n"); @@ -56,20 +54,15 @@ latexInit (const System sys, int argc, char **argv) printf ("\n"); printf ("%%\n"); - printf ("\\begin{document}\n\n"); /* comment macro (used for debugging) */ printf ("\\newcommand{\\comment}[1]{}\n"); - - /* preamble */ - printf ("\\input{preamble}\n"); } void latexDone (const System sys) { - printf ("\\input{postamble}\n"); - printf ("\n\\end{document}\n\n"); + /* closing of the document */ } void diff --git a/src/testl b/src/testl index 759bc2d..6b67fb6 100755 --- a/src/testl +++ b/src/testl @@ -8,15 +8,26 @@ # ./testl ns3 # -file=../spdl/$1.spdl outfile=tempattack +file=../spdl/$1.spdl +template=../src/attacktemplate if [ -f $file ] then - ./scyther --latex $file -o $outfile.tex - latex $outfile.tex - xdvi $outfile.dvi + + ../src/scyther --latex $file -o attack.tex + latex $template.tex + + mv $template.dvi attack.dvi + dvips attack.dvi -o attack.ps + +# xdvi attack.dvi # for Xdvi +# kdvi attack.dvi # for KDE environment + kghostview attack.ps # postscript in KDE + else + echo "No file $file found." + fi