uihtml does not render LaTeX equation

조회 수: 4 (최근 30일)
Pawel Kudela
Pawel Kudela 2024년 3월 20일
댓글: Pawel Kudela 2024년 9월 3일
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
Ramtej
Ramtej 2024년 3월 20일
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 2024년 3월 20일
Thanks, I will use "MathJax" external library and copy js files.

댓글을 달려면 로그인하십시오.

답변 (1개)

Ishaan Mehta
Ishaan Mehta 2024년 9월 3일
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
Pawel Kudela
Pawel Kudela 2024년 9월 3일
No, it is not what I was looking for. I had to use MathJax.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by