rw-moore / SciLO

GNU General Public License v3.0
0 stars 0 forks source link

Ability to control delimiters around matrices and vectors #116

Open corlick98 opened 2 years ago

corlick98 commented 2 years ago

Is your feature request related to a problem? Please describe. Different groups may want different delimiters ("[", "(", etc) around matrices and vectors. We should support the ability to customise this behavior.

Describe the solution you'd like Preferably a input box for matrices and one for vectors at the question level that controls the behavior for any matrices/vectors in the question text as well as around any matrix fields (once they have been implemented).

Additional context

import json,re
from sage.misc.html import MathJax, latex
from sage.misc.latex import latex
__sage_mj=MathJax()
a = matrix(1, 1, [17])
print(__sage_mj.eval(a))
latex.matrix_delimiters("[", "]")
print(latex(a))
print(__sage_mj.eval(a))

this demonstrates that one can use the latex functions to change the behavior of the mathjax module. see https://doc.sagemath.org/html/en/reference/misc/sage/misc/latex.html for more examples