Forum archive 2000-2006

Thomas Hagedorn - Typeset2/Screen header problem

Thomas Hagedorn - Typeset2/Screen header problem

by Arnold Pizer -
Number of replies: 0
inactiveTopicTypeset2/Screen header problem topic started 7/24/2003; 6:08:09 AM
last post 7/25/2003; 12:40:07 AM
userThomas Hagedorn - Typeset2/Screen header problem  blueArrow
7/24/2003; 6:08:09 AM (reads: 1367, responses: 5)
We're running Webwork 1.8 and I'm having problem getting the following Screenheader file to work with typeset2. When Latex2HTML is selected as the default display option, the screen header is displayed fine, but when typeset2 (dvipng) is selected as the default, the Tex doesn't get converted. This only happens on the initial page for the problem set. Otherwise, typeset2 seems to work just fine and is the better choice as a default for the problems.

Thanks in advance, Tom

Here's the file (one of the Rochester sample files):

 

DOCUMENT();        # This should be the first executable line in the problem.



loadMacros(PG.pl,
PGbasicmacros.pl
);




$dateTime = $formatedDueDate;
$sectionNumber = protect_underbar($sectionNumber);
$setNumber = protect_underbar($setNumber);
$course = protect_underbar('Calculus A');




BEGIN_TEXT
$BEGIN_ONE_COLUMN
\noindent {\large \bf $studentName}
\hfill
\noindent {\large \bf $course $sectionNumber Summer 2000}
\par
\noindent Sample WeBWorK problems. \hfill WeBWorK assignment $setNumber due $dateTime.



$END_ONE_COLUMN
END_TEXT





ENDDOCUMENT(); # This should be the last executable line in the problem.

<| Post or View Comments |>


userThomas Hagedorn - Re: Typeset2/Screen header problem  blueArrow
7/24/2003; 6:11:34 AM (reads: 1579, responses: 0)
Sorry about the posting of the file. The backslashes got deleted. The "correct" file should have backslashes and the commands are "\noindent", "\par", "\hfill" instead of noindent, par, and hfill.

-tom

<| Post or View Comments |>


userMichael Gage - Re: Typeset2/Screen problem -- formatting notes for HTML  blueArrow
7/24/2003; 8:22:46 AM (reads: 1571, responses: 0)
Hi,

Putting the entire code inside preformatted brackets, and doubling all of the backslashes fools the HTML engines into rendering the file as you'd like. I fixed it up for you.

--Mike

<| Post or View Comments |>


userMichael Gage - Re: Typeset2/Screen header problem  blueArrow
7/24/2003; 8:26:17 AM (reads: 1576, responses: 0)
Hi Tom,

With the exception of hardcopy output and Latex2HTML which runs the entire document through TeX (part of why it's so slow and resource intensive) only formulas (items inside \( \) and \[ \] )are run through the tex engine. What you are using below is a copy of the "hardcopyHeader" which would work fine on hardcopy output, but won't work on HTML output to the screen. (It's quite possible that it got mislabeled as screenHeader somewhere along the way.)

I like to change the headers of problem sets quite a bit, personalizing each header to the current class, explaining how the problem sets relate to what I'm doing in class, etc. etc. and keeping two headers in sync with each other (one for hardcopy and one for the HTML output) became a chore I didn't want to deal with. My solution was to devise the template below, which will render in either hardcopy or on the screen and the stuff I change will render both ways without having to be rewritten. You might like to use this template or modify it to suit your own needs.

--Mike



DOCUMENT();



loadMacros(
"PG.pl",
"PGbasicmacros.pl",
"PGchoicemacros.pl",
"PGanswermacros.pl"
);



TEXT($BEGIN_ONE_COLUMN);



TEXT(MODES(TeX =>EV3(<<'EOT'),HTML=>"",Latex2HTML=>""));
\noindent {\large \bf $studentName}
\hfill
\noindent {\large \bf MTH 143 $sectionNumber Spring 2003}
\par



EOT



BEGIN_TEXT



$BBOLD WeBWorK assignment number $setNumber is due : $formattedDueDate. $EBOLD



$PAR
(This is early Friday morning, so it needs to be done THURSDAY night!)
Remember to get this done early!
$PAR
The \{ htmlLink(qq!http://www.math.rochester.edu/courses/143/home/!,"home page") \}
for the course contains the syllabus, grading policy, and other information.
$PAR
END_TEXT



##################
# EDIT BELOW HERE
##################
BEGIN_TEXT
$PAR



This has material on separable differential equations, mainly from section 9.3



$PAR
END_TEXT
##################
# EDIT ABOVE HERE
##################
BEGIN_TEXT
The primary purpose of WeBWorK is to let you know that you are getting the correct answer or to alert
you if you are making some kind of mistake. Usually you can attempt a problem as many times as you want before
the due date. However, if you are having trouble figuring out your error, you should
consult the book, or ask a fellow student, one of the TA's or
your professor for help. Don't spend a lot of time guessing -- it's not very efficient or effective.
$PAR
Give 4 or 5 significant digits for (floating point) numerical answers.
For most problems when entering numerical answers, you can if you wish
enter elementary expressions such as \( 2\wedge3 \) instead of 8, \( sin(3*pi/2) \)instead
of -1, \( e\wedge (ln(2)) \) instead of 2,
\( (2+tan(3))*(4-sin(5))\wedge6-7/8 \) instead of 27620.3413, etc.
Here's the
\{ htmlLink(qq!http://webwork.math.rochester.edu/docs/docs/pglanguage/availableFunctions.html!,"list of the functions") \}
which WeBWorK understands.
$PAR
You can use the Feedback button on each problem
page to send e-mail to the professors.




$END_ONE_COLUMN
END_TEXT



<| Post or View Comments |>


userArnold K. Pizer - Re: Typeset2/Screen header problem  blueArrow
7/24/2003; 10:48:42 AM (reads: 1618, responses: 0)
Hi Tom,

The fact that equations in the screenheader file are not being processed by dvipng (typeset2 mode) in WeBWorK 1.8.00 is a bug. It was fixed almost immediately but we didn't think it (or any of the other minor bugs we found) warrented a new distribution.

At this point I would suggest that you upgrade to WeBWorK 1.9.01 which hopefully will be released later today. This will fix this and other bugs and give you other enhancements. If you want to stick with WW 1.8 (which I don't recommend), you should grab version 1.34 of welcomeAction.pl from the CVS (later versions require additional changes). The bug you report was actually fixed in Revision 1.29 Thu Oct 24 18:31:21 2002 UTC.

The easiest and best solution is to upgrade to WeBWorK 1.9.01. Of course you can also just avoid using math equations in screen header files.

Arnie

<| Post or View Comments |>


userThomas Hagedorn - Re: Typeset2/Screen header problem  blueArrow
7/25/2003; 12:40:07 AM (reads: 1589, responses: 0)
Mike and Arnie,

Many thanks! I look forward to the 1.9.01 release.

-tom

<| Post or View Comments |>