Symbols can be added to the label column via unicode. Here is a quick reference to commonly used symbols.
#>
#> Attaching package: 'huxtable'
#> The following object is masked from 'package:dplyr':
#>
#> add_rownames
| Symbol | Textual Description | Unicode |
|---|---|---|
| ← | Left arrow | \u2190 |
| → | Right arrow | \u2192 |
| ≤ | Less-than or equal to | \u2264 |
| ≥ | Greater-than or equal to | \u2265 |
| ≠ | Not equal to | \u2260 |
| ± | Plus-minus sign | \u00b1 |
| α | Alpha | \u03b1 |
| β | Beta | \u03b2 |
| μ | Mu | \u03bc |
| « | Non-breaking space | \u00ab |
Here is an example call to tidytlg::gentlg() that will add the symbols to the label column.
Superscripts and Subscripts can be added to the label column via unicode.
df <- tibble::tibble(
label = c(
"This is a superscript a{\\super a}",
"This is a subscript b{\\sub b}"
),
col1 = c("100", "200")
)
tidytlg::gentlg(df,
file = "demo"
)Superscripts and Subscripts can be added to the footnotes via unicode as well.
Sometimes you need add a line break into your RTF. Inserting ‘\\\n’ into your string will add your line break for you.
df <- tibble::tibble(
label = c("Bodysystem \\\n Preferred Term"),
col1 = c("100")
)
tidytlg::gentlg(df,
file = "demo"
)If you need a line break followed by a tab, just add in ‘\\li180’.