#!/bin/csh -f


cp PS-examples.head ps-examples.html

set n = 0

make-random-list

foreach ff (`cat rand.dum`)

  set f = $ff".pdf"
  echo -n $f
  if ($n == 0) then
    echo " "  >> ps-examples.html
    echo "<tr>"   >> ps-examples.html
  endif
  
  set size = `wc -c $f`

  set gif = "inlines/"$ff".gif"

  echo '<td><center><font size=2>'  >> ps-examples.html
  echo '<a href="'$f'"><img src="'$gif'" width=153 height=198><br>'  >> ps-examples.html
  
  set K = `echo '('$size[1]'+500)/1000' | bc `
  echo "  ("$K" kilobytes)" 

  echo "PDF</a> ("$K" kilobytes)<br>"  >> ps-examples.html

  set psfile = $ff".eps.gz"
  set size = `wc -c $psfile`
  set K = `echo '('$size[1]'+500)/1000' | bc `
  echo '<a href="'$psfile'">' >> ps-examples.html
  echo "  ("$K" kilobytes)" 

  
  echo "Gzipped PostScript</a> ("$K" kilobytes)<br>"  >> ps-examples.html
  
  echo '</font></center></td>'  >> ps-examples.html

@ n++
  if ($n == 4) then
    echo "</tr>"  >> ps-examples.html
    echo " "  >> ps-examples.html
    set n = 0
  endif
end



echo "</table><p><font size=1><b> This page last updated on " >> ps-examples.html
date >> ps-examples.html
echo "</b></font> "  >> ps-examples.html

cat PS-examples.tail  >> ps-examples.html

chmod ugo+r *

/bin/rm *dum*



