--- capa/capa51/GUITools/quizzer.tcl 1999/11/08 22:30:02 1.7 +++ capa/capa51/GUITools/quizzer.tcl 1999/11/17 21:34:40 1.8 @@ -3653,7 +3653,7 @@ proc printWindow {} { -value "printWholeClass" -variable gPrintSelection(type) pack $wholeClassFrame.wholeClass -side left - message $studentNumber.msg -text "Student Number: " -aspect 10000 +i message $studentNumber.msg -text "Student Number: " -aspect 10000 entry $studentNumber.entry -textvariable gPrintSelection(studentNumber) -width 9 \ -validate key -validatecommand "limitEntry %W 9 any %P" pack $studentNumber.msg $studentNumber.entry -side left @@ -3791,7 +3791,8 @@ proc createCreateDviWin {} { # gStopPrinting - # Files: quiztemp.ps - file containg info to print (removed) ########################################################### -proc printBody { lprCommand { showCompletionMessage 1 } } { +proc printBodon(section +ionMessage 1 } } { global gCapaConfig gStopPrinting gDonePrinting set errorMsg "" @@ -4070,12 +4071,14 @@ proc printSection { { lprCommand "" } } default { set type "-T" } } + set prSection [string trimleft $gPrintSelection(section) 0] + if { [set gStopPrinting [expr 2 == [runLatex \ "echo [pwd] | $gCapaConfig(qzparse_command) \ - -sec $gPrintSelection(section) -set $set \ + -sec $prSection -set $set \ -d [pwd] -c [pwd] $type " gCreateDviText] ] ] } { for {set i $start} { $i <= $end} { incr i } { - exec rm -f section$gPrintSelection(section)-set$i.tex + exec rm -f section$prSection-set$i.tex } if {$showStopping} { displayMessage "Printing has been stopped." @@ -4092,7 +4095,7 @@ proc printSection { { lprCommand "" } } } for { set i $start} { $i <= $end } { incr i } { - if { ! [file exists section$gPrintSelection(section)-set$i.tex] } { + if { ! [file exists section$prSection-set$i.tex] } { if {$showStopping} { displayError "The qzparse command: $gCapaConfig(qzparse_command), was unable to produce the expected output. Printing stopped" set gStopPrinting 0 @@ -4101,7 +4104,7 @@ proc printSection { { lprCommand "" } } return 2 } - exec mv section$gPrintSelection(section)-set$i.tex quiztemp.tex + exec mv section$prSection-set$i.tex quiztemp.tex exec /bin/rm -f quiztemp.dvi $gCreateDviText insert end "$gCapaConfig(latex_command)\n"