Is it possible to adjust text subscript-depth?

조회 수: 9 (최근 30일)
noahop
noahop 2018년 4월 11일
답변: Florian Glaser 2021년 4월 26일
As is seen in the example below, the subscript depth (the distance of lowering) is way too large.
I desire the subscripted symbol to be lowered/raised about 60% compared to baseline. The default behaviour seems to be 100%. Is it possible to adjust this?
Example code:
annotationHandle = annotation('textbox');
annotationHandle.FontSize = 22;
annotationHandle.FontWeight = 'bold';
annotationHandle.String = 'I_{ext} [µA/cm²]';
The unicode superscripted two ( ² ) in the example above is a perfect example of how it should look.
As a side note, I can say that I tried using unicode subscripted letters for 'e', 'x' and 't'. Unfortunately, there seems to be a bug (?) in Matlab, which converts the unicode subscripted letter 'ₑ' (U+2091) into a superscripted '1' if copied into the Matlab editor, or a missing char box ' ' if input using char(2091). I have tried both the Latex and Tex interpreters.
I am using R2017a and R2017b.

답변 (1개)

Florian Glaser
Florian Glaser 2021년 4월 26일
I have the exact same problem. Regular and tex-interpreted subscripts look HORRIBLE in Matlab. The latex interpreter fixes this, but then you cannot use upright greek symbols anymore, sigh. The only proper solutions seems to be customizing the used latex preamble to load user-defined packages and thereby get the full power of latex.
Mathworks, it's time to fix this.

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by