Arranging gap boxes within latex

23 views
Skip to first unread message

David Wishart

unread,
May 21, 2025, 10:35:18 AMMay 21
to Numbas Users
I'd like to use gap boxes within a formatted equation for a student answer, something like the image below with the black boxes being replaced by gap entries.
Equation.png
The overall purpose is to ease the awarding of partial marks for a question with quite of working out before the final answer. Is this possible? 

Christian Lawson-Perfect

unread,
Jun 5, 2025, 3:53:33 AMJun 5
to numbas...@googlegroups.com
This isn't possible in MathJax 2, which Numbas currently uses.
MathJax 4, which has been in the works for quite a while, will allow embedding arbitrary HTML inside equations (see https://github.com/mathjax/MathJax-src/releases/tag/4.0.0-alpha.1#embedded-html). I don't know when that will be available, but I'll try to upgrade to it as soon as possible.

Until then, the compromise we've historically gone with is to put placeholder letters in the expression, then have a list of gaps asking the student to give values for each of them.

--
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/e4fe6272-3761-425e-92bf-e014833d424bn%40googlegroups.com.

David Wishart

unread,
Jun 5, 2025, 5:42:51 AMJun 5
to Numbas Users
Thanks for the clarification Christian. I was thinking about placeholders as a back up plan. I'll have a chat with the lecturer whose question this is and see what they prefer.
Reply all
Reply to author
Forward
0 new messages