import panel as pn pn.extension('katex', 'mathjax') latex = pn.pane.LaTeX( r'The LaTeX pane supports two delimiters: $LaTeX$ and \(LaTeX\)', styles={'font-size': '18pt'} ) latex pn.Column( pn.pane.LaTeX("$\frac{1}{n}$"), pn.pane.LaTeX(r"$\frac{1}{n}$") ) latex.object = r'$\sum_{j}{\sum_{i}{a*w_{j, i}}}$' pn.pane.LaTeX(r'$\sum_{j}{\sum_{i}{a*w_{j, i}}}$', renderer='mathjax', styles={'font-size': '18pt'}) maxwell = pn.pane.LaTeX(r""" $\begin{aligned} \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ \nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned} $""", styles={'font-size': '24pt'}) cauchy_schwarz = pn.pane.LaTeX(object=r""" $\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$ """, styles={'font-size': '24pt'}) cross_product = pn.pane.LaTeX(object=r""" $\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\ \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \end{vmatrix} $""", styles={'font-size': '24pt'}) spacer = pn.Spacer(width=50) pn.Column( pn.pane.Markdown('# The LaTeX Pane'), pn.Row(maxwell, spacer, cross_product, spacer, cauchy_schwarz) ) pn.Row(latex.controls(jslink=True), latex)