Subscript column header table input

I would like to write: f"$c_{{{‘nom’}}}$" as possible in a general TextField but within a table (column name).

Is there a possible way?
Using a custom search functions results in:


Which isn’t very pretty…


Hi Johan!

I think you want to display “c subscript nom”? I think in that case $c_{nom}$ should be sufficient. The underscore is for subscript, and the curly brackets are used to make sure “nom” goes to the subscript, instead of only the n

I hope that fixes it!

Edit: I realise you are using an f-string now. I’m not sure how those two would combine as both KeTeX and fstrings use curly brackets. You could try adding strings together instead of using an fstring to circumvent this.

So in that case: If you want to generate a TextField name with a variable is called subscript containing the string "num" you could try:

"$c_{" + subscript + "}$"

to create the string $c_{num}$ without using f-strings.

This syntax doesn’t work for the columns of a table input:

It does work however for common text in the UI

Its not a big thing though. I’ll just write cnom. However I thought it would be possible to use $c_{nom}$ in the headers as well