WeBWorK Problems

Using LaTeX packages in problem code

Re: Using LaTeX packages in problem code

by Danny Glin -
Number of replies: 0
I suspect that you won't have any luck getting extra packages to work with the jsMath display mode, since I'm not sure that it has the ability to load packages.

In theory this should be possible with the images display mode and the hardcopy generator, though you will have to load the package in the right place for each.

If you want this to show up in the hardcopy, you will have to load the package in the hardcopy preamble. This would mean editing conf/snippets/hardcopyPreamble.tex and adding a line like
\usepackage{polynom}

For the images display mode, I believe that this is handled in lib/WeBWorK/Constants.pm.
Somewhere after the line $WeBWorK::PG::ImageGenerator::TexPreamble = <<'EOF';
add
\usepackage{polynom}
(probably with the other usepackage commands).

In theory these two changes should make the polynom package available to the hardcopy generator and images display mode respectively (assuming that the package is properly installed on the server. Have you tried it from the command line?).

I haven't tested any of this. Let me know if you have any success.

Danny