- Removed the weird pre/postamble stuff that Sjouke asked for.
- Introduced an 'attacktemplate' file.
This commit is contained in:
parent
8fda9c6d2b
commit
4cefc16543
9
src/attacktemplate.tex
Normal file
9
src/attacktemplate.tex
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
\documentclass{article}
|
||||||
|
\usepackage{a4wide}
|
||||||
|
\usepackage{msc}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\input{attack}
|
||||||
|
|
||||||
|
\end{document}
|
@ -43,8 +43,6 @@ latexInit (const System sys, int argc, char **argv)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
printf ("\\documentclass{article}\n");
|
|
||||||
printf ("\\usepackage{msc}\n");
|
|
||||||
printf ("%%\n");
|
printf ("%%\n");
|
||||||
printf ("%% LaTeX output generated by %s\n", progname);
|
printf ("%% LaTeX output generated by %s\n", progname);
|
||||||
printf ("%% Input:\n");
|
printf ("%% Input:\n");
|
||||||
@ -56,20 +54,15 @@ latexInit (const System sys, int argc, char **argv)
|
|||||||
printf ("\n");
|
printf ("\n");
|
||||||
|
|
||||||
printf ("%%\n");
|
printf ("%%\n");
|
||||||
printf ("\\begin{document}\n\n");
|
|
||||||
|
|
||||||
/* comment macro (used for debugging) */
|
/* comment macro (used for debugging) */
|
||||||
printf ("\\newcommand{\\comment}[1]{}\n");
|
printf ("\\newcommand{\\comment}[1]{}\n");
|
||||||
|
|
||||||
/* preamble */
|
|
||||||
printf ("\\input{preamble}\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
latexDone (const System sys)
|
latexDone (const System sys)
|
||||||
{
|
{
|
||||||
printf ("\\input{postamble}\n");
|
/* closing of the document */
|
||||||
printf ("\n\\end{document}\n\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
19
src/testl
19
src/testl
@ -8,15 +8,26 @@
|
|||||||
# ./testl ns3
|
# ./testl ns3
|
||||||
#
|
#
|
||||||
|
|
||||||
file=../spdl/$1.spdl outfile=tempattack
|
file=../spdl/$1.spdl
|
||||||
|
template=../src/attacktemplate
|
||||||
|
|
||||||
if [ -f $file ]
|
if [ -f $file ]
|
||||||
then
|
then
|
||||||
./scyther --latex $file -o $outfile.tex
|
|
||||||
latex $outfile.tex
|
../src/scyther --latex $file -o attack.tex
|
||||||
xdvi $outfile.dvi
|
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
|
else
|
||||||
|
|
||||||
echo "No file $file found."
|
echo "No file $file found."
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user