Fix message about incorrect usage of dihedral type 9
[alexxy/gromacs.git] / admin / mktex
1 #!/bin/csh -f
2
3 if ( $#argv < 2 ) then
4   echo "Error: provide the binary directory as first argument,"
5   echo "and the location of programs.txt as the second."
6   echo "Proglist.tex will be written in the current directory."
7   exit
8 endif
9
10 set GMXBINDIR   = $1
11 set PROGFILE    = $2
12
13 set dir = $cwd
14
15 set VER         = 4.5
16 set TEXIDX      = proglist.tex
17
18 set GENERAL     = "getting_started:Getting_Started flow:Flow_Chart files:File_Formats mdp_opt:mdp_options"
19
20 cd $GMXBINDIR
21 set PROGRAMS = [a-z]*
22 cd $dir
23
24 echo ""
25 echo "generating latex page $TEXIDX"
26 echo "--------------------------------"
27
28 if ( -f $TEXIDX ) \rm $TEXIDX
29 touch $TEXIDX
30
31 echo "\\begin{description}" >> $TEXIDX
32 awk -F '|' -v longest="mk\\_angndx" '{\
33   gsub("_","\\_",$0);\
34   gsub("%","\\%",$0);\
35   if (NF) {\
36     if ( $1 == "LONGEST" ) {\
37       longest = $2;\
38     } else if ( $1 == "HEAD" ) {\
39       printf("\\item {\\large\\bf %s}\n",$2);\
40       printf("\\vspace{-2ex}\\begin{tabbing}\n");\
41       printf("{\\bf %s} \\= \\kill\n",longest);\
42     } else if ( $1 == "END" ) {\
43       printf("\\end{tabbing}\\vspace{-2ex}\n\n");\
44     } else {\
45       printf("{\\bf %s} \\> %s \\\\\n",$1,$2);\
46     }\
47   }\
48 }' $PROGFILE | sed -e 's/e\.g\./{\\eg}/g' >> $TEXIDX
49 echo "\\end{description}" >> $TEXIDX
50
51 #last line