uihtml does not render LaTeX equation

4 vues (au cours des 30 derniers jours)
Pawel Kudela
Pawel Kudela le 20 Mar 2024
Commenté : Pawel Kudela le 3 Sep 2024
I have uihtml component in App Designer which points to html documentation.
The line:
<p>My inline math code <span class="math notranslate nohighlight">\(A_\text{c} = (\pi/4) d^2\)</span>.</p>
is rendered properly in web browser as inline equation
but in uihtml component it does nothing.
How to fix that?
  2 commentaires
Ramtej
Ramtej le 20 Mar 2024
By default HTML does not support embedded Latex. You need to use external tools like "MathML" or display engine like "MathJax" to render Latex equations.
Pawel Kudela
Pawel Kudela le 20 Mar 2024
Thanks, I will use "MathJax" external library and copy js files.

Connectez-vous pour commenter.

Réponses (1)

Ishaan Mehta
Ishaan Mehta le 3 Sep 2024
Hi Pawel,
I understand that you wish to add mathematical equations as text on the user interface of an MLAPP application.
You can render LaTeX code by using the "Label" component with its "Interpreter" option set to "latex", as in the image below.
This MathWorks documentation page provides more information on the "interpreter" optoin and the supported TeX markup.
Hope this helps!
  1 commentaire
Pawel Kudela
Pawel Kudela le 3 Sep 2024
No, it is not what I was looking for. I had to use MathJax.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Produits


Version

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by