Numbas v9.0 is out

128 views
Skip to first unread message

Christian Lawson-Perfect

unread,
Aug 19, 2025, 9:22:44 AMAug 19
to Numbas Users
We're pleased to announce that v9.0 of Numbas is now out.

The default theme has been almost completely rewritten to improve accessibility, modernise the code, and remove unneeded libraries. The loading mechanism has also been rewritten, so it's now possible to use a single copy of the Numbas runtime to load several questions or exams in a single page.

There are several breaking changes in this version which will affect users of custom themes, and the minimum supported browser versions have changed.

You can read all about the changes on the Numbas blog: https://www.numbas.org.uk/blog/2025/08/numbas-v9-0/

Ben Brawn

unread,
Aug 21, 2025, 2:08:36 AMAug 21
to Numbas Users
Whoa, a lot of changes.
As you might expect, however, we are having a handful of issues
  1. On some questions, when we try to edit text the cursor jumps to the start of the textbox as soon as we try to type anything. It seems to be because of the presence of a h break in the html. Here is an editable example https://numbas.mathcentre.ac.uk/question/share/edit/1427f457-9c70-4cfc-a7bd-892098ed49b4 (obviously, our workaround for the meantime is using the html rather than the nice editor) 
  2. I've noticed that things like $10^\var{power}$  used to typeset perfectly regardless of the sign of the power, but now if the power is negative, it typesets it with the negative sign in the power and the absolute value not in the exponent. Obviously, I can fix this by using braces around \var{power}, but I will have to change this in countless questions. Is this a bug, and if so, can it be fixed?  
  3. There is an issue with the hover-over preview of maths in the editor  when there are underscores in the \var{} environment (It also doesn't affect the live question in any way. Everything appears to work fine when running the question, and even clicking the "preview" eyeball shows everything correctly)

image

 

You can actually see thing happening inside the advice preview before you begin to edit it:

image


Cheers
Ben

Ben Brawn

unread,
Aug 21, 2025, 2:11:44 AMAug 21
to Numbas Users
Let's see if the pictures work this time 
image1.pngimage2.png

Shrikant Kanitkar

unread,
Aug 21, 2025, 4:21:32 AMAug 21
to numbas...@googlegroups.com
How to access the latest 9.0 version? (When I open my Numbas, it is showing the old things only).

Shrikant Kanitkar (+919686024095)


--
You received this message because you are subscribed to the Google Groups "Numbas Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to numbas-users...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/numbas-users/CAEMHSOjuBetJQNu_95K6gw5x%2Bj_WK3i_ZOXYn4_FrVipAwg0sQ%40mail.gmail.com.

William Haynes

unread,
Aug 21, 2025, 4:54:17 PMAug 21
to Numbas Users
Congratulations on the Version 9 update.  I can definitely notice a speedup when loading exams.

I spent some time yesterday playing with the embedding content feature and I ran across a couple of things that I want to mention.

1. On the documentation page, the sentence about the ```noload``` attribute just trails off without finishing the thought...

2.  In the section about **Extension data** the statement "all of the extension files are included in a directory called extensions, and the data JSON is in the file ```extensions/extensions.json```" doesn't agree with my observation.   There were no javascript files in the ```extensions``` directory, but they were already loaded into the numbas.js file taken from a zip file.   Is there supposed to be a base version of ```numbas.js``` and we use this method to add the extension items?

3. The instructions about adding``` <script type="application/json" slot="extension-data">``` element inside ```<numbas-exam>``` were confusing to me.  I think an example would be helpful here, showing how to include the json inside the tag.

4.There's a outdated line in the documentation page for **themes* that says "All JavaScript and CSS files used by a Numbas exam are collected into two files, ```scripts.js``` and ```styles.css```.  This is now wrong, right?

5.  Can you say a little more about the use cases for this method? I have been including Numbas exams in an iframe in PreText, and that has been working well.  Should I change?

Anyway, thanks again for all you work on this project.

Will

Christian Lawson-Perfect

unread,
Aug 22, 2025, 5:18:01 AMAug 22
to numbas...@googlegroups.com
Thanks for reporting these, Ben. They're all bugs, and I think I've fixed them all.

--
You received this message because you are subscribed to the Google Groups "Numbas Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to numbas-users...@googlegroups.com.

Christian Lawson-Perfect

unread,
Aug 22, 2025, 5:18:55 AMAug 22
to numbas...@googlegroups.com
Shrikant,
The editor at numbas.mathcentre.ac.uk has been updated to v9.0. You'll need to re-download any exam packages you're using, to get the latest version.

Christian Lawson-Perfect

unread,
Aug 22, 2025, 5:47:58 AMAug 22
to numbas...@googlegroups.com
Thanks for these points, Will.

1. Whoops! I've gone back and finished the page.
2. Are you sure the package you were looking at was compiled with v9? If so, please can you give me a link to it?
3. I've added an example of a complete <numbas-exam> element with extension data.
4. Yes, that's now wrong. I've updated it.
5.  Embedding questions in PreTeXt is exactly the kind of thing this would be good for. It means that the student only has to download the Numbsa runtime scripts once for the whole page/site, instead of once per question. Now you've reminded me about it, I might see if I can get a <numbas> tag included in stock PreTeXt, like the <webwork> tag.

William Haynes

unread,
Aug 22, 2025, 7:29:18 AMAug 22
to numbas...@googlegroups.com
Hi Christian,

Thanks.  Here is a link to an example:  https://numbas.mathcentre.ac.uk/exam/21027/chapter-8-exercises/   

In the downloaded zip file, the directories for the each extension contain the readme.md, but not the associated javascript

WIll

Ben Brawn

unread,
Aug 24, 2025, 9:37:45 PMAug 24
to Numbas Users
Thanks Christian. There are still two remnants of those bugs:
  1. An issue with the preview when the exponents variable name is more than 1 character, e.g. for $10^\var{a_1}$ or $10^\var{abc}$ when a_1 or abc is negative. The negative symbol is in the exponent but the magnitude of a_1 is not. It works in the live question however.
  2. An issue with the hover-over preview of maths when a variable's name is of the form a_b where a is a string of more than 1 character, e.g. a_12 will be ok but abc_1 shows Math input error.
Cheers

Ben Brawn

unread,
Aug 25, 2025, 1:16:39 AMAug 25
to Numbas Users
We also noticed this visual bug, I assume from the change to mathjax 4. In the inline math environment latex is spaced poorly, e.g binary operators, equal signs, inequaltiies... are not not centered. You can see it here  https://numbas.mathcentre.ac.uk/question/178959/mathjax-spacing/embed/?token=dfaff2ec-1d94-45e2-bf98-3ccaa998b7dd note in the editor the preview works fine, but when you run the question it looks weird.

Christian Lawson-Perfect

unread,
Aug 26, 2025, 4:15:05 AMAug 26
to numbas...@googlegroups.com
Oh whoops, it looks like the mathcentre editor didn't update properly. I must have run the command to update it and not looked at the output. I've updated it now and I'm not seeing those problems any more.

Christian Lawson-Perfect

unread,
Aug 26, 2025, 4:16:11 AMAug 26
to numbas...@googlegroups.com
I think the new spacing issues are to do with the automatic linebreaking support in MathJax 4. I'd be surprised if there was a consistent difference between the editor and the runtime, but I'll look into it.

Ben Brawn

unread,
Sep 1, 2025, 2:12:25 AMSep 1
to Numbas Users
We also found this weird alignment issue for geogebra when used in tables with alignment

https://numbas.mathcentre.ac.uk/question/179456/mwe-of-ggb-static-picture-in-table-bug/embed/?token=d34bd219-d531-4140-80a7-40850fd0f8e5 

William Haynes

unread,
Sep 1, 2025, 5:18:02 PMSep 1
to Numbas Users
I have a lot of questions where I define a variable to hold a geogebra applet, for example:  applet = geogebra_applet('whx4ybuq', params),then use {applet} in the problem statement.  This was convenient for me because I could see the rendered applet in the variables list without having to preview or run the problem, and it seemed to work fine despite the warning about interactive HTML nodes.  

Now I am seeing this in the variables list:  

Problem encountered when creating GeoGebra applet: TypeError: undefined is not an object (evaluating 'container.appendChild')

The questions containing {applet} continue to work properly when run, but the variable list and preview no longer show the rendered applet.

Bug or should I avoid doing this?

Will

Ben Brawn

unread,
Sep 2, 2025, 12:20:25 AMSep 2
to Numbas Users
We have also noticed that dot points aren't indenting like they should/used to
That is instead of 
  • first
    • second
we get them left aligned without indent
Message has been deleted
Message has been deleted
Message has been deleted

Ulrich Goertz

unread,
Sep 5, 2025, 3:57:32 AMSep 5
to Numbas Users
Thanks, Christian, for all the work going into Numbas 9.0!

I think I now understand the spacing issue. I found it more convenient to write it down on github, see https://github.com/numbas/Numbas/issues/1146

Best, Ulrich

Ulrich Goertz

unread,
Sep 5, 2025, 3:57:32 AMSep 5
to Numbas Users
Thanks, Christian, for all the work on the new version.

Regarding the MathJax spacing problem, I think I have figured out the reason. I wrote a github issue (numbas/Numbas issue 1146) on this. (I do not include the link here because Google already deleted this message of mine twice and I suspect that the link could be the reason(?))

Best regards, Ulrich 

Christian Lawson-Perfect schrieb am Dienstag, 26. August 2025 um 10:16:11 UTC+2:

Ulrich Goertz

unread,
Sep 5, 2025, 3:57:32 AMSep 5
to Numbas Users
Thanks, Christian, for all the work on the new version!

I think I figured out the problem with the weird MathJax spacing, see this github issue.

Best regards, Ulrich

Christian Lawson-Perfect

unread,
Sep 9, 2025, 11:20:46 AMSep 9
to numbas...@googlegroups.com
Thanks for reporting this, Ben. It looks like GeoGebra is sensitive to the 'text-align' CSS property, but doesn't reset it itself.
I'm not sure why this only affects the new Numbas theme. Anyway, I've made a change to the GeoGebra extension to force `text-align: start` in the applet container element, and that seems to have fixed it.

Christian Lawson-Perfect

unread,
Sep 9, 2025, 11:22:08 AMSep 9
to numbas...@googlegroups.com
Hi Will,
Can you give me a link to a question with this problem, please?

William Haynes

unread,
Sep 9, 2025, 2:32:07 PMSep 9
to 'guillaume theo' via Numbas Users

William Haynes

unread,
Sep 9, 2025, 5:01:54 PMSep 9
to 'guillaume theo' via Numbas Users
Christian,

Here’s an added data point.

In the first example question below the definition of applet is

//geogebra_file("easy_vectors.ggb",params)
geogebra_applet("ehwmftxq",params)

The first line was commented out because as you may remember,  geogebra_file was broken for a couple of weeks last February, so at that time I replaced it with the equivalent geogebra_applet call.

Just now, I uncommented the first line and the preview worked as expected! and when I switched it back it still continued to work properly!?

The second example still shows the error message, however.

Will

Christian Lawson-Perfect

unread,
Sep 10, 2025, 4:29:56 AMSep 10
to numbas...@googlegroups.com
Those both work for me, in both Firefox and Chrome.
Do you get the error every time? I wonder if it's a timing issue.

--
You received this message because you are subscribed to the Google Groups "Numbas Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to numbas-users...@googlegroups.com.

William Haynes

unread,
Sep 10, 2025, 3:26:56 PMSep 10
to 'guillaume theo' via Numbas Users
Yes, it happens every time in Safari, Chrome, and Firefox on a Mac.

The error messages are slightly different, but say the same thing.

Safari:  Problem encountered when creating GeoGebra applet: TypeError: undefined is not an object (evaluating 'container.appendChild')
Chrome: Problem encountered when creating GeoGebra applet: TypeError: Cannot read properties of undefined (reading 'appendChild')
Firefox:  Problem encountered when creating GeoGebra applet: TypeError: can't access property "appendChild", container is undefined

If I clear and then redefine the applet, the preview works properly until I close and reopen the editor window.

Will

On Sep 9, 2025, at 2:31 PM, William Haynes <wha...@maritime.edu> wrote:

Ben Brawn

unread,
Sep 11, 2025, 1:17:12 AMSep 11
to Numbas Users
I have also seen what William Haynes is mentioning in my questions. Here I have shown his question misbehaving: 

To be clear, the error happens in this preview
preview error.PNG

Then, on regeneration, it will not display GGB nor an error
previw error 2.PNG

In the variables section at first you get an error
variable error.PNG


and then, on regeneration, the GGB is actually shown



variable 2.PNG

While playing with William's questions, I thought I had found a permissions issue, but it turns out all the changes aren't saved (thankfully): Even though I only had viewing permissions I was able to click on the function name geogebra_applet, type any letter on the keyboard and up popped all the functions that were alphabetically similar to the original function, I could then change the function, I also was able to click on the checkbox can an exam override the value of this variable'. Luckily, these changes weren't saved, so upon refresh, they reverted to the original. 
permissions 1.png
permissions 2.PNG

Christian Lawson-Perfect

unread,
Sep 11, 2025, 3:22:22 AMSep 11
to numbas...@googlegroups.com
Ahh, I had missed that you were talking about the preview inside the editor! I can see the problem now.

--
You received this message because you are subscribed to the Google Groups "Numbas Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to numbas-users...@googlegroups.com.

Christian Lawson-Perfect

unread,
Sep 11, 2025, 3:31:19 AMSep 11
to numbas...@googlegroups.com
Now fixed!

Ben Brawn

unread,
Sep 11, 2025, 7:37:07 AMSep 11
to Numbas Users
Many thanks for all your work.

William Haynes

unread,
Sep 11, 2025, 8:23:06 AMSep 11
to 'guillaume theo' via Numbas Users
Reply all
Reply to author
Forward
0 new messages