#NEWLINE# def test_latex_matrix_with_functions( ) : #NEWLINE# #INDENT# t = symbols ( 't' ) #NEWLINE# theta1 = symbols ( 'theta1' , cls = Function ) #NEWLINE# M = Matrix ( [ [ sin ( theta1 ( t ) ) , cos ( theta1 ( t ) ) ] , [ cos ( theta1 ( t ) . diff ( t ) ) , sin ( theta1 ( t ) . diff ( t ) ) ] ] ) #NEWLINE# expected = '\\left[\\begin{matrix}\\sin{\\left (\\theta_{1}{\\left (t \\right )} \\right )} & \\cos{\\left (\\theta_{1}{\\left (t \\right )} \\right )}\\\\\\cos{\\left (\\frac{d}{d t} \\theta_{1}{\\left (t \\right )} \\right )} & \\sin{\\left (\\frac{d}{d t} \\theta_{1}{\\left (t \\right )} \\right )}\\end{matrix}\\right]' #NEWLINE# assert ( latex ( M ) == expected )