WeBWorK Main Forum

$CARET produces error in hard copy

$CARET produces error in hard copy

by Nathan Wodarz -
Number of replies: 3
I'm getting an error in an assignment that hasn't produced one in the past. I'm essentially using the Union Parser Orientation problems as an introduction. When I go to produce hard copy, I get the error:

  • Failed to convert TeX to PDF with command 'cd /ww/htdocs/tmp/UWSP_math119/hardcopy/work.AVIxsHCc && /usr/local/bin/pdflatex --shell-escape >pdflatex.stdout 2>pdflatex.stderr hardcopy' (exit=1 signal=0 core=0).
  • First error in TeX log is:
    ! Missing $ inserted.
    <inserted text>
     $
    l.296 ...st{\kern2pt\hrule\kern2pt}\cr}}\kern 0pt}
     \medskip
    I've inserted a begin-math/end-math symbol since I think
    you left one out. Proceed, with fingers crossed.
    
    

By downloading the TeX source,the errors seem to occur anytime that $CARET is used in the problem source.
In reply to Nathan Wodarz

Re: $CARET produces error in hard copy

by Michael Gage -
$CARET is defined in PGbasicmacros.pl and in TeX mode is supposed
to use the command \verb+^+ to hide the caret from TeX.

It's possible that you have a buggy copy of PGbasicmacros.pl, but my first guess is that your set header file has some code HTML code in it that causes TeX to barf.

Take a look at the set header file first and then at the PGbasicmacros.pl file if the culprit is really $CARET.

Hope this helps.

-- Mike

In reply to Michael Gage

Re: $CARET produces error in hard copy

by Davide Cervone -
Actually, it is redefined in setOrientation.pl (I don't recall why that was needed, but it probably can be removed from there). Perhaps you can comment out the $CARET from setOrientation.pl, which is in the setOrientation directory of the Union problem library.

I was not able to reproduce your problem. The Orientation set produces hardcopy just fine for me in both WW2.3.2 and WW2.4.1.
Mike's suggestion about the Header is a good one. There is a setHeader.pg file in the setOrientation directory that can be used as the header file for the Orientation set. You might try switching to that.

Otherwise, if you continue to have problems, make sure you have the most current version of the Union library, and let us know what version of WeBWorK you are using. It would help to download the TeX version of the hardcopy (rather than the PDF version) and attach that to a message here. I'll take a look at it and see if I can see what is wrong.

Davide
In reply to Davide Cervone

Re: $CARET produces error in hard copy

by Nathan Wodarz -
Apparently, some of the changes that I had made in the PGcourse.pl file locally conflicted with $CARET. I commented them out it back and it works fine. The comments here made it much easier to discover this. Thank you very much.