How to add subscript in labels in App Designer Matlab
Mostra commenti meno recenti
Hey, I want to add subscript/superscript in label text. Being new in the community, kindly help as I don't know much.
1 Commento
Allen
il 13 Dic 2021
Shankar,
I would not consider may recommendation as an answer. However, until MathWorks adds all text elements to 'tex' and 'latex' interpreters for App Designer labels, I have been stacking labels to create the appearance of subscript and/or superscript text in my labels.
My primary label with spacing included:

My stacked labels. I reduced the font size for the labels displaying "min" and "max", then placed them over my primarly labels.

Hopefully this techinique or something similar will suffice until the interpreters can handle sub- and superscripts.
Risposte (2)
Cris LaPierre
il 26 Dic 2018
1 voto
App designer does not yet support an interpreter in all text elements. This post contains details on which elements supported the 'tex' and 'latex' interpreters as of 18a.
9 Commenti
Chris Calhoun
il 12 Feb 2020
Is this updated in 2019B?
Cris LaPierre
il 13 Feb 2020
Chris Calhoun
il 19 Feb 2020
Do you have any idea when it'll be updated?
Cris LaPierre
il 19 Feb 2020
Sorry, but I do not.
Xingwang Yong
il 11 Gen 2024
It is strange that GUIDE supports subscript for checkbox, while App Designer does not.
Cris LaPierre
il 11 Gen 2024
Modificato: Cris LaPierre
il 10 Apr 2024
You could remove/leave blank the label associated with the checkbox, and use the Label component to create a label that does support subscript.
Xingwang Yong
il 12 Gen 2024
Modificato: Xingwang Yong
il 12 Gen 2024
@Cris LaPierre Using label to fake a sucscripted text is an awkward solution. For checkbox, you can click the text to make the checkbox checked, in addition to click the box itself. However, if you use label to fake the text, the only option is to click the box itself. This inconsistent user experience between different checkboxes would apparently make the user confused. Not to mention how difficult it might be to locate a small box in a large UI.
Cris LaPierre
il 12 Gen 2024
That is the nature of workarounds.
Jeffrey Warner
il 22 Dic 2025
Select html for Text Interpretor, then in your startFcn, add the following text:
app.TextFieldname.Text = ['Lower Freq (<sub>min</sub>)'];
Where TextFieldName is the name of the text field you are triyng to change.
Allen
il 11 Gen 2024
0 voti
I am not sure what version it was introduced, but R2023b now includes an interpreter property for labels in App Designer.

Use the link below for information on how to use interpreters.
3 Commenti
Cris LaPierre
il 11 Gen 2024
Jonas Rosengren
il 10 Apr 2024
Thanks Allen. I discovered however does the font looks awful and can't be changed.
Jeffrey Warner
il 22 Dic 2025
Modificato: Jeffrey Warner
il 22 Dic 2025
Select html for Text Interpretor, then in your startFcn, add the following text:
app.TextFieldname.Text = ['Lower Freq (<sub>min</sub>)'];
Where TextFieldName is the name of the text field you are triyng to change.
Categorie
Scopri di più su Labels and Annotations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!