I have created a few macros that make customization of TeX display a bit easier. It would be nice to simplify it more.
First -- to have equations display vectors in a particular style place this
in your PGcourse.pl file (and place "PGcourse.pl" in the loadMacros() queueue).
addToTeXPreamble("\\newcommand{\\myVec}[1]{\\vec{#1}} ");
If you were to place this command in a single question (a .pg file) then you use single
backslashes instead of double backslashes. You should place the command towards the beginning of the question before any equations are rendered.
This affects only image ("dvipng") mode. It does not affect jsMath or MathJax
mode -- that will have to come later.
You can now modify this preamble command in PGcourse.pl to obtain different styles for denoting vectors.
To make sure that you can see the changes (equation images are cached!)
place
refreshEquations(1);
in a given question or in the PGcourse.pl file while testing. This forces equation images to be recreated every time.
To set the style for the hardcopy for a given homework set, place the command
\newcommand{\myVec}[1]{\vec{#1}}
in the header file used for the homework set in the section which is
read when creating hardcopy. (Or if you use separate header files for
screen display and for image display place it in the hardcopy header file.
There are ways to change the TexPreamble for an entire site --
see the WeBWorK/Constants.pm file for images TexPreamble and
the webwork2/conf/snippets directory for the locations of the files to change the hardcopy version.
jsMath and MathJax headers are defined in the webwork2/html/ directory.
It would be nice to be able to change all of the different presentation modes simultaneously with one command -- but that is not possible yet.
-- Mike