WeBWorK answer box behaviour for long answers

5 views
Skip to first unread message

Sean Fitzpatrick

unread,
Nov 12, 2025, 2:45:29 PM (11 days ago) Nov 12
to PreTeXt development
I am wondering if there is a way to adjust how the answer blanks respond in WeBWorK problems when there is a long answer.
(E.g. a problem asking for a degree 5 Taylor polynomial.)

Once the cursor reaches the right-hand boundary of the answer blank, a scroll bar appears, and as you continue to type, the focus does not remain with the cursor.
So you have to type a few characters, move the scroll bar to check that you typed correctly, type a few more, move the scroll bar again, etc. until you're done.

I don't know how hard it would be to make the scrolling automatic, so that the cursor remains in view while typing, but it would relieve a lot of frustration for students.

(Source: all the complaints I am getting now that we've reached the section on Taylor polynomials.)

Alex Jordan

unread,
Nov 12, 2025, 3:39:09 PM (11 days ago) Nov 12
to prete...@googlegroups.com
Sidestepping the issue. I have long felt that using columns in an exercisegroup for the HTML output is not helpful. It's not like with print, where you are saving paper space. So I use custom css to put exercisegroups into one column. If that were done where I think you are looking, the horizontal real estate issue you are hitting would be much alleviated.

--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/b1d273bb-eb0c-4796-bc73-3716fdefcbd3n%40googlegroups.com.

Sean Fitzpatrick

unread,
Nov 12, 2025, 3:51:52 PM (10 days ago) Nov 12
to PreTeXt development
I had in mind an example like this one: 


(Unrelated, but the answer checking doesn't work for these. I just merged changes to fix it but haven't rebuilt the HTML. My code is likely not ideal; I borrowed from some existing WeBWorK problems.)

When you click activate even on desktop, the problem expands to fill most of the width, but I still find it difficult to answer. 

If you realize you need to edit, it's even more frustrating, because as soon as you use the keyboard to move the cursor or enter text, the focus jumps back to the beginning of the expression. 

You received this message because you are subscribed to a topic in the Google Groups "PreTeXt development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pretext-dev/TCFPhRGUksc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/CA%2BR-jrf41TO4_a0Vsq-0JQV4PRWrNN%2BWs7%2Bt9VchdY3HU1%3DTWQ%40mail.gmail.com.

Alex Jordan

unread,
Nov 12, 2025, 6:53:40 PM (10 days ago) Nov 12
to prete...@googlegroups.com
For me on Firefox with Mac OS it does not expand to full width:

Screenshot 2025-11-12 at 3.40.36 PM.png


In this next shot, I artificially expanded its width. I could only get to the degree 3 term before needing to scroll:

Screenshot 2025-11-12 at 3.45.25 PM.png


So I see what you mean. Although I think it must be very rare to need that much width for an input. 

The behavior you would like to have is probably something to request with WeBWorK's MathQuill branch:
You could report an issue there as a feature request.

As for PreTeXt, aside from my suggestion to not use columns for exercisegroup in HTML, I'm not sure there is more that PTX could do to help with this.



Sean Fitzpatrick

unread,
Nov 12, 2025, 11:51:05 PM (10 days ago) Nov 12
to PreTeXt development
Thanks. I agree that there's no great reason to use columns for exercises in HTML, since vertical space is unlimited. 

The only complication I can think of is image width. When there are 2 columns, we don't specify a width (so it defaults to the column width). When there is one column, we set the width to 47%.

If we ignored the two column setting in HTML, we'd need to ensure images didn't suddenly blow up to full width. 

I'll confirm that I get the same bad behaviour in WeBWorK and then submit an issue there.

Reply all
Reply to author
Forward
0 new messages