Effacer les filtres
Effacer les filtres

Is it possible to adjust text subscript-depth?

7 vues (au cours des 30 derniers jours)
noahop
noahop le 11 Avr 2018
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.

Réponses (1)

Florian Glaser
Florian Glaser le 26 Avr 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.

Catégories

En savoir plus sur Characters and Strings dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by