Is it possible to adjust text subscript-depth?

9 次查看(过去 30 天)
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