Difference between revisions of "Troubleshooting Hardcopy"
(New page: If the hardcopy generator detects that an error has occurred in the generation process, temporary files are automatically preserved and the error message provides links to the various temp...) |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
If the hardcopy generator detects that an error has occurred in the generation process, temporary files are automatically preserved and the error message provides links to the various temporary log files. |
If the hardcopy generator detects that an error has occurred in the generation process, temporary files are automatically preserved and the error message provides links to the various temporary log files. |
||
+ | |||
+ | WeBWorK comes with a test LaTeX file which you should test to ensure that your installation completed correctly, and that latex (and pdflatex) are actually working properly. The file is <code>check_latex.tex</code>, and is located in <code>webwork2/bin/</code>. Test compiling this file using the Apache user as well as your default (and root) users as necessary. For CentOS (and some other Linux distributions), the default install of texlive is somewhat poor, and it is recommended that you manually install the full TUG package set (see CentOS forums for [https://www.centos.org/forums/viewtopic.php?t=60137 more details]). The header files for WeBWorK require the <code>path</code> package from texlive, which doesn't install nicely via <code>yum</code> or <code>dnf</code> on CentOS, hence the necessary manual install. |
||
+ | |||
+ | Once installed, you can use the <code>which pdflatex</code> command to see which version of pdflatex is being automatically used. Then check <code>site.conf</code> for your WeBWorK install and make sure it points to the newly installed pdflatex, latex and dvipng binaries (which install to <code>/usr/local/texlive/2017/bin/x86_64-linux/</code> by default, with 2017 changing based on the year of release). Once you are sure your installation is working properly, and that <code>check_latex.tex</code> is compiling completely, move on to the steps below. |
||
If an error is more subtle, you may need to preserve temporary files manually. Set <code>$WeBWorK::PG::ImageGenerator::PreserveTempFiles</code> to <code>1</code> (in <code>webwork2/lib/WeBWorK/Constants.pm</code>). After that, you should see directories like <code>work.xxxxxx</code> accumulating under <code>html/tmp/hardcopy/</code> in your course directory. These contain files that the hardcopy generator uses in generating each PDF: |
If an error is more subtle, you may need to preserve temporary files manually. Set <code>$WeBWorK::PG::ImageGenerator::PreserveTempFiles</code> to <code>1</code> (in <code>webwork2/lib/WeBWorK/Constants.pm</code>). After that, you should see directories like <code>work.xxxxxx</code> accumulating under <code>html/tmp/hardcopy/</code> in your course directory. These contain files that the hardcopy generator uses in generating each PDF: |
||
Line 13: | Line 17: | ||
Check <code>hardcopy.log</code>, <code>pdflatex.out</code>, and <code>pdflatex.err</code> for errors. These might indicate problems in the TeX code being sent to pdfLaTeX for processing. The errors might be in the PG file, or in one of the header/footer snippets which are included to separate problems, sets, and users. The path to each file included in <code>hardcopy.tex</code> is noted in a comment. |
Check <code>hardcopy.log</code>, <code>pdflatex.out</code>, and <code>pdflatex.err</code> for errors. These might indicate problems in the TeX code being sent to pdfLaTeX for processing. The errors might be in the PG file, or in one of the header/footer snippets which are included to separate problems, sets, and users. The path to each file included in <code>hardcopy.tex</code> is noted in a comment. |
||
+ | |||
+ | |||
[[Category:Troubleshooting]] |
[[Category:Troubleshooting]] |
Latest revision as of 11:57, 18 September 2017
If the hardcopy generator detects that an error has occurred in the generation process, temporary files are automatically preserved and the error message provides links to the various temporary log files.
WeBWorK comes with a test LaTeX file which you should test to ensure that your installation completed correctly, and that latex (and pdflatex) are actually working properly. The file is check_latex.tex
, and is located in webwork2/bin/
. Test compiling this file using the Apache user as well as your default (and root) users as necessary. For CentOS (and some other Linux distributions), the default install of texlive is somewhat poor, and it is recommended that you manually install the full TUG package set (see CentOS forums for more details). The header files for WeBWorK require the path
package from texlive, which doesn't install nicely via yum
or dnf
on CentOS, hence the necessary manual install.
Once installed, you can use the which pdflatex
command to see which version of pdflatex is being automatically used. Then check site.conf
for your WeBWorK install and make sure it points to the newly installed pdflatex, latex and dvipng binaries (which install to /usr/local/texlive/2017/bin/x86_64-linux/
by default, with 2017 changing based on the year of release). Once you are sure your installation is working properly, and that check_latex.tex
is compiling completely, move on to the steps below.
If an error is more subtle, you may need to preserve temporary files manually. Set $WeBWorK::PG::ImageGenerator::PreserveTempFiles
to 1
(in webwork2/lib/WeBWorK/Constants.pm
). After that, you should see directories like work.xxxxxx
accumulating under html/tmp/hardcopy/
in your course directory. These contain files that the hardcopy generator uses in generating each PDF:
hardcopy.tex
- Source file to be fed to pdfLaTeX.hardcopy.log
- Log file written by pdfLaTeX.pdflatex.stdout
- Messages written to STDOUT by pdfLaTeX.pdflatex.stderr
- Messages written to STDERR by pdfLaTeX.
If pdflatex.out
and pdflatex.err
don't exist, this indicates that pdfLaTeX was never invoked. I'm not sure what would cause this.
If hardcopy.log
doesn't exist, then pdfLaTeX was invoked, but probably never ran. Check for a properly installed pdflatex
and make sure that the path to pdflatex
in global.conf
is correct.
Check hardcopy.log
, pdflatex.out
, and pdflatex.err
for errors. These might indicate problems in the TeX code being sent to pdfLaTeX for processing. The errors might be in the PG file, or in one of the header/footer snippets which are included to separate problems, sets, and users. The path to each file included in hardcopy.tex
is noted in a comment.