Filter löschen
Filter löschen

Is it possible to adjust text subscript-depth?

7 Ansichten (letzte 30 Tage)
noahop
noahop am 11 Apr. 2018
Beantwortet: Florian Glaser am 26 Apr. 2021
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.

Antworten (1)

Florian Glaser
Florian Glaser am 26 Apr. 2021
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.

Kategorien

Mehr zu Characters and Strings finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by