numbas / Numbas

A completely browser-based e-assessment/e-learning system, with an emphasis on mathematics
http://www.numbas.org.uk
Apache License 2.0
198 stars 118 forks source link

Vertical lines in matrices #970

Open felixlen opened 1 year ago

felixlen commented 1 year ago

I am exploring Numbas for teaching linear systems and wonder if it possible to use the matrix input with some visual aid for entering augmented matrices corresponding to linear systems. Another application of this would be finding inverses of matrices where the original matrix is augmented by identity and Gaussian elimination is applied.

I am thinking of having a regular matrix input, but another option in the input that specifies the positions of vertical lines in relation to the number of columns specified in the matrix entry, such that for a linear system I could specify the set consisting of the second last column to get a vertical line before the last column.

From what I see it is currently not supported to have that kind of entry, #628 and #392 in a similar direction. Are there plans for something like this on the horizon or is there a workaround I could use?

christianp commented 1 year ago

I've also wanted this for linear algebra questions!

Laura and I have had a chat about this, and we came up with the following:

A drop-down selection for gridlines, with options "none", "first/last row/column", and "custom". "custom" will reveal two fields where you can write JME expressions giving lists of row and column numbers that should have gridlines.

We talked about having more complicated annotations, like a border surrounding a single cell, but that's more appropriate for a spreadsheet interface, and "matrix entry" should just concern itself with mathematical matrices, which typically don't have many annotations.

felixlen commented 1 year ago

That sounds awesome and would cover everything I need. Thanks a lot for consideration.