WeBWorK Problems

hardcopy tex error

by Andrew Dabrowski -
Number of replies: 3
I'm getting the following error when I try to print a hardcopy of a certain problem.

2 errors occured while generating hardcopy:

• Failed to convert TeX to PDF with command 'cd /home/dabrowsa/webwork/webwork2/htdocs/tmp/M211/hardcopy/work.xV9knmp_ && /usr/bin/pdflatex --shell-escape >pdflatex.stdout 2>pdflatex.stderr hardcopy' (exit=1 signal=0 core=0).
• First error in TeX log is:
! Missing control sequence inserted. <inserted text> \inaccessible l.194 { \pgmlSetup Please don't say \def cs{...}', say \def\cs{...}'. I've inserted an inaccessible control sequence so that your definition will be completed without mixing me up too badly. You can recover graciously from this error, if you're careful; see exercise 27.2 in The TeXbook. LaTeX Font Info: Font shape OT1/ptm/bx/n' in size <9> not available (Font) Font shape OT1/ptm/b/n' tried instead on input line 225. LaTeX Font Info: Font shape OT1/ptm/bx/n' in size <7> not available (Font) Font shape OT1/ptm/b/n' tried instead on input line 225.


The section of harcopy.tex around l. 194 looks like this:

{\catcode\ =12\global\let\pgmlSpaceChar= }%
{\obeylines\gdef\pgmlPreformatted{\par\small\ttfamily\hsize=10\hsize\obeyspaces\obeylines\let^^M=\pgmlNL\pgmlNL}}%
\def\pgmlNL{\par\bgroup\catcode\ =12\pgmlTestSpace}%
\def\pgmlTestSpace{\futurelet\next\pgmlTestChar}%\def\pgmlTestChar{\ifx\next\pgmlSpaceChar\ \pgmlTestNext\fi\egroup}%\def\pgmlTestNext\fi\egroup#1{\fi\pgmlTestSpace}%

\def^^M{\ifmmode\else\space\fi\ignorespaces}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{\pgmlSetup
In this problem you are to find the function $$\displaystyle{f(x)}$$ that satisfies both the equation $$\displaystyle{f'(x)=-8 x}$$
and the equation
\vskip\baselineskip
$$\displaystyle{\displaystyle (1) \qquad \frac{d}{dx}\left(\frac{f(x)}{24 x^2+1}\right) = \frac{-536 x}{(24 x^2+1)^2}\cdot }$$
\vskip\baselineskip

That "^^M" looks weird. Any idea how that got there? What is supposed to be going in those places?

Re: hardcopy tex error

by Chrissy Safranski -
I've never had very good luck finding the problem directly from the .tex hardcopy.  Once I use that to figure out what number problem in the set is causing the trouble, I go straight to that problem in the homework set and edit it.

From there, I can usually see a problem with the tex part of the problem.  One of my most common mistakes (due to copy and pasting) is to write something like
$blah blah blah = \[ blah blah$.

For some reason, it'll compile and look fine on the screen, but as tex it's not correct and I need to take out the middle \[ before the hardcopy will compile.

Sorry that's not more directed to your specific problem.  My suggestion is to go to the homework problem directly and then focus on the tex part of the problem, and see if you can spot an error.  For me, this has almost exclusively happened with problems that I've written or edited (and thus introduced the error).  I did find one in the library once involving a graph that wouldn't print, and I don't think I was ever able to find that error.