I have a poorly formatted LaTeX which needs to be formatted in specific manner to render in Jupyter Notebook correctly:
# Supporting Libraries:
from qiskit.visualization import array_to_latex
from IPython.display import display, Markdown
# Unsuitable LaTeX
latex_baad = '$QFT = \\frac{1}{\\sqrt{32}} \n\n\\begin{bmatrix}\n0 \\\\\n -1 \\\\\n \\end{bmatrix}\n \\otimes \n\n\\begin{bmatrix}\n0 \\\\\n \\tfrac{1}{\\sqrt{2}}(1 - i) \\\\\n \\end{bmatrix}\n \\otimes \n\n\\begin{bmatrix}\n0 \\\\\n -0.92388 + 0.38268i \\\\\n \\end{bmatrix}\n \\otimes \n\n\\begin{bmatrix}\n0 \\\\\n -0.19509 - 0.98079i \\\\\n \\end{bmatrix}\n$'
# Suitable LaTeX
latex_good = r'$QFT = \frac{1}{ \sqrt{32}} \begin{bmatrix} 0 \\ -1 \end{bmatrix} \otimes \begin{bmatrix} 0 \\ \tfrac{1}{ \sqrt{2}}(1 - i) \end{bmatrix} \otimes \begin{bmatrix} 0 \\ -0.92388 + 0.38268i \end{bmatrix} \otimes \begin{bmatrix} 0 \\ -0.19509 - 0.98079i \end{bmatrix}$'
display(Markdown(latex_good))