Annotation of capa/capa51/CapaTools/picturesheet.tcl, revision 1.1.1.1

1.1       albertel    1: set photodir "/nfs/capa2/photos/eps"
                      2: set blankpic "/nfs/capa2/photos/eps/empty.eps"
                      3: set sectionlimit 26
                      4: set fileId [open classl]
                      5: proc printheader {} {
                      6: 	puts {\documentstyle[12pt,,epsf]{article}}
                      7: 	puts {\textheight 10.5in  }
                      8: 	puts {\oddsidemargin = -0.57in}
                      9: 	puts {\evensidemargin = -0.57in}
                     10: 	puts {\textwidth= 7.8in } 
                     11: 	puts {\begin{document}}
                     12: 	puts {\voffset=-1.7in}
                     13: 	puts {\noindent}
                     14: }
                     15: proc printfooter {} {
                     16: 	puts {\end{document}}
                     17: }
                     18: 
                     19: printheader
                     20: set num 0
                     21: while {1} {
                     22: 	incr num
                     23: 	set line [gets $fileId]
                     24: 	if { [eof $fileId] } { break }
                     25: 	scan [lindex $line 2] %d section
                     26: 	if { $section > $sectionlimit } { continue }
                     27: 	set stuid [lindex $line 3]
                     28: 	set lastname [lindex $line 4]
                     29: 	set firstname [lindex $line 5]
                     30: 	set firstchar [string index $firstname 0]
                     31: 	puts -nonewline "\\parbox\{1.32in\}\{\\framebox\{\\noindent \\epsfxsize=1.0 in \\epsffile\{"
                     32: #	puts "\n$stuid [file join $photodir $stuid.eps] [file readable [file join $photodir $stuid.eps]]"
                     33: 
                     34: 	if {[file readable [file join $photodir $stuid.eps]]} {
                     35: 		puts -nonewline [file join $photodir $stuid.eps]
                     36: 	} else {
                     37: 		puts -nonewline $blankpic
                     38: 	}
                     39: 	puts -nonewline "\}\}\\\\$lastname $firstchar \}"
                     40: 	if { $num > 6 } {
                     41: 		puts "\\\\"
                     42: 		set num 0
                     43: 	} else {
                     44: 		puts ""
                     45: 	}
                     46: }
                     47: printfooter
                     48: close $fileId

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>