Permit threads build on Cygwin
[gromacs.git] / admin / mktex
blobb55ed87f34ff065624c378ef0725f10db19904e0
1 #!/bin/csh -f
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
10 set GMXBINDIR = $1
11 set PROGFILE = $2
13 set dir = $cwd
15 set VER = 4.5
16 set TEXIDX = proglist.tex
18 set GENERAL = "getting_started:Getting_Started flow:Flow_Chart files:File_Formats mdp_opt:mdp_options"
20 cd $GMXBINDIR
21 set PROGRAMS = [a-z]*
22 cd $dir
24 echo ""
25 echo "generating latex page $TEXIDX"
26 echo "--------------------------------"
28 if ( -f $TEXIDX ) \rm $TEXIDX
29 touch $TEXIDX
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);\
48 }' $PROGFILE | sed -e 's/e\.g\./{\\eg}/g' >> $TEXIDX
49 echo "\\end{description}" >> $TEXIDX
51 #last line