Latex in table column names

I would like to be able to use simple latex syntax in naming the columns:

table.sigma_sd = NumberField(r"$\sigma_{sd}$ [MPa]")

Should return
image

Instead of
image

Is that possible in a certain way?

Hi Johan,

Thanks for your post!
This is an issue which we’re already tracking internally. I will add your use-case to that issue.
So sadly as of today this is not yet possible to use latex syntax to name columns in a table.

Luckily in this case you don’t need to, you can just add the unicode sigma-symbol in your name string

table.sigma_sd = NumberField("σsd [MPa]")

which would produce the result you showed.

Nonetheless, it could be useful to be able to use latex syntax in some other cases so I will change your post to a feature request so that we will notify you here if/when this feature gets to further development.

Thanks for the reply. The unicode version allows certain characters for sure, this was one example. But underscore or other kind of equation related characters aren’t present. And as it is a label only, it would be nice to add this feature.

EDIT @dsommers :
There are multiple features that could be improved in the table.

  • Latex names Column
  • Wrap text column (allow \n)
  • Rotate headers
  • Define width column
  • Allow default value on creating new row
  • More obvious way to add row
  • Change open OptionField from 2 clicks to 1 click
  • Autofit columns based on column name & row content instead of having all column’s width based on the longest column name. Example below: why must the columns C, C1 and a be that wide? Now nothing fits on the screen anymore
    image

Thanks for the list, quite extensive :wink:
Some of these features are already being tracked internally, I’ll add your cases to them. Others I will add as new issues.
For the sake of completeness I have made new feature request posts (where necessary) for each here on the community forum. Please add more information/suggestions in the separate posts so we get a full image of what the feature could/should be. (note that I merged the ‘Define width column’ and ‘Autofit column name and content’ as this is a related issue).

Thanks for your contribution!

1 Like

And a possiblity to freeze the first (couple) columns in a table, would also be very usefull

1 Like

Sounds interesting as well.
What would you mean by freeze? Something similar to an OutputField perhaps?

Like the Excel function ‘freeze panes’

image

but then only for columns, such that is you have a longer table (more columns) and you need to scroll to see all the information. That you can still see the crucial information in the first columns, in order to identify the row to which the information belongs to

1 Like

Related topic: Style / format text using Markdown in TableInput