How to add subscript in labels in App Designer Matlab

21 visualizaciones (últimos 30 días)
Shankar Dutt
Shankar Dutt el 7 de Nov. de 2018
Comentada: Jeffrey Warner el 22 de Dic. de 2025
Hey, I want to add subscript/superscript in label text. Being new in the community, kindly help as I don't know much.
  1 comentario
Allen
Allen el 13 de Dic. de 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.

Iniciar sesión para comentar.

Respuestas (2)

Cris LaPierre
Cris LaPierre el 26 de Dic. de 2018
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 comentarios
Cris LaPierre
Cris LaPierre el 12 de En. de 2024
That is the nature of workarounds.
Jeffrey Warner
Jeffrey Warner el 22 de Dic. de 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.

Iniciar sesión para comentar.


Allen
Allen el 11 de En. de 2024
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 comentarios
Jonas Rosengren
Jonas Rosengren el 10 de Abr. de 2024
Thanks Allen. I discovered however does the font looks awful and can't be changed.
Jeffrey Warner
Jeffrey Warner el 22 de Dic. de 2025
Editada: Jeffrey Warner el 22 de Dic. de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by