public documents.sextractor_doc

[/] [latexwcomments] - Blame information for rev 24

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 24 gam
#! /bin/csh -f
2
 
3
# by Gary Mamon, 1 Feb 2012
4
 
5
# default parameters
6
 
7
set comments = 1
8
 
9
# read arguments
10
 
11
while ($#argv > 0)
12
          switch ($1)
13
          case -c:
14
          case -comments:
15
                set comments = 1
16
                shift
17
                breaksw
18
          case -h:
19
          case -help:
20
                echo "Usage: $0 [-nc] file[.tex]"
21
                exec echo "  where -nc option will NOT insert comments in color"
22
          case -n:
23
          case -nc:
24
          case -nocomments
25
                set comments = 0
26
                shift
27
                breaksw
28
          case [a-zA-Z]*:
29
                set file = $1
30
                shift
31
                breaksw
32
          default:
33
                exec echo cannot recognize option $1
34
          endsw
35
end
36
 
37
if (! $?file) then
38
        echo "must specify LaTeX file (prefix)"
39
        exec $0 -help
40
endif
41
 
42
if ($comments) then
43
        latex "\def\comments{}\input{$file}"
44
else
45
        latex $file
46
endif
47
 
48