Forum archive 2000-2006

Richard Bayne - typeset display problems

Richard Bayne - typeset display problems

by Arnold Pizer -
Number of replies: 0
inactiveTopictypeset display problems topic started 5/1/2003; 11:51:52 PM
last post 7/7/2003; 1:08:08 PM
userRichard Bayne - typeset display problems  blueArrow
5/1/2003; 11:51:52 PM (reads: 2449, responses: 11)
After a couple of weeks of low to moderate hassle, we managed to finally get version 1.8 of Webwork installed on a server here and I am in the process of testing a demo course. For the most part, things seem ok except for the fact that I am not able to get either typeset or typeset2 to display properly. The typeset 2 choice displays the same as text and typeset results in the error message: "can't rename /usr/local/webwork/system/courses/demoCourse/html/tmp/ l2h/5-54640/54640output.html". My initial look at the files seem to indicate that Latex2html is supposed to build this file somehow, but is not. When we did the setup, I was pretty sure that we did the installation properly. I am hoping that someone will point out some simple thing that we have overlooked. Any suggestions would be appreciated. Richard Bayne

<| Post or View Comments |>


userArnold K. Pizer - Re: typeset display problems  blueArrow
5/2/2003; 2:44:09 PM (reads: 2728, responses: 0)
Hi Richard,

You should probably concentrate on getting typeset2 mode (dvipng) to work since if you do, you probably won't use typeset mode(LaTeX2HTML). Unfortunately we do not yet have enought experience with dvipng to tell you the most common problems. The first thing to do is to make sure dvipng and LaTeX2HTML are installed and work on your systen independent of WeBWorK. The second thing to do is to set imageDebugMode to 1 instead of 0 in Global.pm and then look at the logs (especially Apache's log). Set imageDebugMode back to 0 when debugging is over.

Here is the relevent section from Global.pm with imageDebugMode set to 0 (its default value).

 

# To help debug screen and hard copy output problems set imageDebugMode to 1 and then
# look at the messages in WeBWorK's error log ( .../webwork/system.logs/error_log) and
# in the webserver's error log. Also look for log files, TeX files, etc. in the course's
# tmp directory. Don't leave imageDebugMode set to 1. If you do, you will find your file
# system filling up.



$imageDebugMode = 0;

Also you can email John Jones (jj@asu.edu) who is WeBWorK's dvipng expert. John would need to know what OS you are using, etc.

As far a Latex2html goes, the most common error is (quoting from the documentation):

LaTeX2HTML may be broken with respect to the WeBWorK system when installed. To fix it, make sure the following configuration variables are set as follows in the LaTeX2HTML configuration file, which may be called latex2html.config or l2hconf.pm and may be located in /etc or in the LaTeX2HTML directory, depending on the version and how it was installed.

$PK_GENERATION = 1
$DVIPS_MODE = 'toshiba'
$METAFONT_DPI = 180

Other errors should be noted in the error logs. We can give you more help with debugging LaTeX2HTML if necessary.

Arnie

<| Post or View Comments |>


userJohn Jones - Re: typeset display problems  blueArrow
5/2/2003; 2:46:18 PM (reads: 2719, responses: 1)
Hi,

If typeset 2 really displays the same error message, something is wrong. It uses different temporary directories (the l2h in the path above is what marks it as being connected to latex2html of the older typeset mode).

I think the most likely causes of the problems are directory permissions (if the web server cannot create new directories in the temporary heirarchy of a course). Another common source of problems is for your TeX system to build fonts. With latex2html, something like METAFONT_DPI needs to be set in .../lib/latex2html/l2hconf.pm or metafont will try to build fonts with font size 0, leading to division by 0 errors.

I have not seen typeset2 have this sort of problem. On the other hand, you have to install a couple of other bits of software to use typeset2 successfully, namely dvipng and preview.sty.

John

<| Post or View Comments |>


userRichard Bayne - Re: typeset display problems  blueArrow
5/2/2003; 5:20:53 PM (reads: 3038, responses: 0)
John, I am sorry if my original message was unclear. What I meant to convey is that the error message occurred for the typeset mode, but when using the typeset 2 mode, the output was the same as it was with text, i.e., the raw TeX code. By the way, it would not seem that the other problem has to do with permissions since the code for the relevant directories seem to be rwx for everyone. I will now be following the suggestions given by both you and Arnie. Thanks Richard

<| Post or View Comments |>


userRichard Bayne - Re: typeset display problems  blueArrow
5/2/2003; 6:11:51 PM (reads: 2722, responses: 0)
Folks, Thank you for the suggestions. At least by setting $METAFONT_DPI to 300 instead of 0, I seem to at least have the typeset mode operating. I shall quit now with a smile on my face and wait a few days before trying to deal with typeset 2. Richard

<| Post or View Comments |>


userJohn Jones - Re: typeset display problems  blueArrow
5/2/2003; 7:30:37 PM (reads: 2791, responses: 1)
Richard,

Here are the first steps for diagnosing the problem with typeset2. Make a file test.tex containing:

\documentclass{article}
\usepackage[active,textmath,displaymath]{preview}



\begin{document}
$x^2$



$$y^2$$
\end{document}

Hopefully the backslashes come through ok.

Run latex on the file. If you get errors, it is probably because preview.sty is not found, so we would have to see what went wrong there.

If latex goes ok (and there should be 2 pages of output), run dvipng test, and that should create 2 png images.

The next step will depend on what happens with these two tests.

John

<| Post or View Comments |>


userRichard Bayne - Re: typeset display problems  blueArrow
5/5/2003; 4:15:10 PM (reads: 3065, responses: 0)
John, I have run the two tests; latex works fine, but when I run dvipng, the error message is: "error while loading shared libraries: libpng.so.3: cannot open shared object file: No such file or directory"

Richard

<| Post or View Comments |>


userJohn Jones - Re: typeset display problems  blueArrow
5/6/2003; 1:33:05 PM (reads: 2750, responses: 0)
Hi Richard,

That narrows it down. First, I would run ldd dvipng on the executable. It will tell you where it finds, or doesn't find, shared libraries needed by the executable. We already know it won't find libpng.so.3, but this will tell you if there are others.

Next, I would run locate libpng to see if it is somewhere on your system. (If your system doesn't have the locate command, you can use find / -name libpng\* for a similar effect.)

If you really don't have the library, then you need to install it.

If you have it installed and it is the wrong version, either recompile dvipng or upgrade your version of the library.

If you have the right version, but ldd doesn't match it to dvipng, see if it's location is in /etc/ld.so.conf (the name on your system may be different, but it should be listed at the end of the man page for ldconfig).

In all likelyhood, you will need to recompile dvipng. You can either work from the version you got from my web page, fiddling things so that it finds what it needs, or get a fresh copy. The dvipng maintainer has made some improvements in it including some simplifications in the configure/build process. On one hand, the new version has a configure script. On the other hand, it didn't find some of the things on my system without help. It can be found on the downloads page for the package preview-latex

 

http://preview-latex.sourceforge.net/

When autoconf/configure works well for the "official" release of dvipng, I will stop keeping an old copy available.

John

<| Post or View Comments |>


userRichard Bayne - Re: typeset display problems  blueArrow
5/6/2003; 4:35:46 PM (reads: 2737, responses: 0)
John, Yippee, it seems that reinstalling dvipng worked, though this time it did not list libpng.so.3 as needed. Nevertheless, things did work and the typeset2 is now operating. Thank you very very much.

Richard

<| Post or View Comments |>


userMark Schmitt - Re: typeset display problems  blueArrow
7/3/2003; 2:17:06 PM (reads: 2656, responses: 0)
John,

I've just moved to a new server, and I'm running into trouble with typeset2 as well. I seem to be missing preview.sty, which is problem 1. I also can't seem to install preveiw-latex, since I can't get AUCTeX to install.

Any ideas where I should start. The machine is a standard RedHat 9.0 server install.

Thanks for the help in advance.

Mark

<| Post or View Comments |>


userJohn Jones - Re: typeset display problems  blueArrow
7/3/2003; 5:39:25 PM (reads: 2684, responses: 0)
Hi Mark,

I hadn't realized that would be a problem (since I have auctex installed). Here is how to work around it. Start in the main directory created by unpacking preview-latex. Then give the commands

 

  cd latex
tex bootstrap.ins
tex preview-mk.ins

That creates all of the files you need. Next you need to know where the texmf directory is on your system. I will assume it is /usr/share/texmf (since that is where it is on mine). Then as root,

 

  mkdir /usr/share/texmf/tex/latex/preview
cp *.sty *.cfg *.def /usr/share/texmf/tex/latex/preview
texhash

If texhash is not in root's path, find it and give the command with its full path.

If this fails at some point, let me know.

John

<| Post or View Comments |>


userMark Schmitt - Re: typeset display problems  blueArrow
7/7/2003; 1:08:08 PM (reads: 2595, responses: 0)
John,

Those instructions worked perfectly. Thanks.

Mark

<| Post or View Comments |>