#!/bin/sh -f texfile=' doser zhaozg bugg seth bressani singovski narison para1 amsler liuf thoma shaw1 shaw2 jins pelaez1 pelaez2 suh1 suh2 agnello chengp glazov badaud lotto tonazzo thompson tilquin plen2 ehrlich eugenio-plen zaitsev metsch zoubs lopez mabq para2 lihb sarantsev anisovich ryabchikov sarycheva maltman burdin1 zhaoq mishida hill buescher shenpn nakamura omegaeta eta4pi eichler louxc plen3 whitmore-plen miscetti chenjp achasov nakada aleppo liuth para3 peaslee giovannella takamatsu nozdrachev burdin2 kloet noya pick xugf root winston doyle zhangzq whitmore-para rongg chanct sishida sawada yangs plen4 thiergen druzhinin miaot guyf korotkikh wicke fedotovitch lemoigne_tk5 summary lipkin chung nlist' echo $texfile # #first page is plenary's article #latex plenary;latex plenary;dvips -o plenary.ps plenary latex plen1;latex plen1;dvips -o plen1.ps plen1 # #get the last page No. of doser's article page=`grep Page: plen1.ps | tail -1 |awk '{print $2}' ` echo $page # for f in $texfile; do #now page is the No. of next article page=`expr $page + 1` echo $page #set page counter of this article junk=`expr '/setcounter/s/{[1-9].*}/{'$page'}/' ` echo $junk sed ''`echo $junk`'' $f.tex > a mv a $f.tex #latex this article latex $f;latex $f;dvips -o $f.ps $f page=`grep Page: $f.ps | tail -1 |awk '{print $2}' ` echo $page done