| 1 | ################################################################################ |
1 | ################################################################################ |
| 2 | # WeBWorK Online Homework Delivery System |
2 | # WeBWorK Online Homework Delivery System |
| 3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
| 4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm,v 1.181 2005/08/24 20:22:32 jj Exp $ |
4 | # $CVSHeader$ |
| 5 | # |
5 | # |
| 6 | # This program is free software; you can redistribute it and/or modify it under |
6 | # This program is free software; you can redistribute it and/or modify it under |
| 7 | # the terms of either: (a) the GNU General Public License as published by the |
7 | # the terms of either: (a) the GNU General Public License as published by the |
| 8 | # Free Software Foundation; either version 2, or (at your option) any later |
8 | # Free Software Foundation; either version 2, or (at your option) any later |
| 9 | # version, or (b) the "Artistic License" which comes with this package. |
9 | # version, or (b) the "Artistic License" which comes with this package. |
| … | |
… | |
| 326 | if ($displayMode eq "plainText") { |
326 | if ($displayMode eq "plainText") { |
| 327 | return $tex; |
327 | return $tex; |
| 328 | } elsif ($displayMode eq "formattedText") { |
328 | } elsif ($displayMode eq "formattedText") { |
| 329 | |
329 | |
| 330 | # read the TTH preamble, or use the cached copy passed in from the caller |
330 | # read the TTH preamble, or use the cached copy passed in from the caller |
| 331 | my $tthPreamble; |
331 | my $tthPreamble=''; |
| 332 | if (defined $$tthPreambleCache) { |
332 | if (defined $$tthPreambleCache) { |
| 333 | $tthPreamble = $$tthPreambleCache; |
333 | $tthPreamble = $$tthPreambleCache; |
| 334 | } else { |
334 | } else { |
| 335 | my $tthPreambleFile = $ce->{courseDirs}->{templates} . "/tthPreamble.tex"; |
335 | my $tthPreambleFile = $ce->{courseDirs}->{templates} . "/tthPreamble.tex"; |
| 336 | if (-r $tthPreambleFile) { |
336 | if (-r $tthPreambleFile) { |