Upright \mu with latex interpreter

조회 수: 12 (최근 30일)
Gerd Fuchs
Gerd Fuchs 2025년 4월 17일
편집: Stefanie Schwarz 2025년 4월 23일
How do I get an upright \mu with the latex interpreter as figure label? I tried different things which were suggested in other posts like using \mathrm or the char(181). Nothing worked! Especially using char(181) is not supported with the latex interpreter. However, I need the latex interpreter in order to format the entire label text correctly.
ylabel('$\hat{x}$ in $\mathrm{\mu}$m', 'Interpreter', 'latex');
Do you have any ideas, how to solve this issue?
  댓글 수: 1
Stephen23
Stephen23 2025년 4월 17일
편집: Stephen23 2025년 4월 17일
The short answer is that MATLAB cannot do this.
Please give feedback to TMW at the bottom of the page here:
and please also make an enhancement request here:
The only working (but rather fiddly) alternative that I have seen is this:

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

답변 (1개)

Stefanie Schwarz
Stefanie Schwarz 2025년 4월 23일
편집: Stefanie Schwarz 2025년 4월 23일
Unfortunately, MATLAB's current LaTeX interpreters do not support upright Greek letters. Due to frequent requests for a non-italized \mu, we are currently considering adding \upmu support in a future MATLAB release. While our rendering infrastructure doesn't allow adding full LaTeX packages like upgreek, we are exploring the possibility of implementing individual commands. So as Stephen mentioned, readers are encouraged to contact MathWorks Technical Support to express their interest in support for specific non-italicized Greek letters.
Note that \mathrm is only intended to apply to uppercase and lowercase letters but not symbols. So inside of \mathrm, Greek letters like \mu are still expected to be italic.
You can consider the workarounds for the TeX interpreter that have been discussed on MATLAB Answers:

카테고리

Help CenterFile Exchange에서 Labels and Annotations에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by