| … | |
… | |
| 367 | |
367 | |
| 368 | my ($tthPreambleFile, $tthPreambleContents); # the contents of this file will not change during problem compilation |
368 | my ($tthPreambleFile, $tthPreambleContents); # the contents of this file will not change during problem compilation |
| 369 | # it only needs to be read once |
369 | # it only needs to be read once |
| 370 | sub tth { |
370 | sub tth { |
| 371 | my $inputString = shift; |
371 | my $inputString = shift; |
| 372 | |
372 | |
| 373 | # read the contents of the tthPreamble.tex file, unless it has already been read |
373 | # read the contents of the tthPreamble.tex file, unless it has already been read |
| 374 | unless ( defined( $tthPreambleContents) ) { |
374 | unless ( defined( $tthPreambleContents) ) { |
| 375 | $tthPreambleFile = "${main::templateDirectory}tthPreamble.tex" if ( -r "${main::templateDirectory}tthPreamble.tex" ); |
375 | $tthPreambleFile = "${main::templateDirectory}tthPreamble.tex" if ( -r "${main::templateDirectory}tthPreamble.tex" ); |
| 376 | if ( defined($tthPreambleFile) ) { |
376 | if ( defined($tthPreambleFile) ) { |
| 377 | local(*TTHIN); |
377 | local(*TTHIN); |