WeBWorK Problems

List numbering in PGML

List numbering in PGML

by Olivia Henders -
Number of replies: 3
Something that I've noticed when using PGML is that "lettered" lists seem to be kind of buggy, at least if you want clarity.

Here's what I mean:

E.g.1 If you "number" your list as follows:

a. Item A
b. Item B
...
h. Item H
i. Item I
j. Item J

Then, the list displays normally with the a, b, c, etc. letters, but once it gets to the 'i', the numbering actually restarts, with it being treated as roman numerals instead of letters. Then, at item J, the list starts over at 'a', with subsequent items continuing to follow the pattern.

Now, the "fix" for this is to just start each line with 'a.', since PGML will auto-number. However, this just makes the code a pain to read, because it's hard to pick out particular list items, particularly if you're trying to match up answers with different items.

Incidentally, I discovered a similar problem with Roman numeral lists when making a particularly long question: if you get up to 50 ('l' in roman numerals), it's suddenly treated as an alphabetic list, the 'l' gets changed to an 'a', and then the next item starts over at roman numeral 'i'.

Is this a known issue? Sorry if my explanation is a bit confusing; let me know if you'd like a code snippet attached for clarification.
In reply to Olivia Henders

Re: List numbering in PGML

by Davide Cervone -
You are right, this is a bug in PGML. The detection of roman numerals (lower- or uppercase) is not very sophisticated.

On the other hand, you don't actually have to make *all* the lines tart with a. as you could just change i. to a. (and also v. and x. if you get far).

You are also right that PGML doesn't do L (or C or M) in roman numerals. I never expected anyone to need lists that long. You could start over again with i. again at that point, or use the less-compact xxxxx for L.
In reply to Olivia Henders

Re: List numbering in PGML

by Davide Cervone -
Here is an updated copy of PGML.pl that should fixe these issues. You can place it in your course's templates/macros directory if you want to use it. I will be submitting the changes for inclusion in a coming release, but I think v2.13 is being prepared for this weekend, and it may not make it into that.
In reply to Davide Cervone

Re: List numbering in PGML

by Olivia Henders -
Thank you for the updated file; that fixed the issue. :) Both roman numeral and letter-based lists are working fine now, even up to 50 (L) for the roman numerals.

Cheers!