#!/bin/csh -f #(ie run the cshell on this but don't read the .cshrc) # echo version = 1.19 of startpaper 2004 Aug 24 # 2004 Aug 24: 1.19: don't overwrite previous paper! # 2004 Feb 4: 1.18: bug: xdvi display crashes on first use # 2003 Aug 20: 1.16: remove lines with only the word REMOVE # 2003 Jul 11: 1.16: remove Log file from copy # 2002 Sep 25: 1.14: remove the REMOVE line w/version of example.tex # 2002 May 1: 1.14: remove leading '0' from dates # 2002 Apr 29: 1.13: remove '.tex' from end of name # 2000 Sep 12: 1.12: use `right atp` to start the right window & go into vi # 2000 Mar 24: 1.11: NAME is changed to the name given # DATE is changed to the current date # # 2000 Mar 3, 1.10: trigger call to l and atp # startpaper: set up all the components for working with a paper # begin the paper in a LaTeX file (ef, p.tex) # give the name of the paper (without extension) when running this program: # startpaper p if ($#argv == 0) then echo 'Give name of the paper (without extension).' echo 'Without a second parameter, the program will enter vi on the paper;' echo 'with any second parameter it will not.' exit endif mkold ln -s ~toms/paper/references/all.bib . # 1997 July 30; general.definitions.tex becomes definitions.tex # there is only one file now. # lkdelila general.definitions.tex # ln -s general.definitions.tex definitions.tex ln -s ~toms/paper/definitions.tex . cp ~toms/paper/starter/* . set thedate = `date '+%Y %b %d'|sed -e "s/ 0/ /"` set paper = `echo $1 | sed -e "s/\.tex//"` if ($paper == example) then # ok, allow them to call it example! set example = theexample.tex mv example.tex $example else set example = example.tex endif if !(-f $paper.tex) then echo no $paper.tex, using example. # mv example.tex $paper.tex cat $example |\ sed -e "s/NAME/$paper/" |\ sed -e "s/DATE/$thedate/" |\ grep -v "REMOVE" |\ cat > $paper.tex # grep -v "REMOVE THIS LINE" |\ Old method else echo $paper.tex exists, deleting $example rm -f $example endif rm -f paper.tex ln -s $paper.tex paper.tex lkdelila html.sty lkdelila testprinter.ps l right atp if ($#argv == 1) then sleep 1 vi $paper.tex else echo dropping through without vi. endif