Open rich-iannone opened 1 month ago
Will add here because my issue is very similar.
code:
tab_spanner(., label = md("t~max~ [h]"), columns = matches("tmax")) %>%
tab_spanner(., label = md("C~max~ [ng/mL]"), columns = matches("cmax")) %>%
tab_spanner(., label = md("t~1/2~ [h]"), columns = matches("t1_2")) %>%
tab_spanner(., label = md("AUC~0-24h~ [h×ng/mL]"), columns = matches("auc_0_24h"))
generates output like this:
when there are only numbers and letters in the subscript part everything renders properly:
Any other sign between ~ makes it render strikethrough instead of subscript (vulgar ½ doesn't work either)
It works like this in pdf, png, html. In docx output it doesn't render subscript in tab_spanner at all just puts C~max~ as it is with tildas visible
Best regards Radek
ps. I just saw that GH has done the same with Cmax above. max is typed between ~ (one per side not two) and is rendered as striketrough.
Also md("AUC$_{0-24h}$ [h×ng/mL]")
renders properly.
Using
gt::md()
renders different markdown syntax differently, depending upon where it is called.Reprex:
Note:
Versions:
Originally posted by @MikeJohnPage in https://github.com/rstudio/gt/issues/1067#issuecomment-2377118729