Installation

Hardcopy error in WW2.19

Hardcopy error in WW2.19

by Arnold Pizer -
Number of replies: 8

In testing Ubuntu 24.04 and WW2.19 I have run into the following hardcopy error:

Failed to convert TeX to PDF with command ...

First error in TeX log is:

! LaTeX Error: Unicode character   (U+202F)
               not set up for use with LaTeX.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.57 \webworkSetCopyrightFooter
                               
This was with a new one problem set.  The same error occurs (in different places) with the included Demo and Orientation sets.
 U+202F is a Narrow No-Break Space and was probably ignored with earlier versions of TeXLive.  Any ideas on how best to handle this? Is there a LaTeX package  that contains this character?  Note that this character (and many others) does appear in https://tug.org/TUGboat/tb42-3/tb132mitt-unicodefonttable.pdf.
In reply to Arnold Pizer

Re: Hardcopy error in WW2.19

by Glenn Rice -
What problem is causing the issue? Can you give the OPL problem if it is from there, or post the coffee for the problem otherwise?
In reply to Glenn Rice

Re: Hardcopy error in WW2.19

by Glenn Rice -

Wait, I get the same problem on Ubuntu 24.04.  This is an issue with the date added by the set header.  It is caused by a change in the Perl DateTime localization that adds the narrow no-break space to US dates.  I had tracked down the issue before, but I can't remember precisely which package it is.  I will look into finding a way to fix this though that doesn't require downgrading that package.

In reply to Glenn Rice

Re: Hardcopy error in WW2.19

by Arnold Pizer -
It does occur in the date in one of my cases, but occurs in different places in the other two cases. And it occurred in 3 of my 3 attempts so it appears to be a pretty common error.
In reply to Arnold Pizer

Re: Hardcopy error in WW2.19

by Glenn Rice -
Are you sure? Dates are the only things that webwork adds the narrow no break space for, and that is only with a recent change in the DateTime::Locale Perl package. PDFLaTeX has never been able to deal with multibyte Unicode characters. The only solutions to deal with multibyte Unicode characters are to switch to XeTeX or LuaTeX.
In reply to Glenn Rice

Re: Hardcopy error in WW2.19

by Glenn Rice -

I suspect that even in the cases that you don't think it is the dates it actually is.  Note that Hardcopy.pm now inserts the dates into all hardcopy tex files.  It adds the definitions \webworkOpenDate, \webworkDueDate, and \webworkAnswerDate, and if reduced scoring is enabled \webworkReducedScoringDate.  Even if those definitions are not used by your set header, pdflatex will fail.  The existence of the narrow no-break space in the tex file is all that is needed to break pdflatex.

In reply to Glenn Rice

Re: Hardcopy error in WW2.19

by Glenn Rice -

Try installing the Ubuntu package texlive-xetex and uncommenting line 687 of localOverrides.conf (687 is the line number in the dist file, but of course may not be in your copy). That is the line that reads $externalPrograms{pdflatex} ="/usr/bin/xelatex --no-shell-escape";.

In reply to Glenn Rice

Re: Hardcopy error in WW2.19

by Arnold Pizer -

Everything worked fine using xetex.  Maybe xetex (or luatex) should be the default.

Thanks again.

Arnie