- Removed the weird pre/postamble stuff that Sjouke asked for.

- Introduced an 'attacktemplate' file.
This commit is contained in:
ccremers 2004-04-23 13:23:33 +00:00
parent 8fda9c6d2b
commit 4cefc16543
3 changed files with 25 additions and 12 deletions

9
src/attacktemplate.tex Normal file
View File

@ -0,0 +1,9 @@
\documentclass{article}
\usepackage{a4wide}
\usepackage{msc}
\begin{document}
\input{attack}
\end{document}

View File

@ -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

View File

@ -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