I have a number of mathematical objects created with SymPy, which display fine in Jupyter using "display". For example, there are a number of functions which I can display with:
display(f1(x))
display(f2(x))
and so on. But what I want is to prefix each line with some explanatory text, so the output is, for example:
Question 1: f1(x)
Question 2: f2(x)
with the functions f1(x), f2(x) displayed properly typeset (which "display" provides).
The nearest I've got is with matrices:
M = sympy.Matrix([["(a)",f1(x)],["(b)",f2(x)]])
display(M)
but this has two problems: (1) it shows the matrix delimiters, and (2) it strips the parentheses from "(a)" and "(b)".
So I'm still hoping for help: how to add a string to a line that uses "display". Thanks!